/* Generated by Cython 3.2.2 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "LINK_PLATFORM_MACOSX",
                "1"
            ]
        ],
        "depends": [],
        "name": "coremusic.capi",
        "sources": [
            "src/coremusic/capi.pyx"
        ]
    },
    "module_name": "coremusic.capi"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_2"
#define CYTHON_HEX_VERSION 0x030202F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !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
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#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
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* CInitCode */
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__coremusic__capi
#define __PYX_HAVE_API__coremusic__capi
/* Early includes */
#include <math.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>

    #define FOURCC_ARGS(x)  (char)((x & 0xff000000) >> 24),         (char)((x & 0xff0000) >> 16),                           (char)((x & 0xff00) >> 8), (char)((x) & 0xff)
    
#include "CoreFoundation/CFBase.h"
#include "CoreFoundation/CoreFoundation.h"
#include "CoreAudioTypes/CoreAudioBaseTypes.h"
#include "CoreAudio/CoreAudioTypes.h"
#include "CoreAudio/AudioHardwareBase.h"
#include "CoreAudio/AudioHardware.h"
#include "CoreAudio/CoreAudio.h"
#include "AudioToolbox/AudioQueue.h"
#include "AudioToolbox/AudioFile.h"
#include "AudioToolbox/AudioFileStream.h"
#include "AudioToolbox/AudioComponent.h"
#include "AudioToolbox/AudioUnitProperties.h"
#include "AudioToolbox/AUComponent.h"
#include "AudioToolbox/AudioOutputUnit.h"
#include "AudioToolbox/AudioConverter.h"
#include "AudioToolbox/ExtendedAudioFile.h"
#include "AudioToolbox/AudioFormat.h"
#include "AudioToolbox/AudioServices.h"
#include "AudioToolbox/MusicDevice.h"
#include "AudioToolbox/MusicPlayer.h"
#include "AudioToolbox/AUGraph.h"
#include "AudioToolbox/CoreAudioClock.h"
#include "CoreMIDI/MIDIServices.h"
#include "CoreMIDI/MIDIMessages.h"
#include "CoreMIDI/MIDISetup.h"
#include "CoreMIDI/MIDIDriver.h"
#include "CoreMIDI/MIDIThruConnection.h"

    // Forward declarations for Link integration
    
#include "pythread.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "src/coremusic/capi.pyx",
  "<stringsource>",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* BufferFormatStructs.proto */
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  const struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  const __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  const __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;

/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
#define __Pyx_MEMSLICE_INIT  { 0, 0, { 0 }, { 0 }, { 0 } }
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview))
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview))
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

/* #### Code section: numeric_typedefs ### */

/* "coremusic/capi.pyx":7623
 * 
 * # Type definitions for clarity
 * ctypedef double float64_t             # <<<<<<<<<<<<<<
 * ctypedef float float32_t
 * ctypedef short int16_t
*/
typedef double __pyx_t_9coremusic_4capi_float64_t;

/* "coremusic/capi.pyx":7624
 * # Type definitions for clarity
 * ctypedef double float64_t
 * ctypedef float float32_t             # <<<<<<<<<<<<<<
 * ctypedef short int16_t
 * 
*/
typedef float __pyx_t_9coremusic_4capi_float32_t;

/* "coremusic/capi.pyx":7625
 * ctypedef double float64_t
 * ctypedef float float32_t
 * ctypedef short int16_t             # <<<<<<<<<<<<<<
 * 
 * 
*/
typedef short __pyx_t_9coremusic_4capi_int16_t;
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_9coremusic_4capi_AudioPlayer;
struct __pyx_obj_9coremusic_4capi_AudioRecorder;
struct __pyx_obj_9coremusic_4capi_CoreAudioObject;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData;
struct __pyx_t_9coremusic_4capi_AudioPlayerData;
struct __pyx_t_9coremusic_4capi_AudioRecorderData;

/* "coremusic/capi.pyx":1024
 * # ============================================================================
 * 
 * cdef struct AudioConverterCallbackData:             # <<<<<<<<<<<<<<
 *     char* input_buffer         # Pointer to input data
 *     cf.UInt32 input_buffer_size # Total size of input buffer
*/
struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData {
  char *input_buffer;
  UInt32 input_buffer_size;
  UInt32 packets_read;
  UInt32 total_packets;
  UInt32 packet_size;
  AudioStreamBasicDescription source_format;
};

/* "coremusic/capi.pyx":2663
 * 
 * # Audio player state structure
 * cdef struct AudioPlayerData:             # <<<<<<<<<<<<<<
 *     ca.AudioBufferList* buffer_list
 *     cf.UInt32 total_frames
*/
struct __pyx_t_9coremusic_4capi_AudioPlayerData {
  AudioBufferList *buffer_list;
  UInt32 total_frames;
  UInt32 current_frame;
  Boolean playing;
  Boolean loop;
};

/* "coremusic/capi.pyx":3077
 * 
 * # Audio recorder state structure
 * cdef struct AudioRecorderData:             # <<<<<<<<<<<<<<
 *     cf.Float32* buffer
 *     cf.UInt32 buffer_size_frames
*/
struct __pyx_t_9coremusic_4capi_AudioRecorderData {
  Float32 *buffer;
  UInt32 buffer_size_frames;
  UInt32 current_frame;
  UInt32 sample_rate;
  UInt32 channels;
  Boolean recording;
};

/* "coremusic/capi.pyx":2755
 * 
 * 
 * cdef class AudioPlayer:             # <<<<<<<<<<<<<<
 *     """Pure Cython audio player using AudioUnit for playback
 * 
*/
struct __pyx_obj_9coremusic_4capi_AudioPlayer {
  PyObject_HEAD
  struct __pyx_t_9coremusic_4capi_AudioPlayerData player_data;
  AudioUnit output_unit;
  int initialized;
  PyObject *_link_session_ref;
};


/* "coremusic/capi.pyx":3146
 * 
 * 
 * cdef class AudioRecorder:             # <<<<<<<<<<<<<<
 *     """Pure Cython audio recorder using AudioQueue for input capture
 * 
*/
struct __pyx_obj_9coremusic_4capi_AudioRecorder {
  PyObject_HEAD
  struct __pyx_t_9coremusic_4capi_AudioRecorderData recorder_data;
  AudioQueueRef audio_queue;
  AudioQueueBufferRef buffers[3];
  AudioStreamBasicDescription format;
  int initialized;
  PyObject *output_path;
};


/* "coremusic/capi.pyx":6960
 * # All other classes are implemented as pure Python classes in the objects module.
 * 
 * cdef class CoreAudioObject:             # <<<<<<<<<<<<<<
 *     """Base class for all CoreAudio objects with automatic resource management
 * 
*/
struct __pyx_obj_9coremusic_4capi_CoreAudioObject {
  PyObject_HEAD
  struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject *__pyx_vtab;
  long _object_id;
  int _is_disposed;
};


/* "View.MemoryView":110
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname("__pyx_array")
 * cdef class array:
*/
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":299
 * 
 * 
 * @cname('__pyx_MemviewEnum')             # <<<<<<<<<<<<<<
 * cdef class Enum(object):
 *     cdef object name
*/
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":334
 * 
 * 
 * @cname('__pyx_memoryview')             # <<<<<<<<<<<<<<
 * cdef class memoryview:
 * 
*/
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  void *_unused;
  PyThread_type_lock lock;
  __pyx_atomic_int_type acquisition_count;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo const *typeinfo;
};


/* "View.MemoryView":951
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):
*/
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "coremusic/capi.pyx":6960
 * # All other classes are implemented as pure Python classes in the objects module.
 * 
 * cdef class CoreAudioObject:             # <<<<<<<<<<<<<<
 *     """Base class for all CoreAudio objects with automatic resource management
 * 
*/

struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject {
  void (*_dispose_internal)(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *);
};
static struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject *__pyx_vtabptr_9coremusic_4capi_CoreAudioObject;


/* "View.MemoryView":110
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname("__pyx_array")
 * cdef class array:
*/

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":334
 * 
 * 
 * @cname('__pyx_memoryview')             # <<<<<<<<<<<<<<
 * cdef class memoryview:
 * 
*/

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
  PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":951
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):
*/

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #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__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #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
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#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)

/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

/* BytesEquals.proto (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* RaiseArgTupleInvalid.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);

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

/* RaiseException.export */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyMemoryError_Check.proto */
#define __Pyx_PyExc_MemoryError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_MemoryError)

/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

/* GCCDiagnostics.proto (used by CIntToPyUnicode) */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.export */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck, int unsafe_shared);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant);

/* UnaryNegOverflows.proto */
#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  PY_VERSION_HEX >= 0x030C0000
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  #if __clang__ || __GNUC__
  __attribute__((no_sanitize("thread")))
  #endif
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PySequenceMultiply.proto */
#define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
#if !CYTHON_USE_TYPE_SLOTS
#define  __Pyx_PySequence_Multiply PySequence_Repeat
#else
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
#endif

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck, int unsafe_shared);

/* RaiseUnboundLocalError.proto */
static void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyIndexError_Check.proto */
#define __Pyx_PyExc_IndexError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_IndexError)

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant);

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

/* PyObjectVectorCallKwBuilder.proto */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* CallUnboundCMethod1.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* decode_c_string_utf16.proto (used by decode_c_string) */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* SetStringIndexingError.proto (used by GetItemIntUnicode) */
static void __Pyx_SetStringIndexingError(const char* message, int has_gil);

/* GetItemIntUnicode.proto */
#define __Pyx_GetItemInt_Unicode(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Unicode_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, has_gil) :\
    (__Pyx_SetStringIndexingError("string index out of range", has_gil), (Py_UCS4)-1))
static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i,
                                                           int wraparound, int boundscheck, int has_gil);

/* pyint_simplify.proto */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none);

/* PyLongBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static CYTHON_INLINE PyObject* __Pyx_PyLong_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyLong_AndObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* PyLongBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static CYTHON_INLINE PyObject* __Pyx_PyLong_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyLong_RshiftObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRshift(op1, op2) : PyNumber_Rshift(op1, op2))
#endif

/* PyRuntimeError_Check.proto */
#define __Pyx_PyExc_RuntimeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_RuntimeError)

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_OSStatus(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_OSStatus(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_OSStatus(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_OSStatus(OSStatus value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_OSStatus(OSStatus value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_UInt32(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_UInt32(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_UInt32(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_UInt32(UInt32 value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_UInt32(UInt32 value, Py_ssize_t width, char padding_char, char format_char);

/* DictGetItem.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_long(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_long(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_long(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

/* PyRange_Check.proto */
#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check)
  #define PyRange_Check(obj)  __Pyx_TypeCheck((obj), &PyRange_Type)
#endif

/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

/* PyObjectCallMethod1.proto (used by append) */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* ErrOccurredWithGIL.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void);

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* CallTypeTraverse.proto */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectCallMethod0.proto (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
static int __Pyx_MergeVtables(PyTypeObject *type);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* BufferStructDeclare.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;

/* MemviewRefcount.proto */
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* MemviewSliceInit.proto */
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);

/* IsLittleEndian.proto (used by BufferFormatCheck) */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto (used by MemviewSliceValidateAndInit) */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              const __Pyx_TypeInfo* type);

/* TypeInfoCompare.proto (used by MemviewSliceValidateAndInit) */
static int __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.export */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                const __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_char(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_int16_t(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_9coremusic_4capi_float32_t(PyObject *, int writable_flag);

/* MemviewSliceCopy.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SInt32(SInt32 value);

/* CIntFromPy.proto */
static CYTHON_INLINE UInt32 __Pyx_PyLong_As_UInt32(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt32(UInt32 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_Boolean(Boolean value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamSeekFlags(AudioFileStreamSeekFlags value);

/* CIntFromPy.proto */
static CYTHON_INLINE CFIndex __Pyx_PyLong_As_CFIndex(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CFIndex(CFIndex value);

/* CIntFromPy.proto */
static CYTHON_INLINE SInt32 __Pyx_PyLong_As_SInt32(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamPropertyFlags(AudioFileStreamPropertyFlags value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamParseFlags(AudioFileStreamParseFlags value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDIMessageType(MIDIMessageType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDICVStatus(MIDICVStatus value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt8(UInt8 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDITransformType(MIDITransformType value);

/* CIntFromPy.proto */
static CYTHON_INLINE UInt8 __Pyx_PyLong_As_UInt8(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SInt16(SInt16 value);

/* CIntFromPy.proto */
static CYTHON_INLINE SInt16 __Pyx_PyLong_As_SInt16(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt16(UInt16 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDITransformControlType(MIDITransformControlType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CAClockTimeFormat(CAClockTimeFormat value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SMPTETimeType(SMPTETimeType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SMPTETimeFlags(SMPTETimeFlags value);

/* UpdateUnpickledDict.proto */
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);

/* CheckUnpickleChecksum.proto */
static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
static void __pyx_f_9coremusic_4capi_15CoreAudioObject__dispose_internal(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto*/

/* Module declarations from "cython.view" */

/* Module declarations from "cython.dataclasses" */

/* Module declarations from "cython" */

/* Module declarations from "libc.math" */

/* Module declarations from "libc.stdint" */

/* Module declarations from "libc.string" */

/* Module declarations from "libc.stdlib" */

/* Module declarations from "coremusic" */

/* Module declarations from "coremusic.corefoundation" */

/* Module declarations from "coremusic.coreaudiotypes" */

/* Module declarations from "coremusic.coreaudio" */

/* Module declarations from "coremusic.audiotoolbox" */

/* Module declarations from "coremusic.coremidi" */

/* Module declarations from "coremusic.capi" */
static PyObject *__pyx_collections_abc_Sequence = 0;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static PyObject *__pyx_f_9coremusic_4capi_format_osstatus_error(OSStatus, PyObject *); /*proto*/
static void __pyx_f_9coremusic_4capi_dict_to_asbd(PyObject *, AudioStreamBasicDescription *); /*proto*/
static PyObject *__pyx_f_9coremusic_4capi_asbd_to_dict(AudioStreamBasicDescription *); /*proto*/
static PyObject *__pyx_f_9coremusic_4capi_cfstring_to_str(CFStringRef); /*proto*/
static CFStringRef __pyx_f_9coremusic_4capi_str_to_cfstring(PyObject *); /*proto*/
static void __pyx_f_9coremusic_4capi_init_property_address(AudioObjectPropertyAddress *, UInt32, UInt32, UInt32); /*proto*/
static void __pyx_f_9coremusic_4capi_dummy_property_listener(void *, AudioFileStreamID, AudioFileStreamPropertyID, AudioFileStreamPropertyFlags *); /*proto*/
static void __pyx_f_9coremusic_4capi_dummy_packets_callback(void *, UInt32, UInt32, void const *, AudioStreamPacketDescription *); /*proto*/
static OSStatus __pyx_f_9coremusic_4capi_audio_converter_input_callback(AudioConverterRef, UInt32 *, AudioBufferList *, AudioStreamPacketDescription **, void *); /*proto*/
static void __pyx_f_9coremusic_4capi_audio_queue_output_callback(void *, AudioQueueRef, AudioQueueBufferRef); /*proto*/
static OSStatus __pyx_f_9coremusic_4capi_audio_player_render_callback(void *, AudioUnitRenderActionFlags *, AudioTimeStamp const *, UInt32, UInt32, AudioBufferList *); /*proto*/
static void __pyx_f_9coremusic_4capi_audio_recorder_input_callback(void *, AudioQueueRef, AudioQueueBufferRef, AudioTimeStamp const *, UInt32, AudioStreamPacketDescription const *); /*proto*/
static CYTHON_INLINE __pyx_t_9coremusic_4capi_int16_t __pyx_f_9coremusic_4capi_clip_int16(int); /*proto*/
static CYTHON_INLINE __pyx_t_9coremusic_4capi_float64_t __pyx_f_9coremusic_4capi_db_to_linear(__pyx_t_9coremusic_4capi_float64_t); /*proto*/
static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char const *, char *); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo const *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
static int __pyx_memoryview_err_no_memory(void); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
static const __Pyx_TypeInfo __Pyx_TypeInfo_char = { "char", NULL, sizeof(char), { 0 }, 0, 'H', __PYX_IS_UNSIGNED(char), 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_char__const__ = { "const unsigned char", NULL, sizeof(unsigned char const ), { 0 }, 0, __PYX_IS_UNSIGNED(unsigned char const ) ? 'U' : 'I', __PYX_IS_UNSIGNED(unsigned char const ), 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_char = { "unsigned char", NULL, sizeof(unsigned char), { 0 }, 0, __PYX_IS_UNSIGNED(unsigned char) ? 'U' : 'I', __PYX_IS_UNSIGNED(unsigned char), 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_9coremusic_4capi_float32_t = { "float32_t", NULL, sizeof(__pyx_t_9coremusic_4capi_float32_t), { 0 }, 0, 'R', 0, 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_9coremusic_4capi_int16_t = { "int16_t", NULL, sizeof(__pyx_t_9coremusic_4capi_int16_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_9coremusic_4capi_int16_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_9coremusic_4capi_int16_t), 0 };
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "coremusic.capi"
extern int __pyx_module_is_main_coremusic__capi;
int __pyx_module_is_main_coremusic__capi = 0;

/* Implementation of "coremusic.capi" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin___import__;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
/* #### Code section: string_decls ### */
static const char __pyx_k_c[] = "c";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_fortran[] = "fortran";
/* #### Code section: decls ### */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_fourchar_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_2int_to_fourchar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_4audio_object_show(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_6audio_hardware_unload(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_8audio_hardware_destroy_aggregate_device(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_in_device_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_10audio_object_get_property_data(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_12audio_object_set_property_data(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_14audio_object_is_property_settable(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_16audio_object_get_property_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_18audio_hardware_get_devices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_20audio_hardware_get_default_output_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_22audio_hardware_get_default_input_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_24audio_file_open_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path, int __pyx_v_permissions, int __pyx_v_file_type_hint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_26audio_file_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_28audio_file_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, int __pyx_v_property_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_30audio_file_read_packets(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, long __pyx_v_start_packet, int __pyx_v_num_packets); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_32audio_file_read_packets_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, long __pyx_v_start_packet, int __pyx_v_num_packets, __Pyx_memviewslice __pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_34audio_file_stream_open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_type_hint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_36audio_file_stream_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_38audio_file_stream_parse_bytes(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, PyObject *__pyx_v_data, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_40audio_file_stream_parse_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, __Pyx_memviewslice __pyx_v_data, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_42audio_file_stream_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, int __pyx_v_property_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_44audio_file_stream_seek(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, long __pyx_v_packet_offset); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_46audio_converter_new(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source_format, PyObject *__pyx_v_dest_format); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_48audio_converter_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_50audio_converter_convert_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, PyObject *__pyx_v_input_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_52audio_converter_convert_buffer_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_54audio_converter_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, int __pyx_v_property_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_56audio_converter_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, int __pyx_v_property_id, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_58audio_converter_reset(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_60audio_converter_fill_complex_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, PyObject *__pyx_v_input_data, int __pyx_v_input_packet_count, int __pyx_v_output_packet_count, PyObject *__pyx_v_source_format_dict); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_62audio_converter_fill_complex_buffer_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer, int __pyx_v_input_packet_count, int __pyx_v_output_packet_count, PyObject *__pyx_v_source_format_dict); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_64get_audio_converter_property_min_input_buffer_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_66get_audio_converter_property_min_output_buffer_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_68get_audio_converter_property_max_input_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_70get_audio_converter_property_max_output_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_72get_audio_converter_property_sample_rate_converter_quality(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_74get_audio_converter_property_codec_quality(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_76get_audio_converter_quality_max(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_78get_audio_converter_quality_high(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_80get_audio_converter_quality_medium(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_82get_audio_converter_quality_low(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_84get_audio_converter_quality_min(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_86extended_audio_file_open_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_88extended_audio_file_create_with_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path, int __pyx_v_file_type, PyObject *__pyx_v_source_format, CYTHON_UNUSED int __pyx_v_codec_manufacturer); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_90extended_audio_file_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_92extended_audio_file_read(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_94extended_audio_file_read_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames, __Pyx_memviewslice __pyx_v_buffer, int __pyx_v_num_channels); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_96extended_audio_file_write(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames, PyObject *__pyx_v_audio_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_98extended_audio_file_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_property_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_100extended_audio_file_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_property_id, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_102get_extended_audio_file_property_file_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_104get_extended_audio_file_property_client_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_106get_extended_audio_file_property_file_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_108get_extended_audio_file_property_client_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_110get_extended_audio_file_property_codec_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_112get_extended_audio_file_property_audio_file(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_114get_extended_audio_file_property_file_length_frames(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_116audio_queue_new_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_format); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_118audio_queue_allocate_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_buffer_size); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_120audio_queue_enqueue_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, long __pyx_v_buffer_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_122audio_queue_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_124audio_queue_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_126audio_queue_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_128get_audio_format_linear_pcm(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_130get_linear_pcm_format_flag_is_signed_integer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_132get_linear_pcm_format_flag_is_packed(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_134get_audio_file_wave_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_136get_audio_file_read_permission(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_138get_audio_file_property_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_140get_audio_file_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_142get_audio_file_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_144get_audio_file_property_estimated_duration(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_146get_audio_object_property_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_148get_audio_object_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_150get_audio_device_property_device_uid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_152get_audio_device_property_model_uid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_154get_audio_device_property_transport_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_156get_audio_device_property_device_is_alive(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_158get_audio_device_property_nominal_sample_rate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_160get_audio_device_property_available_nominal_sample_rates(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_162get_audio_device_property_is_hidden(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_164get_audio_device_property_preferred_channels_for_stereo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_166get_audio_device_property_stream_configuration(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_168get_audio_device_property_volume_scalar(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_170get_audio_device_property_mute(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_172get_audio_hardware_property_default_output_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_174get_audio_hardware_property_default_input_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_176get_audio_object_property_scope_global(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_178get_audio_object_property_scope_input(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_180get_audio_object_property_scope_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_182get_audio_object_property_element_main(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_184audio_component_find_next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_description_dict, long __pyx_v_previous_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_186audio_component_instance_new(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_188audio_component_instance_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_instance_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_190audio_component_copy_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_192audio_component_get_description(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_194audio_unit_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_196audio_unit_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_198audio_unit_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, int __pyx_v_property_id, int __pyx_v_scope, int __pyx_v_element, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_200audio_unit_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, int __pyx_v_property_id, int __pyx_v_scope, int __pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_202audio_output_unit_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_204audio_output_unit_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_206audio_unit_find_all_components(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_component_type, PyObject *__pyx_v_component_subtype, PyObject *__pyx_v_manufacturer); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_208audio_unit_get_component_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_210audio_unit_get_parameter_list(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_scope, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_212audio_unit_get_parameter_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_scope); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_214audio_unit_get_parameter(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_scope, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_216audio_unit_set_parameter(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_value, PyObject *__pyx_v_scope, PyObject *__pyx_v_element); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_218audio_unit_get_factory_presets(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_220audio_unit_set_current_preset(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_preset_number); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_222audio_unit_render(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_input_data, PyObject *__pyx_v_num_frames, CYTHON_UNUSED PyObject *__pyx_v_sample_rate, PyObject *__pyx_v_num_channels); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_224audio_unit_render_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer, int __pyx_v_num_frames, int __pyx_v_num_channels); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_226get_audio_unit_type_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_228get_audio_component_type_music_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_230get_audio_unit_subtype_default_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_232get_audio_unit_manufacturer_apple(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_234get_audio_unit_property_stream_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_236get_audio_unit_property_set_render_callback(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_238get_audio_unit_scope_input(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_240get_audio_unit_scope_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_242get_audio_unit_scope_global(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_244get_linear_pcm_format_flag_is_non_interleaved(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_link_session); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_2load_file(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_4setup_output(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_6start(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_8play(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_10stop(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_12set_looping(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, int __pyx_v_loop); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_14reset_playback(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_16is_playing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_18get_progress(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_12link_session___get__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_20get_link_timing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_quantum); /* proto */
static void __pyx_pf_9coremusic_4capi_11AudioPlayer_22__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9coremusic_4capi_13AudioRecorder___init__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, PyObject *__pyx_v_sample_rate, PyObject *__pyx_v_channels); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_2setup_input(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, float __pyx_v_duration); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_4start(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_6stop(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_8is_recording(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_10get_progress(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_12get_recorded_frames(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_14get_recorded_duration(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_16run_loop(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, double __pyx_v_seconds); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_18save_to_file(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_20get_audio_data(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_11sample_rate___get__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_8channels___get__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_22has_audio_content(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static void __pyx_pf_9coremusic_4capi_13AudioRecorder_24__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_246get_audio_file_stream_property_ready_to_produce_packets(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_248get_audio_file_stream_property_file_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_250get_audio_file_stream_property_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_252get_audio_file_stream_property_format_list(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_254get_audio_file_stream_property_magic_cookie_data(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_256get_audio_file_stream_property_audio_data_byte_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_258get_audio_file_stream_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_260get_audio_file_stream_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_262get_audio_file_stream_property_data_offset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_264get_audio_file_stream_property_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_266get_audio_file_stream_property_packet_to_frame(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_268get_audio_file_stream_property_frame_to_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_270get_audio_file_stream_property_packet_to_byte(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_272get_audio_file_stream_property_byte_to_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_274get_audio_file_stream_property_packet_table_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_276get_audio_file_stream_property_packet_size_upper_bound(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_278get_audio_file_stream_property_average_bytes_per_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_280get_audio_file_stream_property_bit_rate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_282get_audio_file_stream_property_info_dictionary(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_284get_audio_file_stream_property_flag_property_is_cached(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_286get_audio_file_stream_property_flag_cache_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_288get_audio_file_stream_parse_flag_discontinuity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_290get_audio_file_stream_seek_flag_offset_is_estimated(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_292get_audio_file_stream_error_unsupported_file_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_294get_audio_file_stream_error_unsupported_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_296get_audio_file_stream_error_unsupported_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_298get_audio_file_stream_error_bad_property_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_300get_audio_file_stream_error_not_optimized(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_302get_audio_file_stream_error_invalid_packet_offset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_304get_audio_file_stream_error_invalid_file(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_306get_audio_file_stream_error_value_unknown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_308get_audio_file_stream_error_data_unavailable(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_310get_audio_file_stream_error_illegal_operation(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_312get_audio_file_stream_error_unspecified_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_314get_audio_file_stream_error_discontinuity_cant_recover(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_316audio_services_create_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_318audio_services_dispose_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_320audio_services_play_system_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_322audio_services_play_alert_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_324audio_services_get_property(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_property_id, long __pyx_v_specifier_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_326audio_services_set_property(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_property_id, PyObject *__pyx_v_data, long __pyx_v_specifier_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_328get_audio_services_no_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_330get_audio_services_unsupported_property_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_332get_audio_services_bad_property_size_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_334get_audio_services_bad_specifier_size_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_336get_audio_services_system_sound_unspecified_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_338get_audio_services_system_sound_client_timed_out_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_340get_audio_services_system_sound_exceeded_maximum_duration_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_342get_system_sound_id_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_344get_system_sound_id_flash_screen(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_346get_system_sound_id_vibrate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_348get_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_350get_audio_services_property_is_ui_sound(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_352get_audio_services_property_complete_playback_if_app_dies(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_354test_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_356music_device_midi_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2, int __pyx_v_offset_sample_frame); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_358music_device_sysex(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_360music_device_start_note(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_instrument_id, int __pyx_v_group_id, float __pyx_v_pitch, float __pyx_v_velocity, int __pyx_v_offset_sample_frame, PyObject *__pyx_v_controls); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_362music_device_stop_note(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_group_id, long __pyx_v_note_instance_id, int __pyx_v_offset_sample_frame); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_364create_music_device_std_note_params(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_pitch, float __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_366create_music_device_note_params(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_pitch, float __pyx_v_velocity, PyObject *__pyx_v_controls); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_368get_music_note_event_use_group_instrument(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_370get_music_note_event_unused(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_372get_music_device_range(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_374get_music_device_midi_event_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_376get_music_device_sysex_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_378get_music_device_start_note_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_380get_music_device_stop_note_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_382get_music_device_midi_event_list_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_384midi_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_386midi_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_388midi_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_controller, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_390midi_program_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_program); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_392midi_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_394new_music_player(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_396dispose_music_player(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_398music_player_set_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_400music_player_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_402music_player_set_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, double __pyx_v_time); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_404music_player_get_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_406music_player_preroll(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_408music_player_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_410music_player_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_412music_player_is_playing(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_414music_player_set_play_rate_scalar(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, double __pyx_v_scale_rate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_416music_player_get_play_rate_scalar(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_418new_music_sequence(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_420dispose_music_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_422music_sequence_new_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_424music_sequence_dispose_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, long __pyx_v_track); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_426music_sequence_get_track_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_428music_sequence_get_ind_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, int __pyx_v_track_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_430music_sequence_get_tempo_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_432music_sequence_set_sequence_type(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, int __pyx_v_sequence_type); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_434music_sequence_get_sequence_type(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_436music_sequence_file_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, PyObject *__pyx_v_file_path, int __pyx_v_file_type_hint, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_438music_track_new_midi_note_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity, int __pyx_v_release_velocity, double __pyx_v_duration); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_440music_track_new_midi_channel_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_442music_track_new_extended_tempo_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, double __pyx_v_bpm); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_444get_music_event_type_null(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_446get_music_event_type_extended_note(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_448get_music_event_type_extended_tempo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_450get_music_event_type_user(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_452get_music_event_type_meta(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_454get_music_event_type_midi_note_message(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_456get_music_event_type_midi_channel_message(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_458get_music_event_type_midi_raw_data(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_460get_music_event_type_parameter(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_462get_music_event_type_au_preset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_464get_music_sequence_type_beats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_466get_music_sequence_type_seconds(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_468get_music_sequence_type_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_470get_music_sequence_file_any_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_472get_music_sequence_file_midi_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_474get_music_sequence_file_imelody_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_476get_sequence_track_property_loop_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_478get_sequence_track_property_offset_time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_480get_sequence_track_property_mute_status(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_482get_sequence_track_property_solo_status(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_484get_sequence_track_property_automated_parameters(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_486get_sequence_track_property_track_length(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_488get_sequence_track_property_time_resolution(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_490create_midi_note_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity, int __pyx_v_release_velocity, double __pyx_v_duration); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_492create_midi_channel_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_494midi_client_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_496midi_client_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_498midi_input_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_500midi_output_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_502midi_port_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_504midi_port_connect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_506midi_port_disconnect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_508midi_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_510midi_get_device(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_device_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_512midi_device_get_number_of_entities(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_514midi_device_get_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, int __pyx_v_entity_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_516midi_entity_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_518midi_entity_get_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_source_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_520midi_entity_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_522midi_entity_get_destination(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_dest_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_524midi_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_526midi_get_source(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_source_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_528midi_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_530midi_get_destination(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dest_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_532midi_source_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_534midi_destination_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_536midi_endpoint_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_538midi_object_get_string_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_540midi_object_get_integer_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_542midi_object_set_string_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_544midi_object_set_integer_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_546midi_object_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_548midi_device_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_550midi_endpoint_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_552midi_entity_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_554midi_object_get_manufacturer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_556midi_object_get_model(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_558midi_send_data(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_destination, PyObject *__pyx_v_data, int __pyx_v_timestamp); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_560get_midi_error_invalid_client(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_562get_midi_error_invalid_port(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_564get_midi_error_wrong_endpoint_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_566get_midi_error_no_connection(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_568get_midi_error_unknown_endpoint(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_570get_midi_error_unknown_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_572get_midi_error_wrong_property_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_574get_midi_error_no_current_setup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_576get_midi_error_message_send_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_578get_midi_error_server_start_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_580get_midi_error_setup_format_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_582get_midi_error_wrong_thread(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_584get_midi_error_object_not_found(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_586get_midi_error_id_not_unique(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_588get_midi_error_not_permitted(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_590get_midi_error_unknown_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_592get_midi_object_type_other(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_594get_midi_object_type_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_596get_midi_object_type_entity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_598get_midi_object_type_source(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_600get_midi_object_type_destination(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_602get_midi_object_type_external_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_604get_midi_object_type_external_entity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_606get_midi_object_type_external_source(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_608get_midi_object_type_external_destination(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_610get_midi_protocol_1_0(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_612get_midi_protocol_2_0(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_614get_midi_property_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_616get_midi_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_618get_midi_property_model(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_620get_midi_property_unique_id(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_622get_midi_property_device_id(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_624get_midi_property_receive_channels(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_626get_midi_property_transmit_channels(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_628get_midi_property_offline(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_630get_midi_property_private(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_632get_midi_property_driver_owner(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_634get_midi_property_display_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_636midi_message_type_for_up_word(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_word); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_638midi1_up_channel_voice_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_channel, int __pyx_v_data1, int __pyx_v_data2); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_640midi1_up_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_642midi1_up_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_644midi1_up_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_index, int __pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_646midi1_up_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_lsb, int __pyx_v_msb); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_648midi1_up_system_common(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_byte1, int __pyx_v_byte2); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_650midi1_up_sysex(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_bytes_used, int __pyx_v_byte1, int __pyx_v_byte2, int __pyx_v_byte3, int __pyx_v_byte4, int __pyx_v_byte5, int __pyx_v_byte6); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_652midi2_channel_voice_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_channel, int __pyx_v_index, long __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_654midi2_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_attribute_type, int __pyx_v_attribute_data, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_656midi2_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_attribute_type, int __pyx_v_attribute_data, int __pyx_v_velocity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_658midi2_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_index, long __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_660midi2_program_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_bank_is_valid, int __pyx_v_program, int __pyx_v_bank_msb, int __pyx_v_bank_lsb); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_662midi2_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, long __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_664get_midi_message_type_utility(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_666get_midi_message_type_system(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_668get_midi_message_type_channel_voice1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_670get_midi_message_type_sysex(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_672get_midi_message_type_channel_voice2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_674get_midi_message_type_data128(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_676get_midi_cv_status_note_off(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_678get_midi_cv_status_note_on(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_680get_midi_cv_status_poly_pressure(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_682get_midi_cv_status_control_change(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_684get_midi_cv_status_program_change(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_686get_midi_cv_status_channel_pressure(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_688get_midi_cv_status_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_690midi_device_new_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, PyObject *__pyx_v_name, int __pyx_v_protocol, int __pyx_v_embedded, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_692midi_device_add_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, PyObject *__pyx_v_name, int __pyx_v_embedded, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_694midi_device_remove_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_696midi_entity_add_or_remove_endpoints(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_698midi_setup_add_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_700midi_setup_remove_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_702midi_setup_add_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_704midi_setup_remove_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_706midi_external_device_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_manufacturer, PyObject *__pyx_v_model); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_708midi_device_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_manufacturer, PyObject *__pyx_v_model); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_710midi_device_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_712midi_device_list_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_714midi_device_list_get_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_716midi_device_list_add_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_718midi_device_list_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_720midi_endpoint_set_ref_cons(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint, long __pyx_v_ref1, long __pyx_v_ref2); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_722midi_endpoint_get_ref_cons(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_724midi_get_driver_io_runloop(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_726midi_get_driver_device_list(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_728midi_driver_enable_monitoring(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver, int __pyx_v_enabled); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_730midi_thru_connection_params_initialize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_732midi_thru_connection_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_persistent_owner_id, PyObject *__pyx_v_connection_params); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_734midi_thru_connection_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_736midi_thru_connection_get_params(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_738midi_thru_connection_set_params(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection, PyObject *__pyx_v_connection_params); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_740midi_thru_connection_find(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_persistent_owner_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_742get_midi_transform_none(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_744get_midi_transform_filter_out(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_746get_midi_transform_map_control(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_748get_midi_transform_add(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_750get_midi_transform_scale(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_752get_midi_transform_min_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_754get_midi_transform_max_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_756get_midi_transform_map_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_758get_midi_control_type_7bit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_760get_midi_control_type_14bit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_762get_midi_control_type_7bit_rpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_764get_midi_control_type_14bit_rpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_766get_midi_control_type_7bit_nrpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_768get_midi_control_type_14bit_nrpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_770get_midi_thru_connection_max_endpoints(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_9coremusic_4capi_15CoreAudioObject___cinit__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static void __pyx_pf_9coremusic_4capi_15CoreAudioObject_2__dealloc__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_11is_disposed___get__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_4dispose(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_9object_id___get__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_8_set_object_id(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self, PyObject *__pyx_v_object_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_772au_graph_new(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_774au_graph_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_776au_graph_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_778au_graph_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_780au_graph_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_782au_graph_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_784au_graph_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_786au_graph_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_788au_graph_is_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_790au_graph_is_initialized(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_792au_graph_is_running(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_794au_graph_add_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, PyObject *__pyx_v_description); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_796au_graph_remove_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_node_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_798au_graph_get_node_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_800au_graph_get_ind_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_802au_graph_node_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_node_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_804au_graph_connect_node_input(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_source_node, int __pyx_v_source_output, int __pyx_v_dest_node, int __pyx_v_dest_input); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_806au_graph_disconnect_node_input(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_dest_node, int __pyx_v_dest_input); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_808au_graph_clear_connections(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_810au_graph_update(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_812au_graph_get_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_814au_graph_get_max_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_816get_au_graph_err_node_not_found(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_818get_au_graph_err_invalid_connection(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_820get_au_graph_err_output_node_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_822get_au_graph_err_cannot_do_in_current_context(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_824get_au_graph_err_invalid_audio_unit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_826ca_clock_new(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_828ca_clock_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_830ca_clock_get_current_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id, int __pyx_v_time_format); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_832ca_clock_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_834ca_clock_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_836ca_clock_set_play_rate(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id, double __pyx_v_rate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_838ca_clock_get_play_rate(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_840get_ca_clock_time_format_host_time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_842get_ca_clock_time_format_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_844get_ca_clock_time_format_beats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_846get_ca_clock_time_format_seconds(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_848get_ca_clock_time_format_smpte_time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_850normalize_audio_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, __pyx_t_9coremusic_4capi_float32_t __pyx_v_target_peak); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_852apply_gain_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain_db); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_854mix_audio_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_output, __Pyx_memviewslice __pyx_v_input1, __Pyx_memviewslice __pyx_v_input2, __pyx_t_9coremusic_4capi_float32_t __pyx_v_mix_ratio); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_856convert_float32_to_int16(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_float_data, __Pyx_memviewslice __pyx_v_int_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_858convert_int16_to_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_int_data, __Pyx_memviewslice __pyx_v_float_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_860stereo_to_mono_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_stereo_data, __Pyx_memviewslice __pyx_v_mono_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_862mono_to_stereo_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_mono_data, __Pyx_memviewslice __pyx_v_stereo_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_864apply_fade_in_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, int __pyx_v_fade_frames); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_866apply_fade_out_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, int __pyx_v_fade_frames); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_868calculate_rms_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_870calculate_peak_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_872normalize_audio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data, float __pyx_v_target_peak); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_874apply_gain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data, float __pyx_v_gain_db); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_876calculate_rms(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_878calculate_peak(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data); /* proto */
static PyObject *__pyx_tp_new_9coremusic_4capi_AudioPlayer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9coremusic_4capi_AudioRecorder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9coremusic_4capi_CoreAudioObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyObject *__pyx_type_9coremusic_4capi_AudioPlayer;
  PyObject *__pyx_type_9coremusic_4capi_AudioRecorder;
  PyObject *__pyx_type_9coremusic_4capi_CoreAudioObject;
  PyObject *__pyx_type___pyx_array;
  PyObject *__pyx_type___pyx_MemviewEnum;
  PyObject *__pyx_type___pyx_memoryview;
  PyObject *__pyx_type___pyx_memoryviewslice;
  PyTypeObject *__pyx_ptype_9coremusic_4capi_AudioPlayer;
  PyTypeObject *__pyx_ptype_9coremusic_4capi_AudioRecorder;
  PyTypeObject *__pyx_ptype_9coremusic_4capi_CoreAudioObject;
  PyTypeObject *__pyx_array_type;
  PyTypeObject *__pyx_MemviewEnum_type;
  PyTypeObject *__pyx_memoryview_type;
  PyTypeObject *__pyx_memoryviewslice_type;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  PyObject *__pyx_slice[1];
  PyObject *__pyx_tuple[19];
  PyObject *__pyx_codeobj_tab[470];
  PyObject *__pyx_string_tab[1520];
  PyObject *__pyx_number_tab[21];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_All_dimensions_preceding_dimensi __pyx_string_tab[1]
#define __pyx_kp_u_Apply_gain_in_decibels_NumPy_wra __pyx_string_tab[2]
#define __pyx_kp_u_AudioFileGetProperty_MaximumPack __pyx_string_tab[3]
#define __pyx_kp_u_AudioPlayer_not_initialized_Call __pyx_string_tab[4]
#define __pyx_kp_u_AudioRecorder_not_initialized_Ca __pyx_string_tab[5]
#define __pyx_kp_u_AudioUnitGetProperty_ParameterIn __pyx_string_tab[6]
#define __pyx_kp_u_AudioUnitSetProperty_PresentPres __pyx_string_tab[7]
#define __pyx_kp_u_BPM_must_be_greater_than_zero __pyx_string_tab[8]
#define __pyx_kp_u_Buffer_too_small __pyx_string_tab[9]
#define __pyx_kp_u_Buffer_view_does_not_expose_stri __pyx_string_tab[10]
#define __pyx_kp_u_Calculate_RMS_level_NumPy_wrappe __pyx_string_tab[11]
#define __pyx_kp_u_Calculate_peak_level_NumPy_wrapp __pyx_string_tab[12]
#define __pyx_kp_u_Can_only_create_a_buffer_that_is __pyx_string_tab[13]
#define __pyx_kp_u_Cannot_assign_to_read_only_memor __pyx_string_tab[14]
#define __pyx_kp_u_Cannot_create_writable_memory_vi __pyx_string_tab[15]
#define __pyx_kp_u_Cannot_find_default_output_Audio __pyx_string_tab[16]
#define __pyx_kp_u_Cannot_index_with_type __pyx_string_tab[17]
#define __pyx_kp_u_Cannot_transpose_memoryview_with __pyx_string_tab[18]
#define __pyx_kp_u_Convert_audio_data_directly_into __pyx_string_tab[19]
#define __pyx_kp_u_Convert_audio_using_callback_bas __pyx_string_tab[20]
#define __pyx_kp_u_Convert_fourcc_chars_to_an_int_f __pyx_string_tab[21]
#define __pyx_kp_u_Could_not_add_packet_to_packet_l __pyx_string_tab[22]
#define __pyx_kp_u_Could_not_allocate_AudioBufferLi __pyx_string_tab[23]
#define __pyx_kp_u_Could_not_allocate_audio_buffer __pyx_string_tab[24]
#define __pyx_kp_u_Could_not_allocate_audio_buffer_2 __pyx_string_tab[25]
#define __pyx_kp_u_Could_not_allocate_buffer_for_pa __pyx_string_tab[26]
#define __pyx_kp_u_Could_not_allocate_buffer_for_pr __pyx_string_tab[27]
#define __pyx_kp_u_Could_not_allocate_buffer_for_st __pyx_string_tab[28]
#define __pyx_kp_u_Could_not_allocate_memory_for_no __pyx_string_tab[29]
#define __pyx_kp_u_Could_not_allocate_memory_for_pr __pyx_string_tab[30]
#define __pyx_kp_u_Could_not_allocate_packet_list __pyx_string_tab[31]
#define __pyx_kp_u_Could_not_allocate_parameter_lis __pyx_string_tab[32]
#define __pyx_kp_u_Could_not_allocate_recording_buf __pyx_string_tab[33]
#define __pyx_kp_u_Could_not_convert_CFString_to_C __pyx_string_tab[34]
#define __pyx_kp_u_Could_not_create_AudioUnit_insta __pyx_string_tab[35]
#define __pyx_kp_u_Could_not_create_CFString_from_n __pyx_string_tab[36]
#define __pyx_kp_u_Could_not_create_CFString_from_p __pyx_string_tab[37]
#define __pyx_kp_u_Could_not_create_CFString_from_p_2 __pyx_string_tab[38]
#define __pyx_kp_u_Could_not_create_CFString_from_v __pyx_string_tab[39]
#define __pyx_kp_u_Could_not_create_URL_for_file __pyx_string_tab[40]
#define __pyx_kp_u_Could_not_create_URL_from_file_p __pyx_string_tab[41]
#define __pyx_kp_u_Could_not_create_URL_from_file_p_2 __pyx_string_tab[42]
#define __pyx_kp_u_Could_not_create_audio_file __pyx_string_tab[43]
#define __pyx_kp_u_Could_not_create_audio_input_que __pyx_string_tab[44]
#define __pyx_kp_u_Could_not_enqueue_audio_buffer __pyx_string_tab[45]
#define __pyx_kp_u_Could_not_get_file_format __pyx_string_tab[46]
#define __pyx_kp_u_Could_not_get_file_length __pyx_string_tab[47]
#define __pyx_kp_u_Could_not_get_maximum_packet_siz __pyx_string_tab[48]
#define __pyx_kp_u_Could_not_initialize_AudioUnit __pyx_string_tab[49]
#define __pyx_kp_u_Could_not_open_audio_file __pyx_string_tab[50]
#define __pyx_kp_u_Could_not_set_client_format __pyx_string_tab[51]
#define __pyx_kp_u_Could_not_set_render_callback __pyx_string_tab[52]
#define __pyx_kp_u_Could_not_set_stream_format __pyx_string_tab[53]
#define __pyx_kp_u_Could_not_start_AudioUnit __pyx_string_tab[54]
#define __pyx_kp_u_Could_not_start_audio_queue __pyx_string_tab[55]
#define __pyx_kp_u_Could_not_stop_AudioUnit __pyx_string_tab[56]
#define __pyx_kp_u_Could_not_stop_audio_queue __pyx_string_tab[57]
#define __pyx_kp_u_Could_not_write_audio_data __pyx_string_tab[58]
#define __pyx_kp_u_Data_must_be_int_or_bytes __pyx_string_tab[59]
#define __pyx_kp_u_Destination_index __pyx_string_tab[60]
#define __pyx_kp_u_Device_index __pyx_string_tab[61]
#define __pyx_kp_u_Dimension_d_is_not_direct __pyx_string_tab[62]
#define __pyx_kp_u_Empty_shape_tuple_for_cython_arr __pyx_string_tab[63]
#define __pyx_kp_u_Entity_index __pyx_string_tab[64]
#define __pyx_kp_u_Failed_to_allocate_AudioBufferLi __pyx_string_tab[65]
#define __pyx_kp_u_Failed_to_allocate_buffer __pyx_string_tab[66]
#define __pyx_kp_u_Failed_to_allocate_output_buffer __pyx_string_tab[67]
#define __pyx_kp_u_Failed_to_allocate_read_buffer __pyx_string_tab[68]
#define __pyx_kp_u_Failed_to_create_URL_from_path __pyx_string_tab[69]
#define __pyx_kp_u_Failed_to_get_device_at_index __pyx_string_tab[70]
#define __pyx_kp_u_Index_out_of_bounds_axis_d __pyx_string_tab[71]
#define __pyx_kp_u_Indirect_dimensions_not_supporte __pyx_string_tab[72]
#define __pyx_kp_u_Input_buffer_too_small __pyx_string_tab[73]
#define __pyx_kp_u_Invalid_connection_parameters_da __pyx_string_tab[74]
#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_string_tab[75]
#define __pyx_kp_u_Invalid_shape_in_axis __pyx_string_tab[76]
#define __pyx_kp_u_MIDI_data_too_large_max_256_byte __pyx_string_tab[77]
#define __pyx_kp_u_MemoryView_of __pyx_string_tab[78]
#define __pyx_kp_u_MusicDeviceMIDIEvent_failed_with __pyx_string_tab[79]
#define __pyx_kp_u_MusicTrackNewMIDIChannelEvent_fa __pyx_string_tab[80]
#define __pyx_kp_u_No_audio_data_to_save __pyx_string_tab[81]
#define __pyx_kp_u_None __pyx_string_tab[82]
#define __pyx_kp_u_Normalize_audio_to_target_peak_l __pyx_string_tab[83]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[84]
#define __pyx_kp_u_OSStatus_error_in __pyx_string_tab[85]
#define __pyx_kp_u_Operation_failed __pyx_string_tab[86]
#define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_string_tab[87]
#define __pyx_kp_u_Output_buffer_too_small __pyx_string_tab[88]
#define __pyx_kp_u_Parse_buffer_data_through_the_Au __pyx_string_tab[89]
#define __pyx_kp_u_Process_audio_through_an_AudioUn __pyx_string_tab[90]
#define __pyx_kp_u_Read_audio_frames_from_ExtendedA __pyx_string_tab[91]
#define __pyx_kp_u_Read_packets_from_an_audio_file __pyx_string_tab[92]
#define __pyx_kp_u_Scale_rate_must_be_greater_than __pyx_string_tab[93]
#define __pyx_kp_u_Source_index __pyx_string_tab[94]
#define __pyx_kp_u_Step_may_not_be_zero_axis_d __pyx_string_tab[95]
#define __pyx_kp_u_Unable_to_convert_item_to_object __pyx_string_tab[96]
#define __pyx_kp_u__2 __pyx_string_tab[97]
#define __pyx_kp_u__3 __pyx_string_tab[98]
#define __pyx_kp_u__4 __pyx_string_tab[99]
#define __pyx_kp_u__5 __pyx_string_tab[100]
#define __pyx_kp_u__6 __pyx_string_tab[101]
#define __pyx_kp_u__7 __pyx_string_tab[102]
#define __pyx_kp_u__8 __pyx_string_tab[103]
#define __pyx_kp_u__9 __pyx_string_tab[104]
#define __pyx_kp_u_add_note __pyx_string_tab[105]
#define __pyx_kp_u_and __pyx_string_tab[106]
#define __pyx_kp_u_apply_gain_line_7988 __pyx_string_tab[107]
#define __pyx_kp_u_at_0x __pyx_string_tab[108]
#define __pyx_kp_u_audio_converter_convert_buffer_i_2 __pyx_string_tab[109]
#define __pyx_kp_u_audio_converter_fill_complex_buf_3 __pyx_string_tab[110]
#define __pyx_kp_u_audio_file_read_packets_into_lin __pyx_string_tab[111]
#define __pyx_kp_u_audio_file_stream_parse_buffer_l __pyx_string_tab[112]
#define __pyx_kp_u_audio_unit_render_into_line_2522 __pyx_string_tab[113]
#define __pyx_kp_u_bytes_provided_but __pyx_string_tab[114]
#define __pyx_kp_u_bytes_required_for __pyx_string_tab[115]
#define __pyx_kp_u_calculate_peak_line_8044 __pyx_string_tab[116]
#define __pyx_kp_u_calculate_rms_line_8017 __pyx_string_tab[117]
#define __pyx_kp_u_channels_4_bytes_sample __pyx_string_tab[118]
#define __pyx_kp_u_collections_abc __pyx_string_tab[119]
#define __pyx_kp_u_contiguous_and_direct __pyx_string_tab[120]
#define __pyx_kp_u_contiguous_and_indirect __pyx_string_tab[121]
#define __pyx_kp_u_convert_int_to_fourcc_4_chars_in __pyx_string_tab[122]
#define __pyx_kp_u_coremusic __pyx_string_tab[123]
#define __pyx_kp_u_data_must_be_bytes __pyx_string_tab[124]
#define __pyx_kp_u_disable __pyx_string_tab[125]
#define __pyx_kp_u_enable __pyx_string_tab[126]
#define __pyx_kp_u_extended_audio_file_read_into_li __pyx_string_tab[127]
#define __pyx_kp_u_failed __pyx_string_tab[128]
#define __pyx_kp_u_fourchar_to_int_line_197 __pyx_string_tab[129]
#define __pyx_kp_u_frames __pyx_string_tab[130]
#define __pyx_kp_u_frames_2 __pyx_string_tab[131]
#define __pyx_kp_u_gc __pyx_string_tab[132]
#define __pyx_kp_u_got __pyx_string_tab[133]
#define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_string_tab[134]
#define __pyx_kp_u_has_been_disposed __pyx_string_tab[135]
#define __pyx_kp_u_int_to_fourchar_line_207 __pyx_string_tab[136]
#define __pyx_kp_u_isenabled __pyx_string_tab[137]
#define __pyx_kp_u_itemsize_0_for_cython_array __pyx_string_tab[138]
#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[139]
#define __pyx_kp_u_normalize_audio_line_7959 __pyx_string_tab[140]
#define __pyx_kp_u_object __pyx_string_tab[141]
#define __pyx_kp_u_out_of_bounds_0 __pyx_string_tab[142]
#define __pyx_kp_u_out_of_range_0 __pyx_string_tab[143]
#define __pyx_kp_u_packets_max_packet_size __pyx_string_tab[144]
#define __pyx_kp_u_self_audio_queue_self_buffers_se __pyx_string_tab[145]
#define __pyx_kp_u_self_name_is_not_None __pyx_string_tab[146]
#define __pyx_kp_u_self_output_unit_self_player_dat __pyx_string_tab[147]
#define __pyx_kp_u_should_be_four_characters_only __pyx_string_tab[148]
#define __pyx_kp_u_src_coremusic_capi_pyx __pyx_string_tab[149]
#define __pyx_kp_u_strided_and_direct __pyx_string_tab[150]
#define __pyx_kp_u_strided_and_direct_or_indirect __pyx_string_tab[151]
#define __pyx_kp_u_strided_and_indirect __pyx_string_tab[152]
#define __pyx_kp_u_stringsource __pyx_string_tab[153]
#define __pyx_kp_u_unable_to_allocate_array_data __pyx_string_tab[154]
#define __pyx_kp_u_unable_to_allocate_shape_and_str __pyx_string_tab[155]
#define __pyx_kp_u_utf_8 __pyx_string_tab[156]
#define __pyx_n_u_ASCII __pyx_string_tab[157]
#define __pyx_n_u_AUGraphAddNode __pyx_string_tab[158]
#define __pyx_n_u_AUGraphClearConnections __pyx_string_tab[159]
#define __pyx_n_u_AUGraphClose __pyx_string_tab[160]
#define __pyx_n_u_AUGraphConnectNodeInput __pyx_string_tab[161]
#define __pyx_n_u_AUGraphDisconnectNodeInput __pyx_string_tab[162]
#define __pyx_n_u_AUGraphGetCPULoad __pyx_string_tab[163]
#define __pyx_n_u_AUGraphGetIndNode __pyx_string_tab[164]
#define __pyx_n_u_AUGraphGetMaxCPULoad __pyx_string_tab[165]
#define __pyx_n_u_AUGraphGetNodeCount __pyx_string_tab[166]
#define __pyx_n_u_AUGraphInitialize __pyx_string_tab[167]
#define __pyx_n_u_AUGraphIsInitialized __pyx_string_tab[168]
#define __pyx_n_u_AUGraphIsOpen __pyx_string_tab[169]
#define __pyx_n_u_AUGraphIsRunning __pyx_string_tab[170]
#define __pyx_n_u_AUGraphNodeInfo __pyx_string_tab[171]
#define __pyx_n_u_AUGraphOpen __pyx_string_tab[172]
#define __pyx_n_u_AUGraphRemoveNode __pyx_string_tab[173]
#define __pyx_n_u_AUGraphStart __pyx_string_tab[174]
#define __pyx_n_u_AUGraphStop __pyx_string_tab[175]
#define __pyx_n_u_AUGraphUninitialize __pyx_string_tab[176]
#define __pyx_n_u_AUGraphUpdate __pyx_string_tab[177]
#define __pyx_n_u_AudioComponentCopyName __pyx_string_tab[178]
#define __pyx_n_u_AudioComponentGetDescription __pyx_string_tab[179]
#define __pyx_n_u_AudioComponentInstanceDispose __pyx_string_tab[180]
#define __pyx_n_u_AudioComponentInstanceNew __pyx_string_tab[181]
#define __pyx_n_u_AudioConverterConvertBuffer __pyx_string_tab[182]
#define __pyx_n_u_AudioConverterDispose __pyx_string_tab[183]
#define __pyx_n_u_AudioConverterFillComplexBuffer __pyx_string_tab[184]
#define __pyx_n_u_AudioConverterGetProperty __pyx_string_tab[185]
#define __pyx_n_u_AudioConverterGetPropertyInfo __pyx_string_tab[186]
#define __pyx_n_u_AudioConverterNew __pyx_string_tab[187]
#define __pyx_n_u_AudioConverterReset __pyx_string_tab[188]
#define __pyx_n_u_AudioConverterSetProperty __pyx_string_tab[189]
#define __pyx_n_u_AudioFileClose __pyx_string_tab[190]
#define __pyx_n_u_AudioFileGetProperty __pyx_string_tab[191]
#define __pyx_n_u_AudioFileGetPropertyInfo __pyx_string_tab[192]
#define __pyx_n_u_AudioFileOpenURL __pyx_string_tab[193]
#define __pyx_n_u_AudioFileReadPackets __pyx_string_tab[194]
#define __pyx_n_u_AudioFileStreamClose __pyx_string_tab[195]
#define __pyx_n_u_AudioFileStreamGetProperty __pyx_string_tab[196]
#define __pyx_n_u_AudioFileStreamGetPropertyInfo __pyx_string_tab[197]
#define __pyx_n_u_AudioFileStreamOpen __pyx_string_tab[198]
#define __pyx_n_u_AudioFileStreamParseBytes __pyx_string_tab[199]
#define __pyx_n_u_AudioFileStreamSeek __pyx_string_tab[200]
#define __pyx_n_u_AudioObjectGetPropertyData __pyx_string_tab[201]
#define __pyx_n_u_AudioObjectGetPropertyDataSize __pyx_string_tab[202]
#define __pyx_n_u_AudioObjectSetPropertyData __pyx_string_tab[203]
#define __pyx_n_u_AudioOutputUnitStart __pyx_string_tab[204]
#define __pyx_n_u_AudioOutputUnitStop __pyx_string_tab[205]
#define __pyx_n_u_AudioPlayer __pyx_string_tab[206]
#define __pyx_n_u_AudioPlayer___reduce_cython __pyx_string_tab[207]
#define __pyx_n_u_AudioPlayer___setstate_cython __pyx_string_tab[208]
#define __pyx_n_u_AudioPlayer_get_link_timing __pyx_string_tab[209]
#define __pyx_n_u_AudioPlayer_get_progress __pyx_string_tab[210]
#define __pyx_n_u_AudioPlayer_is_playing __pyx_string_tab[211]
#define __pyx_n_u_AudioPlayer_load_file __pyx_string_tab[212]
#define __pyx_n_u_AudioPlayer_play __pyx_string_tab[213]
#define __pyx_n_u_AudioPlayer_reset_playback __pyx_string_tab[214]
#define __pyx_n_u_AudioPlayer_set_looping __pyx_string_tab[215]
#define __pyx_n_u_AudioPlayer_setup_output __pyx_string_tab[216]
#define __pyx_n_u_AudioPlayer_start __pyx_string_tab[217]
#define __pyx_n_u_AudioPlayer_stop __pyx_string_tab[218]
#define __pyx_n_u_AudioQueueAllocateBuffer __pyx_string_tab[219]
#define __pyx_n_u_AudioQueueDispose __pyx_string_tab[220]
#define __pyx_n_u_AudioQueueEnqueueBuffer __pyx_string_tab[221]
#define __pyx_n_u_AudioQueueNewOutput __pyx_string_tab[222]
#define __pyx_n_u_AudioQueueStart __pyx_string_tab[223]
#define __pyx_n_u_AudioQueueStop __pyx_string_tab[224]
#define __pyx_n_u_AudioRecorder __pyx_string_tab[225]
#define __pyx_n_u_AudioRecorder___reduce_cython __pyx_string_tab[226]
#define __pyx_n_u_AudioRecorder___setstate_cython __pyx_string_tab[227]
#define __pyx_n_u_AudioRecorder_get_audio_data __pyx_string_tab[228]
#define __pyx_n_u_AudioRecorder_get_progress __pyx_string_tab[229]
#define __pyx_n_u_AudioRecorder_get_recorded_durat __pyx_string_tab[230]
#define __pyx_n_u_AudioRecorder_get_recorded_frame __pyx_string_tab[231]
#define __pyx_n_u_AudioRecorder_has_audio_content __pyx_string_tab[232]
#define __pyx_n_u_AudioRecorder_is_recording __pyx_string_tab[233]
#define __pyx_n_u_AudioRecorder_run_loop __pyx_string_tab[234]
#define __pyx_n_u_AudioRecorder_save_to_file __pyx_string_tab[235]
#define __pyx_n_u_AudioRecorder_setup_input __pyx_string_tab[236]
#define __pyx_n_u_AudioRecorder_start __pyx_string_tab[237]
#define __pyx_n_u_AudioRecorder_stop __pyx_string_tab[238]
#define __pyx_n_u_AudioServicesCreateSystemSoundID __pyx_string_tab[239]
#define __pyx_n_u_AudioServicesDisposeSystemSoundI __pyx_string_tab[240]
#define __pyx_n_u_AudioServicesGetProperty __pyx_string_tab[241]
#define __pyx_n_u_AudioServicesGetPropertyInfo __pyx_string_tab[242]
#define __pyx_n_u_AudioServicesSetProperty __pyx_string_tab[243]
#define __pyx_n_u_AudioUnitGetParameter __pyx_string_tab[244]
#define __pyx_n_u_AudioUnitGetProperty __pyx_string_tab[245]
#define __pyx_n_u_AudioUnitGetPropertyInfo __pyx_string_tab[246]
#define __pyx_n_u_AudioUnitInitialize __pyx_string_tab[247]
#define __pyx_n_u_AudioUnitRender __pyx_string_tab[248]
#define __pyx_n_u_AudioUnitSetParameter __pyx_string_tab[249]
#define __pyx_n_u_AudioUnitSetProperty __pyx_string_tab[250]
#define __pyx_n_u_AudioUnitUninitialize __pyx_string_tab[251]
#define __pyx_n_u_CAClockDispose __pyx_string_tab[252]
#define __pyx_n_u_CAClockGetCurrentTime __pyx_string_tab[253]
#define __pyx_n_u_CAClockGetPlayRate __pyx_string_tab[254]
#define __pyx_n_u_CAClockNew __pyx_string_tab[255]
#define __pyx_n_u_CAClockSetPlayRate __pyx_string_tab[256]
#define __pyx_n_u_CAClockStart __pyx_string_tab[257]
#define __pyx_n_u_CAClockStop __pyx_string_tab[258]
#define __pyx_n_u_CoreAudioObject __pyx_string_tab[259]
#define __pyx_n_u_CoreAudioObject___reduce_cython __pyx_string_tab[260]
#define __pyx_n_u_CoreAudioObject___setstate_cytho __pyx_string_tab[261]
#define __pyx_n_u_CoreAudioObject__ensure_not_disp __pyx_string_tab[262]
#define __pyx_n_u_CoreAudioObject__set_object_id __pyx_string_tab[263]
#define __pyx_n_u_CoreAudioObject_dispose __pyx_string_tab[264]
#define __pyx_n_u_DisposeAUGraph __pyx_string_tab[265]
#define __pyx_n_u_DisposeMusicPlayer __pyx_string_tab[266]
#define __pyx_n_u_DisposeMusicSequence __pyx_string_tab[267]
#define __pyx_n_u_Ellipsis __pyx_string_tab[268]
#define __pyx_n_u_ExtAudioFileCreateWithURL __pyx_string_tab[269]
#define __pyx_n_u_ExtAudioFileDispose __pyx_string_tab[270]
#define __pyx_n_u_ExtAudioFileGetProperty __pyx_string_tab[271]
#define __pyx_n_u_ExtAudioFileOpenURL __pyx_string_tab[272]
#define __pyx_n_u_ExtAudioFileRead __pyx_string_tab[273]
#define __pyx_n_u_ExtAudioFileSetProperty __pyx_string_tab[274]
#define __pyx_n_u_ExtAudioFileWrite __pyx_string_tab[275]
#define __pyx_n_u_MIDIClientCreate __pyx_string_tab[276]
#define __pyx_n_u_MIDIClientDispose __pyx_string_tab[277]
#define __pyx_n_u_MIDIDestinationCreate __pyx_string_tab[278]
#define __pyx_n_u_MIDIDeviceAddEntity __pyx_string_tab[279]
#define __pyx_n_u_MIDIDeviceCreate __pyx_string_tab[280]
#define __pyx_n_u_MIDIDeviceDispose __pyx_string_tab[281]
#define __pyx_n_u_MIDIDeviceListAddDevice __pyx_string_tab[282]
#define __pyx_n_u_MIDIDeviceListDispose __pyx_string_tab[283]
#define __pyx_n_u_MIDIDeviceNewEntity __pyx_string_tab[284]
#define __pyx_n_u_MIDIDeviceRemoveEntity __pyx_string_tab[285]
#define __pyx_n_u_MIDIDriverEnableMonitoring __pyx_string_tab[286]
#define __pyx_n_u_MIDIEndpointDispose __pyx_string_tab[287]
#define __pyx_n_u_MIDIEndpointGetRefCons __pyx_string_tab[288]
#define __pyx_n_u_MIDIEndpointSetRefCons __pyx_string_tab[289]
#define __pyx_n_u_MIDIEntityAddOrRemoveEndpoints __pyx_string_tab[290]
#define __pyx_n_u_MIDIExternalDeviceCreate __pyx_string_tab[291]
#define __pyx_n_u_MIDIInputPortCreate __pyx_string_tab[292]
#define __pyx_n_u_MIDIObjectGetIntegerProperty __pyx_string_tab[293]
#define __pyx_n_u_MIDIObjectGetStringProperty __pyx_string_tab[294]
#define __pyx_n_u_MIDIObjectSetIntegerProperty __pyx_string_tab[295]
#define __pyx_n_u_MIDIObjectSetStringProperty __pyx_string_tab[296]
#define __pyx_n_u_MIDIOutputPortCreate __pyx_string_tab[297]
#define __pyx_n_u_MIDIPortConnectSource __pyx_string_tab[298]
#define __pyx_n_u_MIDIPortDisconnectSource __pyx_string_tab[299]
#define __pyx_n_u_MIDIPortDispose __pyx_string_tab[300]
#define __pyx_n_u_MIDISend __pyx_string_tab[301]
#define __pyx_n_u_MIDISetupAddDevice __pyx_string_tab[302]
#define __pyx_n_u_MIDISetupAddExternalDevice __pyx_string_tab[303]
#define __pyx_n_u_MIDISetupRemoveDevice __pyx_string_tab[304]
#define __pyx_n_u_MIDISetupRemoveExternalDevice __pyx_string_tab[305]
#define __pyx_n_u_MIDISourceCreate __pyx_string_tab[306]
#define __pyx_n_u_MIDIThruConnectionCreate __pyx_string_tab[307]
#define __pyx_n_u_MIDIThruConnectionDispose __pyx_string_tab[308]
#define __pyx_n_u_MIDIThruConnectionFind __pyx_string_tab[309]
#define __pyx_n_u_MIDIThruConnectionGetParams __pyx_string_tab[310]
#define __pyx_n_u_MIDIThruConnectionSetParams __pyx_string_tab[311]
#define __pyx_n_u_MusicDeviceStartNote __pyx_string_tab[312]
#define __pyx_n_u_MusicDeviceStopNote __pyx_string_tab[313]
#define __pyx_n_u_MusicDeviceSysEx __pyx_string_tab[314]
#define __pyx_n_u_MusicPlayerGetPlayRateScalar __pyx_string_tab[315]
#define __pyx_n_u_MusicPlayerGetSequence __pyx_string_tab[316]
#define __pyx_n_u_MusicPlayerGetTime __pyx_string_tab[317]
#define __pyx_n_u_MusicPlayerIsPlaying __pyx_string_tab[318]
#define __pyx_n_u_MusicPlayerPreroll __pyx_string_tab[319]
#define __pyx_n_u_MusicPlayerSetPlayRateScalar __pyx_string_tab[320]
#define __pyx_n_u_MusicPlayerSetSequence __pyx_string_tab[321]
#define __pyx_n_u_MusicPlayerSetTime __pyx_string_tab[322]
#define __pyx_n_u_MusicPlayerStart __pyx_string_tab[323]
#define __pyx_n_u_MusicPlayerStop __pyx_string_tab[324]
#define __pyx_n_u_MusicSequenceDisposeTrack __pyx_string_tab[325]
#define __pyx_n_u_MusicSequenceFileLoad __pyx_string_tab[326]
#define __pyx_n_u_MusicSequenceGetIndTrack __pyx_string_tab[327]
#define __pyx_n_u_MusicSequenceGetSequenceType __pyx_string_tab[328]
#define __pyx_n_u_MusicSequenceGetTempoTrack __pyx_string_tab[329]
#define __pyx_n_u_MusicSequenceGetTrackCount __pyx_string_tab[330]
#define __pyx_n_u_MusicSequenceNewTrack __pyx_string_tab[331]
#define __pyx_n_u_MusicSequenceSetSequenceType __pyx_string_tab[332]
#define __pyx_n_u_MusicTrackNewExtendedTempoEvent __pyx_string_tab[333]
#define __pyx_n_u_MusicTrackNewMIDINoteEvent __pyx_string_tab[334]
#define __pyx_n_u_NewAUGraph __pyx_string_tab[335]
#define __pyx_n_u_NewMusicPlayer __pyx_string_tab[336]
#define __pyx_n_u_NewMusicSequence __pyx_string_tab[337]
#define __pyx_n_u_None __pyx_string_tab[338]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[339]
#define __pyx_n_u_Sequence __pyx_string_tab[340]
#define __pyx_n_u_View_MemoryView __pyx_string_tab[341]
#define __pyx_n_u__7 __pyx_string_tab[342]
#define __pyx_n_u_abc __pyx_string_tab[343]
#define __pyx_n_u_abs_val __pyx_string_tab[344]
#define __pyx_n_u_actual_bytes __pyx_string_tab[345]
#define __pyx_n_u_actual_fade __pyx_string_tab[346]
#define __pyx_n_u_actual_size __pyx_string_tab[347]
#define __pyx_n_u_address __pyx_string_tab[348]
#define __pyx_n_u_allocate_buffer __pyx_string_tab[349]
#define __pyx_n_u_append __pyx_string_tab[350]
#define __pyx_n_u_apply_fade_in_float32 __pyx_string_tab[351]
#define __pyx_n_u_apply_fade_out_float32 __pyx_string_tab[352]
#define __pyx_n_u_apply_gain __pyx_string_tab[353]
#define __pyx_n_u_apply_gain_float32 __pyx_string_tab[354]
#define __pyx_n_u_argCount __pyx_string_tab[355]
#define __pyx_n_u_arg_count __pyx_string_tab[356]
#define __pyx_n_u_asbd __pyx_string_tab[357]
#define __pyx_n_u_astype __pyx_string_tab[358]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[359]
#define __pyx_n_u_attribute_data __pyx_string_tab[360]
#define __pyx_n_u_attribute_type __pyx_string_tab[361]
#define __pyx_n_u_au_graph_add_node __pyx_string_tab[362]
#define __pyx_n_u_au_graph_clear_connections __pyx_string_tab[363]
#define __pyx_n_u_au_graph_close __pyx_string_tab[364]
#define __pyx_n_u_au_graph_connect_node_input __pyx_string_tab[365]
#define __pyx_n_u_au_graph_disconnect_node_input __pyx_string_tab[366]
#define __pyx_n_u_au_graph_dispose __pyx_string_tab[367]
#define __pyx_n_u_au_graph_get_cpu_load __pyx_string_tab[368]
#define __pyx_n_u_au_graph_get_ind_node __pyx_string_tab[369]
#define __pyx_n_u_au_graph_get_max_cpu_load __pyx_string_tab[370]
#define __pyx_n_u_au_graph_get_node_count __pyx_string_tab[371]
#define __pyx_n_u_au_graph_initialize __pyx_string_tab[372]
#define __pyx_n_u_au_graph_is_initialized __pyx_string_tab[373]
#define __pyx_n_u_au_graph_is_open __pyx_string_tab[374]
#define __pyx_n_u_au_graph_is_running __pyx_string_tab[375]
#define __pyx_n_u_au_graph_new __pyx_string_tab[376]
#define __pyx_n_u_au_graph_node_info __pyx_string_tab[377]
#define __pyx_n_u_au_graph_open __pyx_string_tab[378]
#define __pyx_n_u_au_graph_remove_node __pyx_string_tab[379]
#define __pyx_n_u_au_graph_start __pyx_string_tab[380]
#define __pyx_n_u_au_graph_stop __pyx_string_tab[381]
#define __pyx_n_u_au_graph_uninitialize __pyx_string_tab[382]
#define __pyx_n_u_au_graph_update __pyx_string_tab[383]
#define __pyx_n_u_audio_component_copy_name __pyx_string_tab[384]
#define __pyx_n_u_audio_component_find_next __pyx_string_tab[385]
#define __pyx_n_u_audio_component_get_description __pyx_string_tab[386]
#define __pyx_n_u_audio_component_instance_dispose __pyx_string_tab[387]
#define __pyx_n_u_audio_component_instance_new __pyx_string_tab[388]
#define __pyx_n_u_audio_converter_convert_buffer __pyx_string_tab[389]
#define __pyx_n_u_audio_converter_convert_buffer_i __pyx_string_tab[390]
#define __pyx_n_u_audio_converter_dispose __pyx_string_tab[391]
#define __pyx_n_u_audio_converter_fill_complex_buf __pyx_string_tab[392]
#define __pyx_n_u_audio_converter_fill_complex_buf_2 __pyx_string_tab[393]
#define __pyx_n_u_audio_converter_get_property __pyx_string_tab[394]
#define __pyx_n_u_audio_converter_new __pyx_string_tab[395]
#define __pyx_n_u_audio_converter_reset __pyx_string_tab[396]
#define __pyx_n_u_audio_converter_set_property __pyx_string_tab[397]
#define __pyx_n_u_audio_data __pyx_string_tab[398]
#define __pyx_n_u_audio_file __pyx_string_tab[399]
#define __pyx_n_u_audio_file_close __pyx_string_tab[400]
#define __pyx_n_u_audio_file_get_property __pyx_string_tab[401]
#define __pyx_n_u_audio_file_id __pyx_string_tab[402]
#define __pyx_n_u_audio_file_open_url __pyx_string_tab[403]
#define __pyx_n_u_audio_file_read_packets __pyx_string_tab[404]
#define __pyx_n_u_audio_file_read_packets_into __pyx_string_tab[405]
#define __pyx_n_u_audio_file_stream_close __pyx_string_tab[406]
#define __pyx_n_u_audio_file_stream_get_property __pyx_string_tab[407]
#define __pyx_n_u_audio_file_stream_open __pyx_string_tab[408]
#define __pyx_n_u_audio_file_stream_parse_buffer __pyx_string_tab[409]
#define __pyx_n_u_audio_file_stream_parse_bytes __pyx_string_tab[410]
#define __pyx_n_u_audio_file_stream_seek __pyx_string_tab[411]
#define __pyx_n_u_audio_format __pyx_string_tab[412]
#define __pyx_n_u_audio_hardware_destroy_aggregate __pyx_string_tab[413]
#define __pyx_n_u_audio_hardware_get_default_input __pyx_string_tab[414]
#define __pyx_n_u_audio_hardware_get_default_outpu __pyx_string_tab[415]
#define __pyx_n_u_audio_hardware_get_devices __pyx_string_tab[416]
#define __pyx_n_u_audio_hardware_unload __pyx_string_tab[417]
#define __pyx_n_u_audio_object_get_property_data __pyx_string_tab[418]
#define __pyx_n_u_audio_object_get_property_string __pyx_string_tab[419]
#define __pyx_n_u_audio_object_is_property_settabl __pyx_string_tab[420]
#define __pyx_n_u_audio_object_set_property_data __pyx_string_tab[421]
#define __pyx_n_u_audio_object_show __pyx_string_tab[422]
#define __pyx_n_u_audio_output_unit_start __pyx_string_tab[423]
#define __pyx_n_u_audio_output_unit_stop __pyx_string_tab[424]
#define __pyx_n_u_audio_queue_allocate_buffer __pyx_string_tab[425]
#define __pyx_n_u_audio_queue_dispose __pyx_string_tab[426]
#define __pyx_n_u_audio_queue_enqueue_buffer __pyx_string_tab[427]
#define __pyx_n_u_audio_queue_new_output __pyx_string_tab[428]
#define __pyx_n_u_audio_queue_start __pyx_string_tab[429]
#define __pyx_n_u_audio_queue_stop __pyx_string_tab[430]
#define __pyx_n_u_audio_services_create_system_sou __pyx_string_tab[431]
#define __pyx_n_u_audio_services_dispose_system_so __pyx_string_tab[432]
#define __pyx_n_u_audio_services_get_property __pyx_string_tab[433]
#define __pyx_n_u_audio_services_play_alert_sound __pyx_string_tab[434]
#define __pyx_n_u_audio_services_play_system_sound __pyx_string_tab[435]
#define __pyx_n_u_audio_services_set_property __pyx_string_tab[436]
#define __pyx_n_u_audio_unit __pyx_string_tab[437]
#define __pyx_n_u_audio_unit_find_all_components __pyx_string_tab[438]
#define __pyx_n_u_audio_unit_get_component_info __pyx_string_tab[439]
#define __pyx_n_u_audio_unit_get_factory_presets __pyx_string_tab[440]
#define __pyx_n_u_audio_unit_get_parameter __pyx_string_tab[441]
#define __pyx_n_u_audio_unit_get_parameter_info __pyx_string_tab[442]
#define __pyx_n_u_audio_unit_get_parameter_list __pyx_string_tab[443]
#define __pyx_n_u_audio_unit_get_property __pyx_string_tab[444]
#define __pyx_n_u_audio_unit_id __pyx_string_tab[445]
#define __pyx_n_u_audio_unit_initialize __pyx_string_tab[446]
#define __pyx_n_u_audio_unit_render __pyx_string_tab[447]
#define __pyx_n_u_audio_unit_render_into __pyx_string_tab[448]
#define __pyx_n_u_audio_unit_set_current_preset __pyx_string_tab[449]
#define __pyx_n_u_audio_unit_set_parameter __pyx_string_tab[450]
#define __pyx_n_u_audio_unit_set_property __pyx_string_tab[451]
#define __pyx_n_u_audio_unit_uninitialize __pyx_string_tab[452]
#define __pyx_n_u_bank_is_valid __pyx_string_tab[453]
#define __pyx_n_u_bank_lsb __pyx_string_tab[454]
#define __pyx_n_u_bank_msb __pyx_string_tab[455]
#define __pyx_n_u_base __pyx_string_tab[456]
#define __pyx_n_u_beat __pyx_string_tab[457]
#define __pyx_n_u_beat_at_time __pyx_string_tab[458]
#define __pyx_n_u_bits_per_channel __pyx_string_tab[459]
#define __pyx_n_u_bool __pyx_string_tab[460]
#define __pyx_n_u_bpm __pyx_string_tab[461]
#define __pyx_n_u_buffer __pyx_string_tab[462]
#define __pyx_n_u_buffer_id __pyx_string_tab[463]
#define __pyx_n_u_buffer_list __pyx_string_tab[464]
#define __pyx_n_u_buffer_size __pyx_string_tab[465]
#define __pyx_n_u_byte1 __pyx_string_tab[466]
#define __pyx_n_u_byte2 __pyx_string_tab[467]
#define __pyx_n_u_byte3 __pyx_string_tab[468]
#define __pyx_n_u_byte4 __pyx_string_tab[469]
#define __pyx_n_u_byte5 __pyx_string_tab[470]
#define __pyx_n_u_byte6 __pyx_string_tab[471]
#define __pyx_n_u_byte_data __pyx_string_tab[472]
#define __pyx_n_u_byte_offset __pyx_string_tab[473]
#define __pyx_n_u_bytes __pyx_string_tab[474]
#define __pyx_n_u_bytes_per_buffer __pyx_string_tab[475]
#define __pyx_n_u_bytes_per_frame __pyx_string_tab[476]
#define __pyx_n_u_bytes_per_packet __pyx_string_tab[477]
#define __pyx_n_u_bytes_used __pyx_string_tab[478]
#define __pyx_n_u_c __pyx_string_tab[479]
#define __pyx_n_u_c_str __pyx_string_tab[480]
#define __pyx_n_u_ca_clock_dispose __pyx_string_tab[481]
#define __pyx_n_u_ca_clock_get_current_time __pyx_string_tab[482]
#define __pyx_n_u_ca_clock_get_play_rate __pyx_string_tab[483]
#define __pyx_n_u_ca_clock_new __pyx_string_tab[484]
#define __pyx_n_u_ca_clock_set_play_rate __pyx_string_tab[485]
#define __pyx_n_u_ca_clock_start __pyx_string_tab[486]
#define __pyx_n_u_ca_clock_stop __pyx_string_tab[487]
#define __pyx_n_u_calculate_peak __pyx_string_tab[488]
#define __pyx_n_u_calculate_peak_float32 __pyx_string_tab[489]
#define __pyx_n_u_calculate_rms __pyx_string_tab[490]
#define __pyx_n_u_calculate_rms_float32 __pyx_string_tab[491]
#define __pyx_n_u_callback_data __pyx_string_tab[492]
#define __pyx_n_u_callback_struct __pyx_string_tab[493]
#define __pyx_n_u_capture_app_session_state __pyx_string_tab[494]
#define __pyx_n_u_cf_connection_list __pyx_string_tab[495]
#define __pyx_n_u_cf_manufacturer __pyx_string_tab[496]
#define __pyx_n_u_cf_model __pyx_string_tab[497]
#define __pyx_n_u_cf_name __pyx_string_tab[498]
#define __pyx_n_u_cf_owner_id __pyx_string_tab[499]
#define __pyx_n_u_cf_params __pyx_string_tab[500]
#define __pyx_n_u_cf_path __pyx_string_tab[501]
#define __pyx_n_u_cf_prop_name __pyx_string_tab[502]
#define __pyx_n_u_cf_value __pyx_string_tab[503]
#define __pyx_n_u_channel __pyx_string_tab[504]
#define __pyx_n_u_channelMap __pyx_string_tab[505]
#define __pyx_n_u_channelPressure __pyx_string_tab[506]
#define __pyx_n_u_channel_map __pyx_string_tab[507]
#define __pyx_n_u_channels __pyx_string_tab[508]
#define __pyx_n_u_channels_per_frame __pyx_string_tab[509]
#define __pyx_n_u_class __pyx_string_tab[510]
#define __pyx_n_u_class_getitem __pyx_string_tab[511]
#define __pyx_n_u_client __pyx_string_tab[512]
#define __pyx_n_u_client_format __pyx_string_tab[513]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[514]
#define __pyx_n_u_clock __pyx_string_tab[515]
#define __pyx_n_u_clock_id __pyx_string_tab[516]
#define __pyx_n_u_clock_ref __pyx_string_tab[517]
#define __pyx_n_u_clock_time __pyx_string_tab[518]
#define __pyx_n_u_clump_id __pyx_string_tab[519]
#define __pyx_n_u_code __pyx_string_tab[520]
#define __pyx_n_u_codec_manufacturer __pyx_string_tab[521]
#define __pyx_n_u_comp __pyx_string_tab[522]
#define __pyx_n_u_component __pyx_string_tab[523]
#define __pyx_n_u_component_id __pyx_string_tab[524]
#define __pyx_n_u_component_subtype __pyx_string_tab[525]
#define __pyx_n_u_component_type __pyx_string_tab[526]
#define __pyx_n_u_components __pyx_string_tab[527]
#define __pyx_n_u_config __pyx_string_tab[528]
#define __pyx_n_u_connection __pyx_string_tab[529]
#define __pyx_n_u_connection_params __pyx_string_tab[530]
#define __pyx_n_u_connections __pyx_string_tab[531]
#define __pyx_n_u_controlTransforms __pyx_string_tab[532]
#define __pyx_n_u_controller __pyx_string_tab[533]
#define __pyx_n_u_controls __pyx_string_tab[534]
#define __pyx_n_u_convert_float32_to_int16 __pyx_string_tab[535]
#define __pyx_n_u_convert_int16_to_float32 __pyx_string_tab[536]
#define __pyx_n_u_converter __pyx_string_tab[537]
#define __pyx_n_u_converter_id __pyx_string_tab[538]
#define __pyx_n_u_copy __pyx_string_tab[539]
#define __pyx_n_u_coremusic_capi __pyx_string_tab[540]
#define __pyx_n_u_count __pyx_string_tab[541]
#define __pyx_n_u_cpu_load __pyx_string_tab[542]
#define __pyx_n_u_create_midi_channel_message __pyx_string_tab[543]
#define __pyx_n_u_create_midi_note_message __pyx_string_tab[544]
#define __pyx_n_u_create_music_device_note_params __pyx_string_tab[545]
#define __pyx_n_u_create_music_device_std_note_par __pyx_string_tab[546]
#define __pyx_n_u_current_time __pyx_string_tab[547]
#define __pyx_n_u_data __pyx_string_tab[548]
#define __pyx_n_u_data1 __pyx_string_tab[549]
#define __pyx_n_u_data2 __pyx_string_tab[550]
#define __pyx_n_u_data_length __pyx_string_tab[551]
#define __pyx_n_u_data_ptr __pyx_string_tab[552]
#define __pyx_n_u_data_size __pyx_string_tab[553]
#define __pyx_n_u_decode __pyx_string_tab[554]
#define __pyx_n_u_default_value __pyx_string_tab[555]
#define __pyx_n_u_desc __pyx_string_tab[556]
#define __pyx_n_u_desc_dict __pyx_string_tab[557]
#define __pyx_n_u_description __pyx_string_tab[558]
#define __pyx_n_u_description_dict __pyx_string_tab[559]
#define __pyx_n_u_dest __pyx_string_tab[560]
#define __pyx_n_u_dest_format __pyx_string_tab[561]
#define __pyx_n_u_dest_index __pyx_string_tab[562]
#define __pyx_n_u_dest_input __pyx_string_tab[563]
#define __pyx_n_u_dest_node __pyx_string_tab[564]
#define __pyx_n_u_destination __pyx_string_tab[565]
#define __pyx_n_u_destinations __pyx_string_tab[566]
#define __pyx_n_u_dev_list __pyx_string_tab[567]
#define __pyx_n_u_device __pyx_string_tab[568]
#define __pyx_n_u_deviceID __pyx_string_tab[569]
#define __pyx_n_u_device_count __pyx_string_tab[570]
#define __pyx_n_u_device_id __pyx_string_tab[571]
#define __pyx_n_u_device_ids __pyx_string_tab[572]
#define __pyx_n_u_device_index __pyx_string_tab[573]
#define __pyx_n_u_devices __pyx_string_tab[574]
#define __pyx_n_u_dict __pyx_string_tab[575]
#define __pyx_n_u_dict_2 __pyx_string_tab[576]
#define __pyx_n_u_displayName __pyx_string_tab[577]
#define __pyx_n_u_dispose __pyx_string_tab[578]
#define __pyx_n_u_dispose_music_player __pyx_string_tab[579]
#define __pyx_n_u_dispose_music_sequence __pyx_string_tab[580]
#define __pyx_n_u_driver __pyx_string_tab[581]
#define __pyx_n_u_driverOwner __pyx_string_tab[582]
#define __pyx_n_u_dst_format __pyx_string_tab[583]
#define __pyx_n_u_dtype __pyx_string_tab[584]
#define __pyx_n_u_dtype_is_object __pyx_string_tab[585]
#define __pyx_n_u_duration __pyx_string_tab[586]
#define __pyx_n_u_element __pyx_string_tab[587]
#define __pyx_n_u_embedded __pyx_string_tab[588]
#define __pyx_n_u_enabled __pyx_string_tab[589]
#define __pyx_n_u_encode __pyx_string_tab[590]
#define __pyx_n_u_endpoint __pyx_string_tab[591]
#define __pyx_n_u_endpointRef __pyx_string_tab[592]
#define __pyx_n_u_ensure_not_disposed __pyx_string_tab[593]
#define __pyx_n_u_entity __pyx_string_tab[594]
#define __pyx_n_u_entity_index __pyx_string_tab[595]
#define __pyx_n_u_enumerate __pyx_string_tab[596]
#define __pyx_n_u_error __pyx_string_tab[597]
#define __pyx_n_u_errors __pyx_string_tab[598]
#define __pyx_n_u_ext_audio_file __pyx_string_tab[599]
#define __pyx_n_u_ext_file __pyx_string_tab[600]
#define __pyx_n_u_ext_file_id __pyx_string_tab[601]
#define __pyx_n_u_extended_audio_file_create_with __pyx_string_tab[602]
#define __pyx_n_u_extended_audio_file_dispose __pyx_string_tab[603]
#define __pyx_n_u_extended_audio_file_get_property __pyx_string_tab[604]
#define __pyx_n_u_extended_audio_file_open_url __pyx_string_tab[605]
#define __pyx_n_u_extended_audio_file_read __pyx_string_tab[606]
#define __pyx_n_u_extended_audio_file_read_into __pyx_string_tab[607]
#define __pyx_n_u_extended_audio_file_set_property __pyx_string_tab[608]
#define __pyx_n_u_extended_audio_file_write __pyx_string_tab[609]
#define __pyx_n_u_extra __pyx_string_tab[610]
#define __pyx_n_u_fade_frames __pyx_string_tab[611]
#define __pyx_n_u_file_format __pyx_string_tab[612]
#define __pyx_n_u_file_length_frames __pyx_string_tab[613]
#define __pyx_n_u_file_path __pyx_string_tab[614]
#define __pyx_n_u_file_type __pyx_string_tab[615]
#define __pyx_n_u_file_type_hint __pyx_string_tab[616]
#define __pyx_n_u_filterOutAllControls __pyx_string_tab[617]
#define __pyx_n_u_filterOutBeatClock __pyx_string_tab[618]
#define __pyx_n_u_filterOutMTC __pyx_string_tab[619]
#define __pyx_n_u_filterOutSysEx __pyx_string_tab[620]
#define __pyx_n_u_filterOutTuneRequest __pyx_string_tab[621]
#define __pyx_n_u_flags __pyx_string_tab[622]
#define __pyx_n_u_flags_mask __pyx_string_tab[623]
#define __pyx_n_u_float __pyx_string_tab[624]
#define __pyx_n_u_float32 __pyx_string_tab[625]
#define __pyx_n_u_float_data __pyx_string_tab[626]
#define __pyx_n_u_format __pyx_string_tab[627]
#define __pyx_n_u_format_flags __pyx_string_tab[628]
#define __pyx_n_u_format_id __pyx_string_tab[629]
#define __pyx_n_u_fortran __pyx_string_tab[630]
#define __pyx_n_u_fourchar_to_int __pyx_string_tab[631]
#define __pyx_n_u_frames_3 __pyx_string_tab[632]
#define __pyx_n_u_frames_per_packet __pyx_string_tab[633]
#define __pyx_n_u_frames_to_read __pyx_string_tab[634]
#define __pyx_n_u_func __pyx_string_tab[635]
#define __pyx_n_u_gain __pyx_string_tab[636]
#define __pyx_n_u_gain_db __pyx_string_tab[637]
#define __pyx_n_u_get __pyx_string_tab[638]
#define __pyx_n_u_get_au_graph_err_cannot_do_in_cu __pyx_string_tab[639]
#define __pyx_n_u_get_au_graph_err_invalid_audio_u __pyx_string_tab[640]
#define __pyx_n_u_get_au_graph_err_invalid_connect __pyx_string_tab[641]
#define __pyx_n_u_get_au_graph_err_node_not_found __pyx_string_tab[642]
#define __pyx_n_u_get_au_graph_err_output_node_err __pyx_string_tab[643]
#define __pyx_n_u_get_audio_component_type_music_d __pyx_string_tab[644]
#define __pyx_n_u_get_audio_converter_property_cod __pyx_string_tab[645]
#define __pyx_n_u_get_audio_converter_property_max __pyx_string_tab[646]
#define __pyx_n_u_get_audio_converter_property_max_2 __pyx_string_tab[647]
#define __pyx_n_u_get_audio_converter_property_min __pyx_string_tab[648]
#define __pyx_n_u_get_audio_converter_property_min_2 __pyx_string_tab[649]
#define __pyx_n_u_get_audio_converter_property_sam __pyx_string_tab[650]
#define __pyx_n_u_get_audio_converter_quality_high __pyx_string_tab[651]
#define __pyx_n_u_get_audio_converter_quality_low __pyx_string_tab[652]
#define __pyx_n_u_get_audio_converter_quality_max __pyx_string_tab[653]
#define __pyx_n_u_get_audio_converter_quality_medi __pyx_string_tab[654]
#define __pyx_n_u_get_audio_converter_quality_min __pyx_string_tab[655]
#define __pyx_n_u_get_audio_data __pyx_string_tab[656]
#define __pyx_n_u_get_audio_device_property_availa __pyx_string_tab[657]
#define __pyx_n_u_get_audio_device_property_device __pyx_string_tab[658]
#define __pyx_n_u_get_audio_device_property_device_2 __pyx_string_tab[659]
#define __pyx_n_u_get_audio_device_property_is_hid __pyx_string_tab[660]
#define __pyx_n_u_get_audio_device_property_model __pyx_string_tab[661]
#define __pyx_n_u_get_audio_device_property_mute __pyx_string_tab[662]
#define __pyx_n_u_get_audio_device_property_nomina __pyx_string_tab[663]
#define __pyx_n_u_get_audio_device_property_prefer __pyx_string_tab[664]
#define __pyx_n_u_get_audio_device_property_stream __pyx_string_tab[665]
#define __pyx_n_u_get_audio_device_property_transp __pyx_string_tab[666]
#define __pyx_n_u_get_audio_device_property_volume __pyx_string_tab[667]
#define __pyx_n_u_get_audio_file_property_audio_da __pyx_string_tab[668]
#define __pyx_n_u_get_audio_file_property_data_for __pyx_string_tab[669]
#define __pyx_n_u_get_audio_file_property_estimate __pyx_string_tab[670]
#define __pyx_n_u_get_audio_file_property_maximum __pyx_string_tab[671]
#define __pyx_n_u_get_audio_file_read_permission __pyx_string_tab[672]
#define __pyx_n_u_get_audio_file_stream_error_bad __pyx_string_tab[673]
#define __pyx_n_u_get_audio_file_stream_error_data __pyx_string_tab[674]
#define __pyx_n_u_get_audio_file_stream_error_disc __pyx_string_tab[675]
#define __pyx_n_u_get_audio_file_stream_error_ille __pyx_string_tab[676]
#define __pyx_n_u_get_audio_file_stream_error_inva __pyx_string_tab[677]
#define __pyx_n_u_get_audio_file_stream_error_inva_2 __pyx_string_tab[678]
#define __pyx_n_u_get_audio_file_stream_error_not __pyx_string_tab[679]
#define __pyx_n_u_get_audio_file_stream_error_unsp __pyx_string_tab[680]
#define __pyx_n_u_get_audio_file_stream_error_unsu __pyx_string_tab[681]
#define __pyx_n_u_get_audio_file_stream_error_unsu_2 __pyx_string_tab[682]
#define __pyx_n_u_get_audio_file_stream_error_unsu_3 __pyx_string_tab[683]
#define __pyx_n_u_get_audio_file_stream_error_valu __pyx_string_tab[684]
#define __pyx_n_u_get_audio_file_stream_parse_flag __pyx_string_tab[685]
#define __pyx_n_u_get_audio_file_stream_property_a __pyx_string_tab[686]
#define __pyx_n_u_get_audio_file_stream_property_a_2 __pyx_string_tab[687]
#define __pyx_n_u_get_audio_file_stream_property_a_3 __pyx_string_tab[688]
#define __pyx_n_u_get_audio_file_stream_property_b __pyx_string_tab[689]
#define __pyx_n_u_get_audio_file_stream_property_b_2 __pyx_string_tab[690]
#define __pyx_n_u_get_audio_file_stream_property_c __pyx_string_tab[691]
#define __pyx_n_u_get_audio_file_stream_property_d __pyx_string_tab[692]
#define __pyx_n_u_get_audio_file_stream_property_d_2 __pyx_string_tab[693]
#define __pyx_n_u_get_audio_file_stream_property_f __pyx_string_tab[694]
#define __pyx_n_u_get_audio_file_stream_property_f_2 __pyx_string_tab[695]
#define __pyx_n_u_get_audio_file_stream_property_f_3 __pyx_string_tab[696]
#define __pyx_n_u_get_audio_file_stream_property_f_4 __pyx_string_tab[697]
#define __pyx_n_u_get_audio_file_stream_property_f_5 __pyx_string_tab[698]
#define __pyx_n_u_get_audio_file_stream_property_i __pyx_string_tab[699]
#define __pyx_n_u_get_audio_file_stream_property_m __pyx_string_tab[700]
#define __pyx_n_u_get_audio_file_stream_property_m_2 __pyx_string_tab[701]
#define __pyx_n_u_get_audio_file_stream_property_p __pyx_string_tab[702]
#define __pyx_n_u_get_audio_file_stream_property_p_2 __pyx_string_tab[703]
#define __pyx_n_u_get_audio_file_stream_property_p_3 __pyx_string_tab[704]
#define __pyx_n_u_get_audio_file_stream_property_p_4 __pyx_string_tab[705]
#define __pyx_n_u_get_audio_file_stream_property_r __pyx_string_tab[706]
#define __pyx_n_u_get_audio_file_stream_seek_flag __pyx_string_tab[707]
#define __pyx_n_u_get_audio_file_wave_type __pyx_string_tab[708]
#define __pyx_n_u_get_audio_format_linear_pcm __pyx_string_tab[709]
#define __pyx_n_u_get_audio_hardware_property_defa __pyx_string_tab[710]
#define __pyx_n_u_get_audio_hardware_property_defa_2 __pyx_string_tab[711]
#define __pyx_n_u_get_audio_object_property_elemen __pyx_string_tab[712]
#define __pyx_n_u_get_audio_object_property_manufa __pyx_string_tab[713]
#define __pyx_n_u_get_audio_object_property_name __pyx_string_tab[714]
#define __pyx_n_u_get_audio_object_property_scope __pyx_string_tab[715]
#define __pyx_n_u_get_audio_object_property_scope_2 __pyx_string_tab[716]
#define __pyx_n_u_get_audio_object_property_scope_3 __pyx_string_tab[717]
#define __pyx_n_u_get_audio_services_bad_property __pyx_string_tab[718]
#define __pyx_n_u_get_audio_services_bad_specifier __pyx_string_tab[719]
#define __pyx_n_u_get_audio_services_no_error __pyx_string_tab[720]
#define __pyx_n_u_get_audio_services_property_comp __pyx_string_tab[721]
#define __pyx_n_u_get_audio_services_property_is_u __pyx_string_tab[722]
#define __pyx_n_u_get_audio_services_system_sound __pyx_string_tab[723]
#define __pyx_n_u_get_audio_services_system_sound_2 __pyx_string_tab[724]
#define __pyx_n_u_get_audio_services_system_sound_3 __pyx_string_tab[725]
#define __pyx_n_u_get_audio_services_unsupported_p __pyx_string_tab[726]
#define __pyx_n_u_get_audio_unit_manufacturer_appl __pyx_string_tab[727]
#define __pyx_n_u_get_audio_unit_property_set_rend __pyx_string_tab[728]
#define __pyx_n_u_get_audio_unit_property_stream_f __pyx_string_tab[729]
#define __pyx_n_u_get_audio_unit_scope_global __pyx_string_tab[730]
#define __pyx_n_u_get_audio_unit_scope_input __pyx_string_tab[731]
#define __pyx_n_u_get_audio_unit_scope_output __pyx_string_tab[732]
#define __pyx_n_u_get_audio_unit_subtype_default_o __pyx_string_tab[733]
#define __pyx_n_u_get_audio_unit_type_output __pyx_string_tab[734]
#define __pyx_n_u_get_ca_clock_time_format_beats __pyx_string_tab[735]
#define __pyx_n_u_get_ca_clock_time_format_host_ti __pyx_string_tab[736]
#define __pyx_n_u_get_ca_clock_time_format_samples __pyx_string_tab[737]
#define __pyx_n_u_get_ca_clock_time_format_seconds __pyx_string_tab[738]
#define __pyx_n_u_get_ca_clock_time_format_smpte_t __pyx_string_tab[739]
#define __pyx_n_u_get_error_suggestion __pyx_string_tab[740]
#define __pyx_n_u_get_extended_audio_file_property __pyx_string_tab[741]
#define __pyx_n_u_get_extended_audio_file_property_2 __pyx_string_tab[742]
#define __pyx_n_u_get_extended_audio_file_property_3 __pyx_string_tab[743]
#define __pyx_n_u_get_extended_audio_file_property_4 __pyx_string_tab[744]
#define __pyx_n_u_get_extended_audio_file_property_5 __pyx_string_tab[745]
#define __pyx_n_u_get_extended_audio_file_property_6 __pyx_string_tab[746]
#define __pyx_n_u_get_extended_audio_file_property_7 __pyx_string_tab[747]
#define __pyx_n_u_get_linear_pcm_format_flag_is_no __pyx_string_tab[748]
#define __pyx_n_u_get_linear_pcm_format_flag_is_pa __pyx_string_tab[749]
#define __pyx_n_u_get_linear_pcm_format_flag_is_si __pyx_string_tab[750]
#define __pyx_n_u_get_link_timing __pyx_string_tab[751]
#define __pyx_n_u_get_midi_control_type_14bit __pyx_string_tab[752]
#define __pyx_n_u_get_midi_control_type_14bit_nrpn __pyx_string_tab[753]
#define __pyx_n_u_get_midi_control_type_14bit_rpn __pyx_string_tab[754]
#define __pyx_n_u_get_midi_control_type_7bit __pyx_string_tab[755]
#define __pyx_n_u_get_midi_control_type_7bit_nrpn __pyx_string_tab[756]
#define __pyx_n_u_get_midi_control_type_7bit_rpn __pyx_string_tab[757]
#define __pyx_n_u_get_midi_cv_status_channel_press __pyx_string_tab[758]
#define __pyx_n_u_get_midi_cv_status_control_chang __pyx_string_tab[759]
#define __pyx_n_u_get_midi_cv_status_note_off __pyx_string_tab[760]
#define __pyx_n_u_get_midi_cv_status_note_on __pyx_string_tab[761]
#define __pyx_n_u_get_midi_cv_status_pitch_bend __pyx_string_tab[762]
#define __pyx_n_u_get_midi_cv_status_poly_pressure __pyx_string_tab[763]
#define __pyx_n_u_get_midi_cv_status_program_chang __pyx_string_tab[764]
#define __pyx_n_u_get_midi_error_id_not_unique __pyx_string_tab[765]
#define __pyx_n_u_get_midi_error_invalid_client __pyx_string_tab[766]
#define __pyx_n_u_get_midi_error_invalid_port __pyx_string_tab[767]
#define __pyx_n_u_get_midi_error_message_send_err __pyx_string_tab[768]
#define __pyx_n_u_get_midi_error_no_connection __pyx_string_tab[769]
#define __pyx_n_u_get_midi_error_no_current_setup __pyx_string_tab[770]
#define __pyx_n_u_get_midi_error_not_permitted __pyx_string_tab[771]
#define __pyx_n_u_get_midi_error_object_not_found __pyx_string_tab[772]
#define __pyx_n_u_get_midi_error_server_start_err __pyx_string_tab[773]
#define __pyx_n_u_get_midi_error_setup_format_err __pyx_string_tab[774]
#define __pyx_n_u_get_midi_error_unknown_endpoint __pyx_string_tab[775]
#define __pyx_n_u_get_midi_error_unknown_error __pyx_string_tab[776]
#define __pyx_n_u_get_midi_error_unknown_property __pyx_string_tab[777]
#define __pyx_n_u_get_midi_error_wrong_endpoint_ty __pyx_string_tab[778]
#define __pyx_n_u_get_midi_error_wrong_property_ty __pyx_string_tab[779]
#define __pyx_n_u_get_midi_error_wrong_thread __pyx_string_tab[780]
#define __pyx_n_u_get_midi_message_type_channel_vo __pyx_string_tab[781]
#define __pyx_n_u_get_midi_message_type_channel_vo_2 __pyx_string_tab[782]
#define __pyx_n_u_get_midi_message_type_data128 __pyx_string_tab[783]
#define __pyx_n_u_get_midi_message_type_sysex __pyx_string_tab[784]
#define __pyx_n_u_get_midi_message_type_system __pyx_string_tab[785]
#define __pyx_n_u_get_midi_message_type_utility __pyx_string_tab[786]
#define __pyx_n_u_get_midi_object_type_destination __pyx_string_tab[787]
#define __pyx_n_u_get_midi_object_type_device __pyx_string_tab[788]
#define __pyx_n_u_get_midi_object_type_entity __pyx_string_tab[789]
#define __pyx_n_u_get_midi_object_type_external_de __pyx_string_tab[790]
#define __pyx_n_u_get_midi_object_type_external_de_2 __pyx_string_tab[791]
#define __pyx_n_u_get_midi_object_type_external_en __pyx_string_tab[792]
#define __pyx_n_u_get_midi_object_type_external_so __pyx_string_tab[793]
#define __pyx_n_u_get_midi_object_type_other __pyx_string_tab[794]
#define __pyx_n_u_get_midi_object_type_source __pyx_string_tab[795]
#define __pyx_n_u_get_midi_property_device_id __pyx_string_tab[796]
#define __pyx_n_u_get_midi_property_display_name __pyx_string_tab[797]
#define __pyx_n_u_get_midi_property_driver_owner __pyx_string_tab[798]
#define __pyx_n_u_get_midi_property_manufacturer __pyx_string_tab[799]
#define __pyx_n_u_get_midi_property_model __pyx_string_tab[800]
#define __pyx_n_u_get_midi_property_name __pyx_string_tab[801]
#define __pyx_n_u_get_midi_property_offline __pyx_string_tab[802]
#define __pyx_n_u_get_midi_property_private __pyx_string_tab[803]
#define __pyx_n_u_get_midi_property_receive_channe __pyx_string_tab[804]
#define __pyx_n_u_get_midi_property_transmit_chann __pyx_string_tab[805]
#define __pyx_n_u_get_midi_property_unique_id __pyx_string_tab[806]
#define __pyx_n_u_get_midi_protocol_1_0 __pyx_string_tab[807]
#define __pyx_n_u_get_midi_protocol_2_0 __pyx_string_tab[808]
#define __pyx_n_u_get_midi_thru_connection_max_end __pyx_string_tab[809]
#define __pyx_n_u_get_midi_transform_add __pyx_string_tab[810]
#define __pyx_n_u_get_midi_transform_filter_out __pyx_string_tab[811]
#define __pyx_n_u_get_midi_transform_map_control __pyx_string_tab[812]
#define __pyx_n_u_get_midi_transform_map_value __pyx_string_tab[813]
#define __pyx_n_u_get_midi_transform_max_value __pyx_string_tab[814]
#define __pyx_n_u_get_midi_transform_min_value __pyx_string_tab[815]
#define __pyx_n_u_get_midi_transform_none __pyx_string_tab[816]
#define __pyx_n_u_get_midi_transform_scale __pyx_string_tab[817]
#define __pyx_n_u_get_music_device_midi_event_list __pyx_string_tab[818]
#define __pyx_n_u_get_music_device_midi_event_sele __pyx_string_tab[819]
#define __pyx_n_u_get_music_device_range __pyx_string_tab[820]
#define __pyx_n_u_get_music_device_start_note_sele __pyx_string_tab[821]
#define __pyx_n_u_get_music_device_stop_note_selec __pyx_string_tab[822]
#define __pyx_n_u_get_music_device_sysex_select __pyx_string_tab[823]
#define __pyx_n_u_get_music_event_type_au_preset __pyx_string_tab[824]
#define __pyx_n_u_get_music_event_type_extended_no __pyx_string_tab[825]
#define __pyx_n_u_get_music_event_type_extended_te __pyx_string_tab[826]
#define __pyx_n_u_get_music_event_type_meta __pyx_string_tab[827]
#define __pyx_n_u_get_music_event_type_midi_channe __pyx_string_tab[828]
#define __pyx_n_u_get_music_event_type_midi_note_m __pyx_string_tab[829]
#define __pyx_n_u_get_music_event_type_midi_raw_da __pyx_string_tab[830]
#define __pyx_n_u_get_music_event_type_null __pyx_string_tab[831]
#define __pyx_n_u_get_music_event_type_parameter __pyx_string_tab[832]
#define __pyx_n_u_get_music_event_type_user __pyx_string_tab[833]
#define __pyx_n_u_get_music_note_event_unused __pyx_string_tab[834]
#define __pyx_n_u_get_music_note_event_use_group_i __pyx_string_tab[835]
#define __pyx_n_u_get_music_sequence_file_any_type __pyx_string_tab[836]
#define __pyx_n_u_get_music_sequence_file_imelody __pyx_string_tab[837]
#define __pyx_n_u_get_music_sequence_file_midi_typ __pyx_string_tab[838]
#define __pyx_n_u_get_music_sequence_type_beats __pyx_string_tab[839]
#define __pyx_n_u_get_music_sequence_type_samples __pyx_string_tab[840]
#define __pyx_n_u_get_music_sequence_type_seconds __pyx_string_tab[841]
#define __pyx_n_u_get_progress __pyx_string_tab[842]
#define __pyx_n_u_get_recorded_duration __pyx_string_tab[843]
#define __pyx_n_u_get_recorded_frames __pyx_string_tab[844]
#define __pyx_n_u_get_sequence_track_property_auto __pyx_string_tab[845]
#define __pyx_n_u_get_sequence_track_property_loop __pyx_string_tab[846]
#define __pyx_n_u_get_sequence_track_property_mute __pyx_string_tab[847]
#define __pyx_n_u_get_sequence_track_property_offs __pyx_string_tab[848]
#define __pyx_n_u_get_sequence_track_property_solo __pyx_string_tab[849]
#define __pyx_n_u_get_sequence_track_property_time __pyx_string_tab[850]
#define __pyx_n_u_get_sequence_track_property_trac __pyx_string_tab[851]
#define __pyx_n_u_get_system_sound_id_flash_screen __pyx_string_tab[852]
#define __pyx_n_u_get_system_sound_id_user_preferr __pyx_string_tab[853]
#define __pyx_n_u_get_system_sound_id_vibrate __pyx_string_tab[854]
#define __pyx_n_u_get_user_preferred_alert __pyx_string_tab[855]
#define __pyx_n_u_getstate __pyx_string_tab[856]
#define __pyx_n_u_graph __pyx_string_tab[857]
#define __pyx_n_u_graph_id __pyx_string_tab[858]
#define __pyx_n_u_group __pyx_string_tab[859]
#define __pyx_n_u_group_id __pyx_string_tab[860]
#define __pyx_n_u_has_audio_content __pyx_string_tab[861]
#define __pyx_n_u_highNote __pyx_string_tab[862]
#define __pyx_n_u_highVelocity __pyx_string_tab[863]
#define __pyx_n_u_hours __pyx_string_tab[864]
#define __pyx_n_u_i __pyx_string_tab[865]
#define __pyx_n_u_id __pyx_string_tab[866]
#define __pyx_n_u_ignore __pyx_string_tab[867]
#define __pyx_n_u_immediate __pyx_string_tab[868]
#define __pyx_n_u_import __pyx_string_tab[869]
#define __pyx_n_u_in_device_id __pyx_string_tab[870]
#define __pyx_n_u_index __pyx_string_tab[871]
#define __pyx_n_u_input1 __pyx_string_tab[872]
#define __pyx_n_u_input2 __pyx_string_tab[873]
#define __pyx_n_u_input_buffer __pyx_string_tab[874]
#define __pyx_n_u_input_data __pyx_string_tab[875]
#define __pyx_n_u_input_data_size __pyx_string_tab[876]
#define __pyx_n_u_input_packet_count __pyx_string_tab[877]
#define __pyx_n_u_input_ptr __pyx_string_tab[878]
#define __pyx_n_u_instance __pyx_string_tab[879]
#define __pyx_n_u_instance_id __pyx_string_tab[880]
#define __pyx_n_u_instrument_id __pyx_string_tab[881]
#define __pyx_n_u_int __pyx_string_tab[882]
#define __pyx_n_u_int_data __pyx_string_tab[883]
#define __pyx_n_u_int_to_fourchar __pyx_string_tab[884]
#define __pyx_n_u_is_coroutine __pyx_string_tab[885]
#define __pyx_n_u_is_estimated __pyx_string_tab[886]
#define __pyx_n_u_is_initialized __pyx_string_tab[887]
#define __pyx_n_u_is_open __pyx_string_tab[888]
#define __pyx_n_u_is_playing __pyx_string_tab[889]
#define __pyx_n_u_is_recording __pyx_string_tab[890]
#define __pyx_n_u_is_running __pyx_string_tab[891]
#define __pyx_n_u_is_settable __pyx_string_tab[892]
#define __pyx_n_u_is_updated __pyx_string_tab[893]
#define __pyx_n_u_items __pyx_string_tab[894]
#define __pyx_n_u_itemsize __pyx_string_tab[895]
#define __pyx_n_u_j __pyx_string_tab[896]
#define __pyx_n_u_keyPressure __pyx_string_tab[897]
#define __pyx_n_u_length __pyx_string_tab[898]
#define __pyx_n_u_linear_gain __pyx_string_tab[899]
#define __pyx_n_u_link_session __pyx_string_tab[900]
#define __pyx_n_u_list __pyx_string_tab[901]
#define __pyx_n_u_load_file __pyx_string_tab[902]
#define __pyx_n_u_log __pyx_string_tab[903]
#define __pyx_n_u_logger __pyx_string_tab[904]
#define __pyx_n_u_loop __pyx_string_tab[905]
#define __pyx_n_u_lowNote __pyx_string_tab[906]
#define __pyx_n_u_lowVelocity __pyx_string_tab[907]
#define __pyx_n_u_lsb __pyx_string_tab[908]
#define __pyx_n_u_main __pyx_string_tab[909]
#define __pyx_n_u_manufacturer __pyx_string_tab[910]
#define __pyx_n_u_manufacturer_bytes __pyx_string_tab[911]
#define __pyx_n_u_max_load __pyx_string_tab[912]
#define __pyx_n_u_max_packet_size __pyx_string_tab[913]
#define __pyx_n_u_max_size __pyx_string_tab[914]
#define __pyx_n_u_max_val __pyx_string_tab[915]
#define __pyx_n_u_max_value __pyx_string_tab[916]
#define __pyx_n_u_memview __pyx_string_tab[917]
#define __pyx_n_u_message __pyx_string_tab[918]
#define __pyx_n_u_micros __pyx_string_tab[919]
#define __pyx_n_u_midi1_up_channel_voice_message __pyx_string_tab[920]
#define __pyx_n_u_midi1_up_control_change __pyx_string_tab[921]
#define __pyx_n_u_midi1_up_note_off __pyx_string_tab[922]
#define __pyx_n_u_midi1_up_note_on __pyx_string_tab[923]
#define __pyx_n_u_midi1_up_pitch_bend __pyx_string_tab[924]
#define __pyx_n_u_midi1_up_sysex __pyx_string_tab[925]
#define __pyx_n_u_midi1_up_system_common __pyx_string_tab[926]
#define __pyx_n_u_midi2_channel_voice_message __pyx_string_tab[927]
#define __pyx_n_u_midi2_control_change __pyx_string_tab[928]
#define __pyx_n_u_midi2_note_off __pyx_string_tab[929]
#define __pyx_n_u_midi2_note_on __pyx_string_tab[930]
#define __pyx_n_u_midi2_pitch_bend __pyx_string_tab[931]
#define __pyx_n_u_midi2_program_change __pyx_string_tab[932]
#define __pyx_n_u_midi_client_create __pyx_string_tab[933]
#define __pyx_n_u_midi_client_dispose __pyx_string_tab[934]
#define __pyx_n_u_midi_control_change __pyx_string_tab[935]
#define __pyx_n_u_midi_destination_create __pyx_string_tab[936]
#define __pyx_n_u_midi_device_add_entity __pyx_string_tab[937]
#define __pyx_n_u_midi_device_create __pyx_string_tab[938]
#define __pyx_n_u_midi_device_dispose __pyx_string_tab[939]
#define __pyx_n_u_midi_device_get_entity __pyx_string_tab[940]
#define __pyx_n_u_midi_device_get_name __pyx_string_tab[941]
#define __pyx_n_u_midi_device_get_number_of_entiti __pyx_string_tab[942]
#define __pyx_n_u_midi_device_list_add_device __pyx_string_tab[943]
#define __pyx_n_u_midi_device_list_dispose __pyx_string_tab[944]
#define __pyx_n_u_midi_device_list_get_device __pyx_string_tab[945]
#define __pyx_n_u_midi_device_list_get_number_of_d __pyx_string_tab[946]
#define __pyx_n_u_midi_device_new_entity __pyx_string_tab[947]
#define __pyx_n_u_midi_device_remove_entity __pyx_string_tab[948]
#define __pyx_n_u_midi_driver_enable_monitoring __pyx_string_tab[949]
#define __pyx_n_u_midi_endpoint_dispose __pyx_string_tab[950]
#define __pyx_n_u_midi_endpoint_get_name __pyx_string_tab[951]
#define __pyx_n_u_midi_endpoint_get_ref_cons __pyx_string_tab[952]
#define __pyx_n_u_midi_endpoint_set_ref_cons __pyx_string_tab[953]
#define __pyx_n_u_midi_entity_add_or_remove_endpoi __pyx_string_tab[954]
#define __pyx_n_u_midi_entity_get_destination __pyx_string_tab[955]
#define __pyx_n_u_midi_entity_get_name __pyx_string_tab[956]
#define __pyx_n_u_midi_entity_get_number_of_destin __pyx_string_tab[957]
#define __pyx_n_u_midi_entity_get_number_of_source __pyx_string_tab[958]
#define __pyx_n_u_midi_entity_get_source __pyx_string_tab[959]
#define __pyx_n_u_midi_external_device_create __pyx_string_tab[960]
#define __pyx_n_u_midi_get_destination __pyx_string_tab[961]
#define __pyx_n_u_midi_get_device __pyx_string_tab[962]
#define __pyx_n_u_midi_get_driver_device_list __pyx_string_tab[963]
#define __pyx_n_u_midi_get_driver_io_runloop __pyx_string_tab[964]
#define __pyx_n_u_midi_get_number_of_destinations __pyx_string_tab[965]
#define __pyx_n_u_midi_get_number_of_devices __pyx_string_tab[966]
#define __pyx_n_u_midi_get_number_of_sources __pyx_string_tab[967]
#define __pyx_n_u_midi_get_source __pyx_string_tab[968]
#define __pyx_n_u_midi_input_port_create __pyx_string_tab[969]
#define __pyx_n_u_midi_message_type_for_up_word __pyx_string_tab[970]
#define __pyx_n_u_midi_note_off __pyx_string_tab[971]
#define __pyx_n_u_midi_note_on __pyx_string_tab[972]
#define __pyx_n_u_midi_object_get_integer_property __pyx_string_tab[973]
#define __pyx_n_u_midi_object_get_manufacturer __pyx_string_tab[974]
#define __pyx_n_u_midi_object_get_model __pyx_string_tab[975]
#define __pyx_n_u_midi_object_get_name __pyx_string_tab[976]
#define __pyx_n_u_midi_object_get_string_property __pyx_string_tab[977]
#define __pyx_n_u_midi_object_set_integer_property __pyx_string_tab[978]
#define __pyx_n_u_midi_object_set_string_property __pyx_string_tab[979]
#define __pyx_n_u_midi_output_port_create __pyx_string_tab[980]
#define __pyx_n_u_midi_pitch_bend __pyx_string_tab[981]
#define __pyx_n_u_midi_port_connect_source __pyx_string_tab[982]
#define __pyx_n_u_midi_port_disconnect_source __pyx_string_tab[983]
#define __pyx_n_u_midi_port_dispose __pyx_string_tab[984]
#define __pyx_n_u_midi_program_change __pyx_string_tab[985]
#define __pyx_n_u_midi_send_data __pyx_string_tab[986]
#define __pyx_n_u_midi_setup_add_device __pyx_string_tab[987]
#define __pyx_n_u_midi_setup_add_external_device __pyx_string_tab[988]
#define __pyx_n_u_midi_setup_remove_device __pyx_string_tab[989]
#define __pyx_n_u_midi_setup_remove_external_devic __pyx_string_tab[990]
#define __pyx_n_u_midi_source_create __pyx_string_tab[991]
#define __pyx_n_u_midi_thru_connection_create __pyx_string_tab[992]
#define __pyx_n_u_midi_thru_connection_dispose __pyx_string_tab[993]
#define __pyx_n_u_midi_thru_connection_find __pyx_string_tab[994]
#define __pyx_n_u_midi_thru_connection_get_params __pyx_string_tab[995]
#define __pyx_n_u_midi_thru_connection_params_init __pyx_string_tab[996]
#define __pyx_n_u_midi_thru_connection_set_params __pyx_string_tab[997]
#define __pyx_n_u_min_value __pyx_string_tab[998]
#define __pyx_n_u_minutes __pyx_string_tab[999]
#define __pyx_n_u_mix_audio_float32 __pyx_string_tab[1000]
#define __pyx_n_u_mix_ratio __pyx_string_tab[1001]
#define __pyx_n_u_mode __pyx_string_tab[1002]
#define __pyx_n_u_model __pyx_string_tab[1003]
#define __pyx_n_u_model_bytes __pyx_string_tab[1004]
#define __pyx_n_u_module __pyx_string_tab[1005]
#define __pyx_n_u_mono_data __pyx_string_tab[1006]
#define __pyx_n_u_mono_to_stereo_float32 __pyx_string_tab[1007]
#define __pyx_n_u_msb __pyx_string_tab[1008]
#define __pyx_n_u_msg __pyx_string_tab[1009]
#define __pyx_n_u_music_device_midi_event __pyx_string_tab[1010]
#define __pyx_n_u_music_device_start_note __pyx_string_tab[1011]
#define __pyx_n_u_music_device_stop_note __pyx_string_tab[1012]
#define __pyx_n_u_music_device_sysex __pyx_string_tab[1013]
#define __pyx_n_u_music_player_get_play_rate_scala __pyx_string_tab[1014]
#define __pyx_n_u_music_player_get_sequence __pyx_string_tab[1015]
#define __pyx_n_u_music_player_get_time __pyx_string_tab[1016]
#define __pyx_n_u_music_player_is_playing __pyx_string_tab[1017]
#define __pyx_n_u_music_player_preroll __pyx_string_tab[1018]
#define __pyx_n_u_music_player_set_play_rate_scala __pyx_string_tab[1019]
#define __pyx_n_u_music_player_set_sequence __pyx_string_tab[1020]
#define __pyx_n_u_music_player_set_time __pyx_string_tab[1021]
#define __pyx_n_u_music_player_start __pyx_string_tab[1022]
#define __pyx_n_u_music_player_stop __pyx_string_tab[1023]
#define __pyx_n_u_music_sequence_dispose_track __pyx_string_tab[1024]
#define __pyx_n_u_music_sequence_file_load __pyx_string_tab[1025]
#define __pyx_n_u_music_sequence_get_ind_track __pyx_string_tab[1026]
#define __pyx_n_u_music_sequence_get_sequence_type __pyx_string_tab[1027]
#define __pyx_n_u_music_sequence_get_tempo_track __pyx_string_tab[1028]
#define __pyx_n_u_music_sequence_get_track_count __pyx_string_tab[1029]
#define __pyx_n_u_music_sequence_new_track __pyx_string_tab[1030]
#define __pyx_n_u_music_sequence_set_sequence_type __pyx_string_tab[1031]
#define __pyx_n_u_music_track_new_extended_tempo_e __pyx_string_tab[1032]
#define __pyx_n_u_music_track_new_midi_channel_eve __pyx_string_tab[1033]
#define __pyx_n_u_music_track_new_midi_note_event __pyx_string_tab[1034]
#define __pyx_n_u_n __pyx_string_tab[1035]
#define __pyx_n_u_name __pyx_string_tab[1036]
#define __pyx_n_u_name_2 __pyx_string_tab[1037]
#define __pyx_n_u_name_bytes __pyx_string_tab[1038]
#define __pyx_n_u_name_ref __pyx_string_tab[1039]
#define __pyx_n_u_ndim __pyx_string_tab[1040]
#define __pyx_n_u_new __pyx_string_tab[1041]
#define __pyx_n_u_new_music_player __pyx_string_tab[1042]
#define __pyx_n_u_new_music_sequence __pyx_string_tab[1043]
#define __pyx_n_u_node __pyx_string_tab[1044]
#define __pyx_n_u_node_id __pyx_string_tab[1045]
#define __pyx_n_u_normalize_audio __pyx_string_tab[1046]
#define __pyx_n_u_normalize_audio_float32 __pyx_string_tab[1047]
#define __pyx_n_u_note __pyx_string_tab[1048]
#define __pyx_n_u_noteNumber __pyx_string_tab[1049]
#define __pyx_n_u_note_instance_id __pyx_string_tab[1050]
#define __pyx_n_u_note_number __pyx_string_tab[1051]
#define __pyx_n_u_note_transform __pyx_string_tab[1052]
#define __pyx_n_u_np __pyx_string_tab[1053]
#define __pyx_n_u_numControlTransforms __pyx_string_tab[1054]
#define __pyx_n_u_numMaps __pyx_string_tab[1055]
#define __pyx_n_u_num_bytes __pyx_string_tab[1056]
#define __pyx_n_u_num_channels __pyx_string_tab[1057]
#define __pyx_n_u_num_connections __pyx_string_tab[1058]
#define __pyx_n_u_num_controls __pyx_string_tab[1059]
#define __pyx_n_u_num_destination_endpoints __pyx_string_tab[1060]
#define __pyx_n_u_num_dests __pyx_string_tab[1061]
#define __pyx_n_u_num_devices __pyx_string_tab[1062]
#define __pyx_n_u_num_entities __pyx_string_tab[1063]
#define __pyx_n_u_num_frames __pyx_string_tab[1064]
#define __pyx_n_u_num_packets __pyx_string_tab[1065]
#define __pyx_n_u_num_params __pyx_string_tab[1066]
#define __pyx_n_u_num_presets __pyx_string_tab[1067]
#define __pyx_n_u_num_source_endpoints __pyx_string_tab[1068]
#define __pyx_n_u_num_sources __pyx_string_tab[1069]
#define __pyx_n_u_number __pyx_string_tab[1070]
#define __pyx_n_u_numpy __pyx_string_tab[1071]
#define __pyx_n_u_obj __pyx_string_tab[1072]
#define __pyx_n_u_object_id __pyx_string_tab[1073]
#define __pyx_n_u_offline __pyx_string_tab[1074]
#define __pyx_n_u_offset_sample_frame __pyx_string_tab[1075]
#define __pyx_n_u_operation __pyx_string_tab[1076]
#define __pyx_n_u_os_status __pyx_string_tab[1077]
#define __pyx_n_u_os_status_to_string __pyx_string_tab[1078]
#define __pyx_n_u_output __pyx_string_tab[1079]
#define __pyx_n_u_output_buffer __pyx_string_tab[1080]
#define __pyx_n_u_output_buffer_list __pyx_string_tab[1081]
#define __pyx_n_u_output_buffer_size __pyx_string_tab[1082]
#define __pyx_n_u_output_data __pyx_string_tab[1083]
#define __pyx_n_u_output_data_packet_size __pyx_string_tab[1084]
#define __pyx_n_u_output_data_size __pyx_string_tab[1085]
#define __pyx_n_u_output_desc __pyx_string_tab[1086]
#define __pyx_n_u_output_packet_count __pyx_string_tab[1087]
#define __pyx_n_u_owner_id_bytes __pyx_string_tab[1088]
#define __pyx_n_u_pack __pyx_string_tab[1089]
#define __pyx_n_u_packet __pyx_string_tab[1090]
#define __pyx_n_u_packet_count __pyx_string_tab[1091]
#define __pyx_n_u_packet_offset __pyx_string_tab[1092]
#define __pyx_n_u_param __pyx_string_tab[1093]
#define __pyx_n_u_param_id __pyx_string_tab[1094]
#define __pyx_n_u_param_info __pyx_string_tab[1095]
#define __pyx_n_u_param_list __pyx_string_tab[1096]
#define __pyx_n_u_params __pyx_string_tab[1097]
#define __pyx_n_u_params_size __pyx_string_tab[1098]
#define __pyx_n_u_path_bytes __pyx_string_tab[1099]
#define __pyx_n_u_peak __pyx_string_tab[1100]
#define __pyx_n_u_permissions __pyx_string_tab[1101]
#define __pyx_n_u_persistent_owner_id __pyx_string_tab[1102]
#define __pyx_n_u_phase __pyx_string_tab[1103]
#define __pyx_n_u_phase_at_time __pyx_string_tab[1104]
#define __pyx_n_u_pitch __pyx_string_tab[1105]
#define __pyx_n_u_pitchBend __pyx_string_tab[1106]
#define __pyx_n_u_pktlist __pyx_string_tab[1107]
#define __pyx_n_u_pktlist_size __pyx_string_tab[1108]
#define __pyx_n_u_play __pyx_string_tab[1109]
#define __pyx_n_u_player __pyx_string_tab[1110]
#define __pyx_n_u_pop __pyx_string_tab[1111]
#define __pyx_n_u_port __pyx_string_tab[1112]
#define __pyx_n_u_port_name __pyx_string_tab[1113]
#define __pyx_n_u_port_name_bytes __pyx_string_tab[1114]
#define __pyx_n_u_preset __pyx_string_tab[1115]
#define __pyx_n_u_preset_name __pyx_string_tab[1116]
#define __pyx_n_u_preset_number __pyx_string_tab[1117]
#define __pyx_n_u_presets_array __pyx_string_tab[1118]
#define __pyx_n_u_previous __pyx_string_tab[1119]
#define __pyx_n_u_previous_component_id __pyx_string_tab[1120]
#define __pyx_n_u_private __pyx_string_tab[1121]
#define __pyx_n_u_program __pyx_string_tab[1122]
#define __pyx_n_u_programChange __pyx_string_tab[1123]
#define __pyx_n_u_prop_bytes __pyx_string_tab[1124]
#define __pyx_n_u_prop_id __pyx_string_tab[1125]
#define __pyx_n_u_prop_size __pyx_string_tab[1126]
#define __pyx_n_u_property_id __pyx_string_tab[1127]
#define __pyx_n_u_property_name __pyx_string_tab[1128]
#define __pyx_n_u_property_selector __pyx_string_tab[1129]
#define __pyx_n_u_protocol __pyx_string_tab[1130]
#define __pyx_n_u_pyx_checksum __pyx_string_tab[1131]
#define __pyx_n_u_pyx_state __pyx_string_tab[1132]
#define __pyx_n_u_pyx_type __pyx_string_tab[1133]
#define __pyx_n_u_pyx_unpickle_Enum __pyx_string_tab[1134]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[1135]
#define __pyx_n_u_qualname __pyx_string_tab[1136]
#define __pyx_n_u_quantum __pyx_string_tab[1137]
#define __pyx_n_u_queue __pyx_string_tab[1138]
#define __pyx_n_u_queue_id __pyx_string_tab[1139]
#define __pyx_n_u_rate __pyx_string_tab[1140]
#define __pyx_n_u_ratio1 __pyx_string_tab[1141]
#define __pyx_n_u_ratio2 __pyx_string_tab[1142]
#define __pyx_n_u_read_frames __pyx_string_tab[1143]
#define __pyx_n_u_receiveChannels __pyx_string_tab[1144]
#define __pyx_n_u_reduce __pyx_string_tab[1145]
#define __pyx_n_u_reduce_cython __pyx_string_tab[1146]
#define __pyx_n_u_reduce_ex __pyx_string_tab[1147]
#define __pyx_n_u_ref1 __pyx_string_tab[1148]
#define __pyx_n_u_ref2 __pyx_string_tab[1149]
#define __pyx_n_u_register __pyx_string_tab[1150]
#define __pyx_n_u_release_velocity __pyx_string_tab[1151]
#define __pyx_n_u_required_size __pyx_string_tab[1152]
#define __pyx_n_u_reserved __pyx_string_tab[1153]
#define __pyx_n_u_reset_playback __pyx_string_tab[1154]
#define __pyx_n_u_reshape __pyx_string_tab[1155]
#define __pyx_n_u_result __pyx_string_tab[1156]
#define __pyx_n_u_result_str __pyx_string_tab[1157]
#define __pyx_n_u_return __pyx_string_tab[1158]
#define __pyx_n_u_rstrip __pyx_string_tab[1159]
#define __pyx_n_u_run_loop __pyx_string_tab[1160]
#define __pyx_n_u_runloop __pyx_string_tab[1161]
#define __pyx_n_u_sample __pyx_string_tab[1162]
#define __pyx_n_u_sample_rate __pyx_string_tab[1163]
#define __pyx_n_u_save_to_file __pyx_string_tab[1164]
#define __pyx_n_u_scale_rate __pyx_string_tab[1165]
#define __pyx_n_u_scope __pyx_string_tab[1166]
#define __pyx_n_u_seconds __pyx_string_tab[1167]
#define __pyx_n_u_self __pyx_string_tab[1168]
#define __pyx_n_u_seq __pyx_string_tab[1169]
#define __pyx_n_u_sequence __pyx_string_tab[1170]
#define __pyx_n_u_sequence_type __pyx_string_tab[1171]
#define __pyx_n_u_set_looping __pyx_string_tab[1172]
#define __pyx_n_u_set_name __pyx_string_tab[1173]
#define __pyx_n_u_set_object_id __pyx_string_tab[1174]
#define __pyx_n_u_setdefault __pyx_string_tab[1175]
#define __pyx_n_u_setstate __pyx_string_tab[1176]
#define __pyx_n_u_setstate_cython __pyx_string_tab[1177]
#define __pyx_n_u_setup_input __pyx_string_tab[1178]
#define __pyx_n_u_setup_output __pyx_string_tab[1179]
#define __pyx_n_u_shape __pyx_string_tab[1180]
#define __pyx_n_u_size __pyx_string_tab[1181]
#define __pyx_n_u_sound_id __pyx_string_tab[1182]
#define __pyx_n_u_source __pyx_string_tab[1183]
#define __pyx_n_u_source_format __pyx_string_tab[1184]
#define __pyx_n_u_source_format_dict __pyx_string_tab[1185]
#define __pyx_n_u_source_index __pyx_string_tab[1186]
#define __pyx_n_u_source_node __pyx_string_tab[1187]
#define __pyx_n_u_source_output __pyx_string_tab[1188]
#define __pyx_n_u_sources __pyx_string_tab[1189]
#define __pyx_n_u_specifier __pyx_string_tab[1190]
#define __pyx_n_u_specifier_value __pyx_string_tab[1191]
#define __pyx_n_u_src_format __pyx_string_tab[1192]
#define __pyx_n_u_start __pyx_string_tab[1193]
#define __pyx_n_u_start_frame __pyx_string_tab[1194]
#define __pyx_n_u_start_packet __pyx_string_tab[1195]
#define __pyx_n_u_state __pyx_string_tab[1196]
#define __pyx_n_u_status __pyx_string_tab[1197]
#define __pyx_n_u_status_code __pyx_string_tab[1198]
#define __pyx_n_u_status_result __pyx_string_tab[1199]
#define __pyx_n_u_step __pyx_string_tab[1200]
#define __pyx_n_u_stereo_data __pyx_string_tab[1201]
#define __pyx_n_u_stereo_to_mono_float32 __pyx_string_tab[1202]
#define __pyx_n_u_stop __pyx_string_tab[1203]
#define __pyx_n_u_str __pyx_string_tab[1204]
#define __pyx_n_u_stream __pyx_string_tab[1205]
#define __pyx_n_u_stream_format __pyx_string_tab[1206]
#define __pyx_n_u_stream_id __pyx_string_tab[1207]
#define __pyx_n_u_string_ref __pyx_string_tab[1208]
#define __pyx_n_u_struct __pyx_string_tab[1209]
#define __pyx_n_u_subframe_divisor __pyx_string_tab[1210]
#define __pyx_n_u_subframes __pyx_string_tab[1211]
#define __pyx_n_u_subtype __pyx_string_tab[1212]
#define __pyx_n_u_suggestion __pyx_string_tab[1213]
#define __pyx_n_u_sum_squares __pyx_string_tab[1214]
#define __pyx_n_u_system_sound_id __pyx_string_tab[1215]
#define __pyx_n_u_target_peak __pyx_string_tab[1216]
#define __pyx_n_u_temp_buffer_list __pyx_string_tab[1217]
#define __pyx_n_u_tempo __pyx_string_tab[1218]
#define __pyx_n_u_test __pyx_string_tab[1219]
#define __pyx_n_u_test_error __pyx_string_tab[1220]
#define __pyx_n_u_time __pyx_string_tab[1221]
#define __pyx_n_u_time_format __pyx_string_tab[1222]
#define __pyx_n_u_timestamp __pyx_string_tab[1223]
#define __pyx_n_u_total_bytes __pyx_string_tab[1224]
#define __pyx_n_u_total_samples __pyx_string_tab[1225]
#define __pyx_n_u_track __pyx_string_tab[1226]
#define __pyx_n_u_track_count __pyx_string_tab[1227]
#define __pyx_n_u_track_index __pyx_string_tab[1228]
#define __pyx_n_u_transform __pyx_string_tab[1229]
#define __pyx_n_u_transmitChannels __pyx_string_tab[1230]
#define __pyx_n_u_tuple __pyx_string_tab[1231]
#define __pyx_n_u_type __pyx_string_tab[1232]
#define __pyx_n_u_uint_data __pyx_string_tab[1233]
#define __pyx_n_u_uniqueID __pyx_string_tab[1234]
#define __pyx_n_u_unit __pyx_string_tab[1235]
#define __pyx_n_u_unit_name __pyx_string_tab[1236]
#define __pyx_n_u_unpack __pyx_string_tab[1237]
#define __pyx_n_u_update __pyx_string_tab[1238]
#define __pyx_n_u_url __pyx_string_tab[1239]
#define __pyx_n_u_url_ref __pyx_string_tab[1240]
#define __pyx_n_u_value __pyx_string_tab[1241]
#define __pyx_n_u_valueMaps __pyx_string_tab[1242]
#define __pyx_n_u_value_bytes __pyx_string_tab[1243]
#define __pyx_n_u_values __pyx_string_tab[1244]
#define __pyx_n_u_velocity __pyx_string_tab[1245]
#define __pyx_n_u_velocity_transform __pyx_string_tab[1246]
#define __pyx_n_u_version __pyx_string_tab[1247]
#define __pyx_n_u_word __pyx_string_tab[1248]
#define __pyx_n_u_writable __pyx_string_tab[1249]
#define __pyx_n_u_x __pyx_string_tab[1250]
#define __pyx_kp_b__7 __pyx_string_tab[1251]
#define __pyx_kp_b_iso88591_0_1A_wc_l_0_1 __pyx_string_tab[1252]
#define __pyx_kp_b_iso88591_0_1A_wc_l_0_1_2 __pyx_string_tab[1253]
#define __pyx_kp_b_iso88591_0_5Ql_AQ_wc_l_0_1 __pyx_string_tab[1254]
#define __pyx_kp_b_iso88591_0_a_S_a_Qha_D_A_1_Q6Fa_ay_d_AQ __pyx_string_tab[1255]
#define __pyx_kp_b_iso88591_1 __pyx_string_tab[1256]
#define __pyx_kp_b_iso88591_12_fF_1_fAQ_D_A_E_aq_U_1_as_vQc __pyx_string_tab[1257]
#define __pyx_kp_b_iso88591_1JgZq_Zq __pyx_string_tab[1258]
#define __pyx_kp_b_iso88591_1_1_wc_l_0_6 __pyx_string_tab[1259]
#define __pyx_kp_b_iso88591_1_2B_wc_l_0_1 __pyx_string_tab[1260]
#define __pyx_kp_b_iso88591_1_4AQ_wc_l_0 __pyx_string_tab[1261]
#define __pyx_kp_b_iso88591_1_4AQ_wc_l_0_1 __pyx_string_tab[1262]
#define __pyx_kp_b_iso88591_1_4A_A_wc_l_0_6 __pyx_string_tab[1263]
#define __pyx_kp_b_iso88591_1_5Qa_wc_l_0_1 __pyx_string_tab[1264]
#define __pyx_kp_b_iso88591_1_5Qa_wc_l_0_q_A_1_U_1JF_a_WF_1 __pyx_string_tab[1265]
#define __pyx_kp_b_iso88591_1_6_1_av_D_U_1_vQ_a_6_F_F_P_YfI __pyx_string_tab[1266]
#define __pyx_kp_b_iso88591_1_6aq_wc_l_0_1 __pyx_string_tab[1267]
#define __pyx_kp_b_iso88591_1_6aq_wc_l_0_q_A_1_U_1JF_a_WF_1 __pyx_string_tab[1268]
#define __pyx_kp_b_iso88591_1_7q_1A_wc_3is_q_O1A_8_Q __pyx_string_tab[1269]
#define __pyx_kp_b_iso88591_1_A_F_b_Rq_2Q_j_5Qa_q_y_a_y_A_y __pyx_string_tab[1270]
#define __pyx_kp_b_iso88591_1_A_wa_AQ_y_a_y_A_y_9A_2_XQa_wc __pyx_string_tab[1271]
#define __pyx_kp_b_iso88591_1_A_wc_l_VVWWX_1 __pyx_string_tab[1272]
#define __pyx_kp_b_iso88591_1_J_q_q_Q_S_q_c_wc_l_0_vQa_t1_k __pyx_string_tab[1273]
#define __pyx_kp_b_iso88591_1_Na_wc_l_0_1 __pyx_string_tab[1274]
#define __pyx_kp_b_iso88591_1_NjXYYZ_wc_l_0_1 __pyx_string_tab[1275]
#define __pyx_kp_b_iso88591_1_NjXYYZ_wc_l_0_6 __pyx_string_tab[1276]
#define __pyx_kp_b_iso88591_1_Q __pyx_string_tab[1277]
#define __pyx_kp_b_iso88591_1_Q_A_wc_l_0_a_1_wc_l_0_1_y_1_8 __pyx_string_tab[1278]
#define __pyx_kp_b_iso88591_1_Qa_wc_l_0_q_A_1_U_1JF_a_WF_1 __pyx_string_tab[1279]
#define __pyx_kp_b_iso88591_1_a __pyx_string_tab[1280]
#define __pyx_kp_b_iso88591_1_a_wc_l_0_1 __pyx_string_tab[1281]
#define __pyx_kp_b_iso88591_1_aq_2_1L_Qa_wc_l_0_6 __pyx_string_tab[1282]
#define __pyx_kp_b_iso88591_1_d_a_t1Kq_1Cq_U_6_QgQd_2__q_a __pyx_string_tab[1283]
#define __pyx_kp_b_iso88591_1_j_wc_l_0_4q __pyx_string_tab[1284]
#define __pyx_kp_b_iso88591_1_q_A_1_Q_wc_l_VVWWX_1_z_s_FXXY __pyx_string_tab[1285]
#define __pyx_kp_b_iso88591_1_q_Bm2Q_F_3b_j_az_q_31A_vQc_1 __pyx_string_tab[1286]
#define __pyx_kp_b_iso88591_1_q_a_H_RUU_gghhi_wc_q_1 __pyx_string_tab[1287]
#define __pyx_kp_b_iso88591_1_q_q_A_A_a_wc_l_0_vQa_t1_k_A_A __pyx_string_tab[1288]
#define __pyx_kp_b_iso88591_1_q_q_q_q_wc_3j_1_q_A_wc_q_S_q __pyx_string_tab[1289]
#define __pyx_kp_b_iso88591_1_s_1_wa_8_P_wc_l_0 __pyx_string_tab[1290]
#define __pyx_kp_b_iso88591_1_z_A_A_a_6a_4Cq_j_wc_l_0_1 __pyx_string_tab[1291]
#define __pyx_kp_b_iso88591_2_3EQ_wc_l_0_1 __pyx_string_tab[1292]
#define __pyx_kp_b_iso88591_2_3EQ_wc_l_0_1_2 __pyx_string_tab[1293]
#define __pyx_kp_b_iso88591_2_is_QR_7q8H_PQ_wc_l_0_1 __pyx_string_tab[1294]
#define __pyx_kp_b_iso88591_2_q_a_H_RUU_gghhi_wc_q_1 __pyx_string_tab[1295]
#define __pyx_kp_b_iso88591_2_q_wc_l_0 __pyx_string_tab[1296]
#define __pyx_kp_b_iso88591_2_z_TU_wc_l_0 __pyx_string_tab[1297]
#define __pyx_kp_b_iso88591_314DA_wc_l_0_1 __pyx_string_tab[1298]
#define __pyx_kp_b_iso88591_314DHAQ_wc_l_0_81 __pyx_string_tab[1299]
#define __pyx_kp_b_iso88591_314DHL___wc_l_0_1 __pyx_string_tab[1300]
#define __pyx_kp_b_iso88591_314Fa_wc_l_0_1 __pyx_string_tab[1301]
#define __pyx_kp_b_iso88591_31O_Q_wc_l_0 __pyx_string_tab[1302]
#define __pyx_kp_b_iso88591_31_avYgUVVbbc_1F_Mdde_t3a_AQ_j __pyx_string_tab[1303]
#define __pyx_kp_b_iso88591_37_1_B_2_7_Q_a_4AXQ_1_c_1_E_aq __pyx_string_tab[1304]
#define __pyx_kp_b_iso88591_4A5I_wc_l_0_1 __pyx_string_tab[1305]
#define __pyx_kp_b_iso88591_4AQ_wc_l_0 __pyx_string_tab[1306]
#define __pyx_kp_b_iso88591_4A_0_wc_l_0_1 __pyx_string_tab[1307]
#define __pyx_kp_b_iso88591_4A_9_1_wc_l_0_6 __pyx_string_tab[1308]
#define __pyx_kp_b_iso88591_4A_A_8_1_wc_l_0_1 __pyx_string_tab[1309]
#define __pyx_kp_b_iso88591_4A_Bb_1_j_Gq_STTU_1Kq_6 __pyx_string_tab[1310]
#define __pyx_kp_b_iso88591_4A_Bb_1_j_Gq_STTU_Qk_6 __pyx_string_tab[1311]
#define __pyx_kp_b_iso88591_4A_Q __pyx_string_tab[1312]
#define __pyx_kp_b_iso88591_4A_wc_l_0 __pyx_string_tab[1313]
#define __pyx_kp_b_iso88591_4t1 __pyx_string_tab[1314]
#define __pyx_kp_b_iso88591_5Q6Fhaq_wc_l_0_4q __pyx_string_tab[1315]
#define __pyx_kp_b_iso88591_5Q6H_wc_l_0_1 __pyx_string_tab[1316]
#define __pyx_kp_b_iso88591_5Q_Q __pyx_string_tab[1317]
#define __pyx_kp_b_iso88591_5Q_q_Q_Q_q_5Q_wc_l_1_1_vQa_t1_k __pyx_string_tab[1318]
#define __pyx_kp_b_iso88591_5Q_q_a_9_wc_l_0_vQa_t1_k_A_Q_7 __pyx_string_tab[1319]
#define __pyx_kp_b_iso88591_5Q_q_wc_l_0_1 __pyx_string_tab[1320]
#define __pyx_kp_b_iso88591_5WA_Cq_1_wc_l_0_1 __pyx_string_tab[1321]
#define __pyx_kp_b_iso88591_6a7I_STTU_wc_l_0_6 __pyx_string_tab[1322]
#define __pyx_kp_b_iso88591_6a7I_wc_l_0_1 __pyx_string_tab[1323]
#define __pyx_kp_b_iso88591_6a7MQ_wc_l_0_1 __pyx_string_tab[1324]
#define __pyx_kp_b_iso88591_6a_2_wc_l_0_1 __pyx_string_tab[1325]
#define __pyx_kp_b_iso88591_6a_q_Jk_6QRRS_wc_l_0_A_4q_A_Q_d __pyx_string_tab[1326]
#define __pyx_kp_b_iso88591_6aq_wc_l_0 __pyx_string_tab[1327]
#define __pyx_kp_b_iso88591_6az_RS_Fg_XY_Cxs __pyx_string_tab[1328]
#define __pyx_kp_b_iso88591_6az_R_FizYccmmn_Cxs __pyx_string_tab[1329]
#define __pyx_kp_b_iso88591_6iq_1_q_q_q_q_1_Q_wc_3j_1_q_3a __pyx_string_tab[1330]
#define __pyx_kp_b_iso88591_7_A_5Yj_zYZ __pyx_string_tab[1331]
#define __pyx_kp_b_iso88591_7_HT__6_zQXXbbc6_zQXXbbc_Cxs __pyx_string_tab[1332]
#define __pyx_kp_b_iso88591_7_IU___6_PP_kkvvw_Cxs __pyx_string_tab[1333]
#define __pyx_kp_b_iso88591_7q8H_PQQR_wc_l_0_6 __pyx_string_tab[1334]
#define __pyx_kp_b_iso88591_7q_1_r_r __pyx_string_tab[1335]
#define __pyx_kp_b_iso88591_7q_2_z_PQQR_wc_l_0_1 __pyx_string_tab[1336]
#define __pyx_kp_b_iso88591_7q_A __pyx_string_tab[1337]
#define __pyx_kp_b_iso88591_7q_Bc_Cq_j_Q_J_9TUUV_8_A_6 __pyx_string_tab[1338]
#define __pyx_kp_b_iso88591_7q_J_z_Kq_A_1F_A_Cq_iq_9_S_q_c __pyx_string_tab[1339]
#define __pyx_kp_b_iso88591_7q_JavQa_wc_l_0_F_a __pyx_string_tab[1340]
#define __pyx_kp_b_iso88591_7q_wc_l_0_1 __pyx_string_tab[1341]
#define __pyx_kp_b_iso88591_88PPQ_q_1_PPQ_O1_BBYYZ_1BBTTU_a __pyx_string_tab[1342]
#define __pyx_kp_b_iso88591_8_Q_wc_l_0 __pyx_string_tab[1343]
#define __pyx_kp_b_iso88591_8_j_wc_l_0_1 __pyx_string_tab[1344]
#define __pyx_kp_b_iso88591_9A_1_A_Q_1_Q_wc_l_0_1 __pyx_string_tab[1345]
#define __pyx_kp_b_iso88591_9_2_wc_l_0_1 __pyx_string_tab[1346]
#define __pyx_kp_b_iso88591_9_7wa_ay_7_SPQQXXeellm_wc_l_0 __pyx_string_tab[1347]
#define __pyx_kp_b_iso88591_9_LJVaannoop_wc_l_0_6 __pyx_string_tab[1348]
#define __pyx_kp_b_iso88591_A __pyx_string_tab[1349]
#define __pyx_kp_b_iso88591_AQ_Kq_AQ_T_1_k_QnA_a_QfAQ_wc_l __pyx_string_tab[1350]
#define __pyx_kp_b_iso88591_AZwjXYBLIU_ggrrs_Cxs __pyx_string_tab[1351]
#define __pyx_kp_b_iso88591_AZwj_j __pyx_string_tab[1352]
#define __pyx_kp_b_iso88591_A_1 __pyx_string_tab[1353]
#define __pyx_kp_b_iso88591_A_1_wc_l_0 __pyx_string_tab[1354]
#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[1355]
#define __pyx_kp_b_iso88591_A_2_z_wc_l_0_1 __pyx_string_tab[1356]
#define __pyx_kp_b_iso88591_A_3 __pyx_string_tab[1357]
#define __pyx_kp_b_iso88591_A_4A_q_q_wc_l_0_1 __pyx_string_tab[1358]
#define __pyx_kp_b_iso88591_A_4_1_A_1_wd_r_NRS __pyx_string_tab[1359]
#define __pyx_kp_b_iso88591_A_4_A_1_wd_oRwd_a __pyx_string_tab[1360]
#define __pyx_kp_b_iso88591_A_4_Q_1_wd_r_NRS __pyx_string_tab[1361]
#define __pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_1_DP_hhjjk_t_1 __pyx_string_tab[1362]
#define __pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_1_t_n_E_as_T_waq __pyx_string_tab[1363]
#define __pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_aq_A_Q_q_83a_A_a __pyx_string_tab[1364]
#define __pyx_kp_b_iso88591_A_4t1_1_L_1_8_Q_7_Q_a_1A_q __pyx_string_tab[1365]
#define __pyx_kp_b_iso88591_A_4t1_1_N_q_O1D_a_7_Q_a_Qa_q __pyx_string_tab[1366]
#define __pyx_kp_b_iso88591_A_4t1_aq_L_1_L_9_a_7_Q_Kq_a_AQ_q __pyx_string_tab[1367]
#define __pyx_kp_b_iso88591_A_4t1_aq_N_q_N_1_4AT_q_7_Q_m1_a __pyx_string_tab[1368]
#define __pyx_kp_b_iso88591_A_6 __pyx_string_tab[1369]
#define __pyx_kp_b_iso88591_A_6a_q_a_wc_l_0_j_z_a_a_E_85_a __pyx_string_tab[1370]
#define __pyx_kp_b_iso88591_A_A __pyx_string_tab[1371]
#define __pyx_kp_b_iso88591_A_A_wc_l_0 __pyx_string_tab[1372]
#define __pyx_kp_b_iso88591_A_L __pyx_string_tab[1373]
#define __pyx_kp_b_iso88591_A_L_2 __pyx_string_tab[1374]
#define __pyx_kp_b_iso88591_A_N_0_IRt_YZ_N_1_N_q_4_QQSSWWeeo __pyx_string_tab[1375]
#define __pyx_kp_b_iso88591_A_Oq_Bb_1_j_Gq_TUUV_9_Q_6 __pyx_string_tab[1376]
#define __pyx_kp_b_iso88591_A_Q __pyx_string_tab[1377]
#define __pyx_kp_b_iso88591_A_Q_2 __pyx_string_tab[1378]
#define __pyx_kp_b_iso88591_A_Q_3 __pyx_string_tab[1379]
#define __pyx_kp_b_iso88591_A_Q_A_Q_q_83a_A_aq_q_AQ_7_Q_a_AQ __pyx_string_tab[1380]
#define __pyx_kp_b_iso88591_A_a_a_Q_q_5_1_aq_QfAT_7_Q_a_Faq __pyx_string_tab[1381]
#define __pyx_kp_b_iso88591_A_aq_wc_l_0_1_r_aq_q_vQ_q_A_6_A __pyx_string_tab[1382]
#define __pyx_kp_b_iso88591_A_q_c1LAYVYY___a_wc_q_S_Cq_q_F __pyx_string_tab[1383]
#define __pyx_kp_b_iso88591_A_s_6_1_j_Rs_1_t1_k_aq_Q_1_a_s __pyx_string_tab[1384]
#define __pyx_kp_b_iso88591_A_t __pyx_string_tab[1385]
#define __pyx_kp_b_iso88591_A_t1D_A __pyx_string_tab[1386]
#define __pyx_kp_b_iso88591_A_t1D_a __pyx_string_tab[1387]
#define __pyx_kp_b_iso88591_A_t6 __pyx_string_tab[1388]
#define __pyx_kp_b_iso88591_A_wc_l_0 __pyx_string_tab[1389]
#define __pyx_kp_b_iso88591_BBWWX_1_q_1_Bm2Q_vQ_2Rr_3a_k_Q __pyx_string_tab[1390]
#define __pyx_kp_b_iso88591_BBZZ_82Q_Rq_IRq_Rq_A __pyx_string_tab[1391]
#define __pyx_kp_b_iso88591_B_1_1_Q_1_Q_A_wc_l_0_1 __pyx_string_tab[1392]
#define __pyx_kp_b_iso88591_B_1_A_Bb_vQa_wc_k_Q_9AR_2_9AR_0 __pyx_string_tab[1393]
#define __pyx_kp_b_iso88591_Bb_1A_A_A __pyx_string_tab[1394]
#define __pyx_kp_b_iso88591_C1DVVW_1 __pyx_string_tab[1395]
#define __pyx_kp_b_iso88591_DA_Q __pyx_string_tab[1396]
#define __pyx_kp_b_iso88591_D_5Q_aq_Q_Q_q_A_wc_l_0_32Q_as_A __pyx_string_tab[1397]
#define __pyx_kp_b_iso88591_D_k_fAQ_1_1A_aq_wc_l_0_1 __pyx_string_tab[1398]
#define __pyx_kp_b_iso88591_D_q_L_q_U_a_2_6a_1_q_A_a_j_7_Q __pyx_string_tab[1399]
#define __pyx_kp_b_iso88591_D_q_L_q_U_a_2_6a_1_q_A_j_7_Q_a __pyx_string_tab[1400]
#define __pyx_kp_b_iso88591_D_q_a_a_t1_k_AYfF_1_7_Q_a_4AXQ __pyx_string_tab[1401]
#define __pyx_kp_b_iso88591_D_q_a_a_t1_k_A_7xy_7_Q_a_4AXQ_v __pyx_string_tab[1402]
#define __pyx_kp_b_iso88591_D_q_a_a_t1_k_hivV1A_7_Q_a_4AXQ __pyx_string_tab[1403]
#define __pyx_kp_b_iso88591_G_Q_gZq __pyx_string_tab[1404]
#define __pyx_kp_b_iso88591_GqH___vRr_F_Q_j_A_Qa_Q_j_a_wc_l __pyx_string_tab[1405]
#define __pyx_kp_b_iso88591_H_q_Qk_a_RS_wc_l_0_z_A_q_vQa_wc __pyx_string_tab[1406]
#define __pyx_kp_b_iso88591_IWAQ_8_1A_t1_j_1_A_wc_l_0_6 __pyx_string_tab[1407]
#define __pyx_kp_b_iso88591_IWAQ_8_1A_t1_j_A_wc_l_0_6 __pyx_string_tab[1408]
#define __pyx_kp_b_iso88591_I_A_1_1_1_1_S_l_Faq_1 __pyx_string_tab[1409]
#define __pyx_kp_b_iso88591_I_aq_wc_l_0_1 __pyx_string_tab[1410]
#define __pyx_kp_b_iso88591_K1_1_q_vQa_wc_k_1Jm1Kq_7_Q_a_4A __pyx_string_tab[1411]
#define __pyx_kp_b_iso88591_K1_4A_q_1_1_wc_l_0_1 __pyx_string_tab[1412]
#define __pyx_kp_b_iso88591_K1_S_6b_gWA_wfAQ_S_q_k_q_Q_7_Q __pyx_string_tab[1413]
#define __pyx_kp_b_iso88591_L_Q_1A_k_6_2_1_Qm1_fA5PPRRS_Q_k __pyx_string_tab[1414]
#define __pyx_kp_b_iso88591_MQ_Bb_1_j_Gq_STTU_1_Q_6 __pyx_string_tab[1415]
#define __pyx_kp_b_iso88591_MZWffg_wc_l_0_1 __pyx_string_tab[1416]
#define __pyx_kp_b_iso88591_M_C1_a_U_q_q_t1_j_t1_AQ_j_q_e_7 __pyx_string_tab[1417]
#define __pyx_kp_b_iso88591_M_C1_a_t1_j_0_e_7_Q_a_4AXQ_q_AQ __pyx_string_tab[1418]
#define __pyx_kp_b_iso88591_M_C1_a_t1_j_0_e_A_7_Q_a_4AXQ_q __pyx_string_tab[1419]
#define __pyx_kp_b_iso88591_N __pyx_string_tab[1420]
#define __pyx_kp_b_iso88591_Q __pyx_string_tab[1421]
#define __pyx_kp_b_iso88591_QQR_IWAQ_I_1A_t1_j_a_q_q_7_Q_a __pyx_string_tab[1422]
#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[1423]
#define __pyx_kp_b_iso88591_Q_3 __pyx_string_tab[1424]
#define __pyx_kp_b_iso88591_Q_31O_Qa_wc_l_0_1 __pyx_string_tab[1425]
#define __pyx_kp_b_iso88591_Q_4 __pyx_string_tab[1426]
#define __pyx_kp_b_iso88591_Q_4A_1_wc_l_0_q_AV4q __pyx_string_tab[1427]
#define __pyx_kp_b_iso88591_Q_5 __pyx_string_tab[1428]
#define __pyx_kp_b_iso88591_Q_5Qa_wc_l_0_1 __pyx_string_tab[1429]
#define __pyx_kp_b_iso88591_Q_6 __pyx_string_tab[1430]
#define __pyx_kp_b_iso88591_Q_7 __pyx_string_tab[1431]
#define __pyx_kp_b_iso88591_Q_8 __pyx_string_tab[1432]
#define __pyx_kp_b_iso88591_Q_A __pyx_string_tab[1433]
#define __pyx_kp_b_iso88591_Q_NhVWWX_wc_l_0_81 __pyx_string_tab[1434]
#define __pyx_kp_b_iso88591_Q_PPQ_Bc_Cq_j_Q_J_9TUUV_a_Q_6 __pyx_string_tab[1435]
#define __pyx_kp_b_iso88591_Q_PPZZ_wc_l_0_1 __pyx_string_tab[1436]
#define __pyx_kp_b_iso88591_Q_PPZZeef_wc_l_0_1 __pyx_string_tab[1437]
#define __pyx_kp_b_iso88591_Q_Q __pyx_string_tab[1438]
#define __pyx_kp_b_iso88591_Q_Q_2 __pyx_string_tab[1439]
#define __pyx_kp_b_iso88591_Q_fAQ_Qa_a_wc_l_0_1 __pyx_string_tab[1440]
#define __pyx_kp_b_iso88591_Q_j_Q_NhVbbc_wc_l_0_1 __pyx_string_tab[1441]
#define __pyx_kp_b_iso88591_Q_q_q_q_a_wc_l_0_vQa_t1_k_a_Q_7 __pyx_string_tab[1442]
#define __pyx_kp_b_iso88591_Q_wa_c_2_1_Qm1_A_1_G6_S_k_fA5PP __pyx_string_tab[1443]
#define __pyx_kp_b_iso88591_QfCs_Cq_AT_D_3at1D_4q_q_AT_D_Qd __pyx_string_tab[1444]
#define __pyx_kp_b_iso88591_Qk_wc_l_0_A_4q_A_Q_d __pyx_string_tab[1445]
#define __pyx_kp_b_iso88591_Ql_wc_l_0 __pyx_string_tab[1446]
#define __pyx_kp_b_iso88591_QoQ_wc_l_0 __pyx_string_tab[1447]
#define __pyx_kp_b_iso88591_UUV_Fa_1F_Mdde_t3a_AQ_j_1A_wc_l __pyx_string_tab[1448]
#define __pyx_kp_b_iso88591_UUV_wc_l_0_1 __pyx_string_tab[1449]
#define __pyx_kp_b_iso88591_U_XRq_6_Cr_HE __pyx_string_tab[1450]
#define __pyx_kp_b_iso88591_U_XRq_HE_6_A __pyx_string_tab[1451]
#define __pyx_kp_b_iso88591_U_XRq_HE_6_A_2 __pyx_string_tab[1452]
#define __pyx_kp_b_iso88591_U_XRq_HHBfA __pyx_string_tab[1453]
#define __pyx_kp_b_iso88591_U_XRq_HKr_vRq __pyx_string_tab[1454]
#define __pyx_kp_b_iso88591_WJa_wj __pyx_string_tab[1455]
#define __pyx_kp_b_iso88591_WJiWbbc_Cxs __pyx_string_tab[1456]
#define __pyx_kp_b_iso88591_Zq_9Ja_9Ja_q_EQ_q_1_S_l_OqPQ_1 __pyx_string_tab[1457]
#define __pyx_kp_b_iso88591__10 __pyx_string_tab[1458]
#define __pyx_kp_b_iso88591_a __pyx_string_tab[1459]
#define __pyx_kp_b_iso88591_a_1 __pyx_string_tab[1460]
#define __pyx_kp_b_iso88591_a_1A __pyx_string_tab[1461]
#define __pyx_kp_b_iso88591_a_1A_wc_l_0_6 __pyx_string_tab[1462]
#define __pyx_kp_b_iso88591_a_1Cq_wc_l_0_6 __pyx_string_tab[1463]
#define __pyx_kp_b_iso88591_a_31_t1_k_hiq_7_Q_a_4AXQ_vQ_AQ __pyx_string_tab[1464]
#define __pyx_kp_b_iso88591_a_31_t1_k_q_hivV1A_7_Q_a_4AXQ_v __pyx_string_tab[1465]
#define __pyx_kp_b_iso88591_a_4A_1A_wc_l_0_1 __pyx_string_tab[1466]
#define __pyx_kp_b_iso88591_a_4_Q_1_t_V7_U_E_a_Q_U_q_q __pyx_string_tab[1467]
#define __pyx_kp_b_iso88591_a_4q_ar_j __pyx_string_tab[1468]
#define __pyx_kp_b_iso88591_a_5Ql_AQ_wc_l_0_4q __pyx_string_tab[1469]
#define __pyx_kp_b_iso88591_a_A_B_1_d_a_t1Kq_1Cq_U_6_QgQd_2 __pyx_string_tab[1470]
#define __pyx_kp_b_iso88591_a_B_1_wc_l_0_1 __pyx_string_tab[1471]
#define __pyx_kp_b_iso88591_a_EQ __pyx_string_tab[1472]
#define __pyx_kp_b_iso88591_a_Q __pyx_string_tab[1473]
#define __pyx_kp_b_iso88591_a_QQR_wc_l_0_1 __pyx_string_tab[1474]
#define __pyx_kp_b_iso88591_a_Q_s_1_Q_a_wc_l_0_1 __pyx_string_tab[1475]
#define __pyx_kp_b_iso88591_a_S_8 __pyx_string_tab[1476]
#define __pyx_kp_b_iso88591_a_a_Qa_wc_l_0_4q __pyx_string_tab[1477]
#define __pyx_kp_b_iso88591_aq __pyx_string_tab[1478]
#define __pyx_kp_b_iso88591_aq_wc_l_0_6 __pyx_string_tab[1479]
#define __pyx_kp_b_iso88591_az_5 __pyx_string_tab[1480]
#define __pyx_kp_b_iso88591_e_f_A_A_B_q_A_q_s_1_Q_s_rQTTVVW __pyx_string_tab[1481]
#define __pyx_kp_b_iso88591_ggh_9_7wa_Qk_1A_wc_q_4q __pyx_string_tab[1482]
#define __pyx_kp_b_iso88591_hfAQ_aq_E_aq_U_1_3e_has_Rq __pyx_string_tab[1483]
#define __pyx_kp_b_iso88591_ivQa_E_aq_q_5_q_5 __pyx_string_tab[1484]
#define __pyx_kp_b_iso88591_j_aq_A_7_A_E_aq_4s_Rr_A_U_1_r_F __pyx_string_tab[1485]
#define __pyx_kp_b_iso88591_j_aq_A_E_aq_b_Q_U_1_3fA __pyx_string_tab[1486]
#define __pyx_kp_b_iso88591_j_aq_E_aq_U_1_1Cq_wb_4q_Cwb __pyx_string_tab[1487]
#define __pyx_kp_b_iso88591_j_aq_E_aq_U_1_az_Q_82Q_1_1 __pyx_string_tab[1488]
#define __pyx_kp_b_iso88591_j_aq_E_aq_U_1_j_Cr_E_1A __pyx_string_tab[1489]
#define __pyx_kp_b_iso88591_j_aq_L_E_aq_U_1_3fA __pyx_string_tab[1490]
#define __pyx_kp_b_iso88591_j_aq_Q_E_aq_U_1_4q_3d_A_d_Qc_82 __pyx_string_tab[1491]
#define __pyx_kp_b_iso88591_k_1_8_e2Q_2Q_k_A_1_1_q_1_wc_l_0 __pyx_string_tab[1492]
#define __pyx_kp_b_iso88591_k_q_E_aq_QfKq_3b_1Ct2Q __pyx_string_tab[1493]
#define __pyx_kp_b_iso88591_m1_7q_A_q_q_wc_l_0_1 __pyx_string_tab[1494]
#define __pyx_kp_b_iso88591_q __pyx_string_tab[1495]
#define __pyx_kp_b_iso88591_q0B __pyx_string_tab[1496]
#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[1497]
#define __pyx_kp_b_iso88591_q_4A_2_7_wc_l_0_1 __pyx_string_tab[1498]
#define __pyx_kp_b_iso88591_q_4A_wc_l_0_6 __pyx_string_tab[1499]
#define __pyx_kp_b_iso88591_q_9T__5_O_Zjjuuv_Cxs __pyx_string_tab[1500]
#define __pyx_kp_b_iso88591_q_9_7wa_a_9CwcQRRS_wc_l_0_z_A_q __pyx_string_tab[1501]
#define __pyx_kp_b_iso88591_q_9_7wa_ay_7_QkYZZ_wc_l_0_WA_9 __pyx_string_tab[1502]
#define __pyx_kp_b_iso88591_q_A_1_1_wc_l_0 __pyx_string_tab[1503]
#define __pyx_kp_b_iso88591_q_A_wc_l_0 __pyx_string_tab[1504]
#define __pyx_kp_b_iso88591_q_WA_t1_j_q_e_7_Q_a_4AXQ_q_A_1 __pyx_string_tab[1505]
#define __pyx_kp_b_iso88591_q_a_Q_7_Q_a_4AXQ_q_1 __pyx_string_tab[1506]
#define __pyx_kp_b_iso88591_q_a_Qa_wc_l_0_4q __pyx_string_tab[1507]
#define __pyx_kp_b_iso88591_q_a_a_wc_l_0_1 __pyx_string_tab[1508]
#define __pyx_kp_b_iso88591_q_a_q_Q_7_Q_a_4AXQ_q_1 __pyx_string_tab[1509]
#define __pyx_kp_b_iso88591_q_q_wc_l_0 __pyx_string_tab[1510]
#define __pyx_kp_b_iso88591_q_wc_l_0_6 __pyx_string_tab[1511]
#define __pyx_kp_b_iso88591_s_1_wa_mS___wc_l_0 __pyx_string_tab[1512]
#define __pyx_kp_b_iso88591_t3a_j_q_1_A_wc_l_0_1 __pyx_string_tab[1513]
#define __pyx_kp_b_iso88591_xq_Rr_D_Rr_D_Rr_Cr_Rr_1 __pyx_string_tab[1514]
#define __pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A __pyx_string_tab[1515]
#define __pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_2 __pyx_string_tab[1516]
#define __pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_ZuA_1HA_1 __pyx_string_tab[1517]
#define __pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_ZuA_axq_1 __pyx_string_tab[1518]
#define __pyx_n_b_O __pyx_string_tab[1519]
#define __pyx_float_0_0 __pyx_number_tab[0]
#define __pyx_float_0_1 __pyx_number_tab[1]
#define __pyx_float_4_0 __pyx_number_tab[2]
#define __pyx_float_44100_0 __pyx_number_tab[3]
#define __pyx_int_0 __pyx_number_tab[4]
#define __pyx_int_neg_1 __pyx_number_tab[5]
#define __pyx_int_1 __pyx_number_tab[6]
#define __pyx_int_2 __pyx_number_tab[7]
#define __pyx_int_4 __pyx_number_tab[8]
#define __pyx_int_8 __pyx_number_tab[9]
#define __pyx_int_16 __pyx_number_tab[10]
#define __pyx_int_24 __pyx_number_tab[11]
#define __pyx_int_127 __pyx_number_tab[12]
#define __pyx_int_255 __pyx_number_tab[13]
#define __pyx_int_neg_10860 __pyx_number_tab[14]
#define __pyx_int_neg_10861 __pyx_number_tab[15]
#define __pyx_int_neg_10862 __pyx_number_tab[16]
#define __pyx_int_neg_10863 __pyx_number_tab[17]
#define __pyx_int_neg_10864 __pyx_number_tab[18]
#define __pyx_int_44100 __pyx_number_tab[19]
#define __pyx_int_136983863 __pyx_number_tab[20]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_9coremusic_4capi_AudioPlayer);
  Py_CLEAR(clear_module_state->__pyx_type_9coremusic_4capi_AudioPlayer);
  Py_CLEAR(clear_module_state->__pyx_ptype_9coremusic_4capi_AudioRecorder);
  Py_CLEAR(clear_module_state->__pyx_type_9coremusic_4capi_AudioRecorder);
  Py_CLEAR(clear_module_state->__pyx_ptype_9coremusic_4capi_CoreAudioObject);
  Py_CLEAR(clear_module_state->__pyx_type_9coremusic_4capi_CoreAudioObject);
  Py_CLEAR(clear_module_state->__pyx_array_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
  Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
  Py_CLEAR(clear_module_state->__pyx_memoryview_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
  Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
  for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
  for (int i=0; i<19; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<470; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1520; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<21; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_9coremusic_4capi_AudioPlayer);
  Py_VISIT(traverse_module_state->__pyx_type_9coremusic_4capi_AudioPlayer);
  Py_VISIT(traverse_module_state->__pyx_ptype_9coremusic_4capi_AudioRecorder);
  Py_VISIT(traverse_module_state->__pyx_type_9coremusic_4capi_AudioRecorder);
  Py_VISIT(traverse_module_state->__pyx_ptype_9coremusic_4capi_CoreAudioObject);
  Py_VISIT(traverse_module_state->__pyx_type_9coremusic_4capi_CoreAudioObject);
  Py_VISIT(traverse_module_state->__pyx_array_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
  Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
  Py_VISIT(traverse_module_state->__pyx_memoryview_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
  Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
  for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
  for (int i=0; i<19; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<470; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1520; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<21; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "View.MemoryView":129
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_itemsize,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_allocate_buffer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 129, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 129, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 129, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 129, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 129, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 129, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 129, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
    }
    __pyx_v_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 129, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 130, __pyx_L3_error)
    } else {

      /* "View.MemoryView":130
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
*/
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 129, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 129, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 129, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":129
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_dim;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[5];
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":135
 *         cdef Py_ssize_t dim
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
*/
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 135, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 135, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":136
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
*/
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":138
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
*/
  __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":139
 * 
 *         if not self.ndim:
 *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Empty_shape_tuple_for_cython_arr, 0, 0);
    __PYX_ERR(1, 139, __pyx_L1_error)

    /* "View.MemoryView":138
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
*/
  }

  /* "View.MemoryView":141
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
*/
  __pyx_t_2 = (__pyx_v_itemsize <= 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":142
 * 
 *         if itemsize <= 0:
 *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_itemsize_0_for_cython_array, 0, 0);
    __PYX_ERR(1, 142, __pyx_L1_error)

    /* "View.MemoryView":141
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
*/
  }

  /* "View.MemoryView":144
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
*/
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "View.MemoryView":145
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
*/
    __pyx_t_5 = __pyx_v_format;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":144
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
*/
  }

  /* "View.MemoryView":146
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
*/
  __pyx_t_4 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_4);
  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 146, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":147
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(1, 147, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_7;

  /* "View.MemoryView":150
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
*/
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":151
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
*/
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":153
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
*/
  __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
  if (unlikely(__pyx_t_3)) {

    /* "View.MemoryView":154
 * 
 *         if not self._shape:
 *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_shape_and_str, 0, 0);
    __PYX_ERR(1, 154, __pyx_L1_error)

    /* "View.MemoryView":153
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
*/
  }

  /* "View.MemoryView":157
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
*/
  __pyx_t_8 = 0;
  __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 157, __pyx_L1_error)
      #endif
      if (__pyx_t_1 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1));
    #else
    __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1);
    #endif
    ++__pyx_t_1;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_8;
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":158
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
*/
    __pyx_t_3 = (__pyx_v_dim <= 0);
    if (unlikely(__pyx_t_3)) {

      /* "View.MemoryView":159
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
*/
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis;
      __pyx_t_11[1] = __pyx_t_5;
      __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_;
      __pyx_t_11[3] = __pyx_t_10;
      __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127);
      if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __PYX_ERR(1, 159, __pyx_L1_error)

      /* "View.MemoryView":158
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
*/
    }

    /* "View.MemoryView":160
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
*/
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":157
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
*/
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "View.MemoryView":163
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 163, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "View.MemoryView":164
 *         cdef char order
 *         if mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         elif mode == 'fortran':
*/
    __pyx_v_order = 'C';

    /* "View.MemoryView":165
 *         if mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         elif mode == 'fortran':
 *             order = b'F'
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_c;

    /* "View.MemoryView":163
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
*/
    goto __pyx_L11;
  }

  /* "View.MemoryView":166
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 166, __pyx_L1_error)
  if (likely(__pyx_t_3)) {

    /* "View.MemoryView":167
 *             self.mode = u'c'
 *         elif mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         else:
*/
    __pyx_v_order = 'F';

    /* "View.MemoryView":168
 *         elif mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_fortran;

    /* "View.MemoryView":166
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
*/
    goto __pyx_L11;
  }

  /* "View.MemoryView":170
 *             self.mode = u'fortran'
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
*/
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __PYX_ERR(1, 170, __pyx_L1_error)
  }
  __pyx_L11:;

  /* "View.MemoryView":172
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
 * 
 *         self.free_data = allocate_buffer
*/
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":174
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 * 
*/
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":175
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 * 
 *         if allocate_buffer:
*/
  __pyx_t_12 = PyObject_RichCompare(__pyx_v_format, __pyx_mstate_global->__pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 175, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_3;

  /* "View.MemoryView":177
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
*/
  if (__pyx_v_allocate_buffer) {

    /* "View.MemoryView":178
 * 
 *         if allocate_buffer:
 *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    __pyx_t_8 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 178, __pyx_L1_error)

    /* "View.MemoryView":177
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
*/
  }

  /* "View.MemoryView":129
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":180
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
*/

/* Python wrapper */
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":182
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
*/
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":183
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
  __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":184
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
*/
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 184, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":185
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
      __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":184
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
*/
      goto __pyx_L4;
    }

    /* "View.MemoryView":186
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
*/
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":187
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
*/
      __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":186
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
*/
    }
    __pyx_L4:;

    /* "View.MemoryView":188
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
*/
    __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":189
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Can_only_create_a_buffer_that_is, 0, 0);
      __PYX_ERR(1, 189, __pyx_L1_error)

      /* "View.MemoryView":188
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
*/
    }

    /* "View.MemoryView":183
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
  }

  /* "View.MemoryView":190
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 * 
*/
  __pyx_t_2 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_2;

  /* "View.MemoryView":191
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
*/
  __pyx_t_3 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_3;

  /* "View.MemoryView":193
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":194
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *             info.shape = self._shape
 *             info.strides = self._strides
*/
    __pyx_t_4 = __pyx_v_self->ndim;
    __pyx_v_info->ndim = __pyx_t_4;

    /* "View.MemoryView":195
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim
 *             info.shape = self._shape             # <<<<<<<<<<<<<<
 *             info.strides = self._strides
 *         else:
*/
    __pyx_t_5 = __pyx_v_self->_shape;
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":196
 *             info.ndim = self.ndim
 *             info.shape = self._shape
 *             info.strides = self._strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.ndim = 1
*/
    __pyx_t_5 = __pyx_v_self->_strides;
    __pyx_v_info->strides = __pyx_t_5;

    /* "View.MemoryView":193
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
*/
    goto __pyx_L6;
  }

  /* "View.MemoryView":198
 *             info.strides = self._strides
 *         else:
 *             info.ndim = 1             # <<<<<<<<<<<<<<
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL
*/
  /*else*/ {
    __pyx_v_info->ndim = 1;

    /* "View.MemoryView":199
 *         else:
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
 *             info.strides = NULL
 * 
*/
    __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    if (__pyx_t_1) {
      __pyx_t_5 = (&__pyx_v_self->len);
    } else {
      __pyx_t_5 = NULL;
    }
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":200
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.suboffsets = NULL
*/
    __pyx_v_info->strides = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":202
 *             info.strides = NULL
 * 
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
*/
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":203
 * 
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
*/
  __pyx_t_3 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_3;

  /* "View.MemoryView":204
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self
*/
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":205
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {
    __pyx_t_2 = __pyx_v_self->format;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_info->format = __pyx_t_2;

  /* "View.MemoryView":206
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array 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);

  /* "View.MemoryView":180
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":208
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
*/

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":209
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
*/
  __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":210
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
*/
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":209
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":211
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
*/
  if (__pyx_v_self->free_data) {
  } else {
    __pyx_t_1 = __pyx_v_self->free_data;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->data != NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":212
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
*/
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":213
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
 *             free(self.data)
 *         PyObject_Free(self._shape)
*/
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":212
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
*/
    }

    /* "View.MemoryView":214
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
*/
    free(__pyx_v_self->data);

    /* "View.MemoryView":211
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":215
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":208
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
*/

  /* function exit code */
}

/* "View.MemoryView":217
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__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);

  /* "View.MemoryView":219
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":217
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":221
 *         return self.get_memview()
 * 
 *     @cname('get_memview')             # <<<<<<<<<<<<<<
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
*/

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_memview", 0);

  /* "View.MemoryView":223
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
*/
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":224
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":221
 *         return self.get_memview()
 * 
 *     @cname('get_memview')             # <<<<<<<<<<<<<<
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":226
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;

  /* "View.MemoryView":227
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
*/
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":226
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":229
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  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("__getattr__", 0);

  /* "View.MemoryView":230
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __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;

  /* "View.MemoryView":229
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":232
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
*/

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  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("__getitem__", 0);

  /* "View.MemoryView":233
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __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;

  /* "View.MemoryView":232
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":235
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
*/

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "View.MemoryView":236
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":235
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":245
 *         pass
 * 
 * @cname("__pyx_array_allocate_buffer")             # <<<<<<<<<<<<<<
 * cdef int _allocate_buffer(array self) except -1:
 * 
*/

static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_i;
  PyObject **__pyx_v_p;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":252
 *     cdef PyObject **p
 * 
 *     self.free_data = True             # <<<<<<<<<<<<<<
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
*/
  __pyx_v_self->free_data = 1;

  /* "View.MemoryView":253
 * 
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."
*/
  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

  /* "View.MemoryView":254
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
*/
  __pyx_t_1 = (!(__pyx_v_self->data != 0));
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":255
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
 * 
 *     if self.dtype_is_object:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_array_data, 0, 0);
    __PYX_ERR(1, 255, __pyx_L1_error)

    /* "View.MemoryView":254
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
*/
  }

  /* "View.MemoryView":257
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
*/
  if (__pyx_v_self->dtype_is_object) {

    /* "View.MemoryView":258
 * 
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
*/
    __pyx_v_p = ((PyObject **)__pyx_v_self->data);

    /* "View.MemoryView":259
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
*/
    if (unlikely(__pyx_v_self->itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 259, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 259, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize, 0);
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":260
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None             # <<<<<<<<<<<<<<
 *             Py_INCREF(Py_None)
 *     return 0
*/
      (__pyx_v_p[__pyx_v_i]) = Py_None;

      /* "View.MemoryView":261
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 *     return 0
 * 
*/
      Py_INCREF(Py_None);
    }

    /* "View.MemoryView":257
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
*/
  }

  /* "View.MemoryView":262
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":245
 *         pass
 * 
 * @cname("__pyx_array_allocate_buffer")             # <<<<<<<<<<<<<<
 * cdef int _allocate_buffer(array self) except -1:
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":265
 * 
 * 
 * @cname("__pyx_array_new")             # <<<<<<<<<<<<<<
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
*/

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char const *__pyx_v_c_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  PyObject *__pyx_v_mode = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_cwrapper", 0);

  /* "View.MemoryView":268
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
 * 
 *     if buf is NULL:
*/
  __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
    __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c;
  }
  __pyx_v_mode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":270
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
*/
  __pyx_t_2 = (__pyx_v_buf == NULL);
  if (__pyx_t_2) {

    /* "View.MemoryView":271
 * 
 *     if buf is NULL:
 *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
*/
    __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 271, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 271, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 271, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 271, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":270
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":273
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
*/
  /*else*/ {
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 273, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 273, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 273, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":274
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":276
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":265
 * 
 * 
 * @cname("__pyx_array_new")             # <<<<<<<<<<<<<<
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mode);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":302
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
*/

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 302, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 302, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 302, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 302, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 302, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "View.MemoryView":303
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
*/
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":302
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
*/

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":304
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
*/

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":305
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":304
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
*/
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None and _dict:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = ('self.name is not None',)
*/
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = ('self.name is not None',)             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
*/
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_mstate_global->__pyx_tuple[0]); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 11, __pyx_L1_error)
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = ('self.name is not None',)
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
*/
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = ('self.name is not None',)
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = ('self.name is not None',)
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
*/
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(1, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":348
 *     cdef const __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
*/

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_dtype_is_object,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 348, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 348, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 348, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 348, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 348, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 348, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 348, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_intptr_t __pyx_t_4;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "View.MemoryView":349
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
*/
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":350
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
*/
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":351
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
*/
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_obj != Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":352
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
*/
    __pyx_t_3 = PyObject_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error)

    /* "View.MemoryView":353
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
*/
    __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":354
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
*/
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":355
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
*/
      Py_INCREF(Py_None);

      /* "View.MemoryView":353
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
*/
    }

    /* "View.MemoryView":351
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
*/
  }

  /* "View.MemoryView":357
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and
*/
  __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
  if (__pyx_t_1) {

    /* "View.MemoryView":359
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L9_bool_binop_done;
    }

    /* "View.MemoryView":361
 *             if (__pyx_memoryview_thread_locks_used < 8 and
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
*/
    __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING());
    __pyx_t_1 = __pyx_t_2;
    __pyx_L9_bool_binop_done:;

    /* "View.MemoryView":359
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    if (__pyx_t_1) {

      /* "View.MemoryView":362
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
*/
      __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

      /* "View.MemoryView":363
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
*/
      __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

      /* "View.MemoryView":359
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    }

    /* "View.MemoryView":364
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
*/
    __pyx_t_1 = (__pyx_v_self->lock == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":365
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *                 if self.lock is NULL:
 *                     raise MemoryError
*/
      __pyx_v_self->lock = PyThread_allocate_lock();

      /* "View.MemoryView":366
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
*/
      __pyx_t_1 = (__pyx_v_self->lock == NULL);
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":367
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 *                     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
*/
        PyErr_NoMemory(); __PYX_ERR(1, 367, __pyx_L1_error)

        /* "View.MemoryView":366
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
*/
      }

      /* "View.MemoryView":364
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
*/
    }

    /* "View.MemoryView":357
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and
*/
  }

  /* "View.MemoryView":369
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":370
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
*/
    __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    __pyx_t_1 = __pyx_t_2;
    __pyx_L14_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":369
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
*/
    goto __pyx_L13;
  }

  /* "View.MemoryView":372
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
*/
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L13:;

  /* "View.MemoryView":374
 *             self.dtype_is_object = dtype_is_object
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
 *         self.typeinfo = NULL
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    if (unlikely(__pyx_t_5 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 374, __pyx_L1_error)
    }
    __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 374, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 374, __pyx_L1_error)
  #endif

  /* "View.MemoryView":375
 * 
 *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
*/
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":348
 *     cdef const __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":377
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
*/

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyThread_type_lock __pyx_t_5;
  PyThread_type_lock __pyx_t_6;

  /* "View.MemoryView":378
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
*/
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":379
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
*/
    PyBuffer_Release((&__pyx_v_self->view));

    /* "View.MemoryView":378
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":380
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
*/
  __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":382
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
 *             Py_DECREF(Py_None)
 * 
*/
    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;

    /* "View.MemoryView":383
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
*/
    Py_DECREF(Py_None);

    /* "View.MemoryView":380
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":387
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
*/
  __pyx_t_1 = (__pyx_v_self->lock != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":388
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
*/
    __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING();
    if (__pyx_t_1) {
      __pyx_t_2 = 0;
    } else {
      __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    }
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":389
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
*/
      __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
      if (__pyx_t_1) {

        /* "View.MemoryView":390
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
*/
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":391
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
*/
        __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
        if (__pyx_t_1) {

          /* "View.MemoryView":393
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
*/
          __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":392
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
*/
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;

          /* "View.MemoryView":391
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
*/
        }

        /* "View.MemoryView":394
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
*/
        goto __pyx_L6_break;

        /* "View.MemoryView":389
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
*/
      }
    }
    /*else*/ {

      /* "View.MemoryView":396
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
*/
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":387
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
*/
  }

  /* "View.MemoryView":377
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
*/

  /* function exit code */
}

/* "View.MemoryView":398
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
*/

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item_pointer", 0);

  /* "View.MemoryView":400
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
*/
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":402
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
*/
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 402, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 402, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 402, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 402, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":403
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
*/
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 403, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 403, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":402
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":405
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":398
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":408
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  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;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":409
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  if (__pyx_t_1) {

    /* "View.MemoryView":410
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":409
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  }

  /* "View.MemoryView":412
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
*/
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 412, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 412, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_indices = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "View.MemoryView":415
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 415, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":416
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":415
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
*/
  }

  /* "View.MemoryView":418
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
*/
  /*else*/ {
    __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(1, 418, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_5;

    /* "View.MemoryView":419
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":408
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":421
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
*/

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":422
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
*/
  if (unlikely(__pyx_v_self->view.readonly)) {

    /* "View.MemoryView":423
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Cannot_assign_to_read_only_memor, 0, 0);
    __PYX_ERR(1, 423, __pyx_L1_error)

    /* "View.MemoryView":422
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
*/
  }

  /* "View.MemoryView":425
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
*/
  __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(__pyx_t_1 != Py_None)) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 425, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 425, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":427
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj is not None:
*/
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 427, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":428
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj is not None:
 *                 self.setitem_slice_assignment(self[index], obj)
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_obj = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "View.MemoryView":429
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj is not None:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
*/
    __pyx_t_4 = (__pyx_v_obj != Py_None);
    if (__pyx_t_4) {

      /* "View.MemoryView":430
 *             obj = self.is_slice(value)
 *             if obj is not None:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
*/
      __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "View.MemoryView":429
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj is not None:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":432
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
*/
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 432, __pyx_L1_error)
      __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "View.MemoryView":427
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj is not None:
*/
    goto __pyx_L4;
  }

  /* "View.MemoryView":434
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
*/
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":421
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":436
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
*/

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":437
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "View.MemoryView":438
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":439
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
*/
        __pyx_t_7 = NULL;
        __pyx_t_8 = __Pyx_PyLong_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 439, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);

        /* "View.MemoryView":440
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
*/
        __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 440, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_obj, __pyx_t_8, __pyx_t_9};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 439, __pyx_L4_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_6);
        }
        __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "View.MemoryView":438
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "View.MemoryView":441
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
      if (__pyx_t_11) {
        __Pyx_ErrRestore(0,0,0);

        /* "View.MemoryView":442
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;

      /* "View.MemoryView":438
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":437
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
*/
  }

  /* "View.MemoryView":444
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":436
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":446
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
*/

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  __Pyx_memviewslice __pyx_v_msrc;
  __Pyx_memviewslice __pyx_v_mdst;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  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("setitem_slice_assignment", 0);

  /* "View.MemoryView":449
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
*/
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
  __pyx_v_msrc = (__pyx_t_1[0]);

  /* "View.MemoryView":450
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
*/
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 450, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 450, __pyx_L1_error)
  __pyx_v_mdst = (__pyx_t_1[0]);

  /* "View.MemoryView":452
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 452, __pyx_L1_error)

  /* "View.MemoryView":446
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":454
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
*/

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[128];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);

  /* "View.MemoryView":456
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
*/
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":461
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 461, __pyx_L1_error)
  __pyx_v_dst_slice = __pyx_t_1;

  /* "View.MemoryView":463
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
*/
  __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
  if (__pyx_t_2) {

    /* "View.MemoryView":464
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
*/
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":465
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
*/
    __pyx_t_2 = (__pyx_v_tmp == NULL);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":466
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
*/
      PyErr_NoMemory(); __PYX_ERR(1, 466, __pyx_L1_error)

      /* "View.MemoryView":465
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
*/
    }

    /* "View.MemoryView":467
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
*/
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":463
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":469
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":471
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
*/
  /*try:*/ {

    /* "View.MemoryView":472
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
*/
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":473
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
*/
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":472
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
*/
      goto __pyx_L8;
    }

    /* "View.MemoryView":475
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":479
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
*/
    __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":480
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
*/
      __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 480, __pyx_L6_error)

      /* "View.MemoryView":479
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
*/
    }

    /* "View.MemoryView":481
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
*/
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":484
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
*/
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      __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_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":454
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":486
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
*/

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_indexed", 0);

  /* "View.MemoryView":487
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 487, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":488
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":486
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":490
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":493
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":496
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
*/
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":497
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":498
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"
*/
      __pyx_t_5 = __pyx_v_struct;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unpack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":497
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
    }

    /* "View.MemoryView":502
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
*/
    /*else:*/ {
      __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 502, __pyx_L5_except_error)
      __pyx_t_9 = (__pyx_t_8 == 1);
      if (__pyx_t_9) {

        /* "View.MemoryView":503
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 503, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":502
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
*/
      }

      /* "View.MemoryView":504
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":499
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Unable to convert item to object"
 *         else:
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 499, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_5);
    __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
    if (__pyx_t_11) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 499, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "View.MemoryView":500
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Unable_to_convert_item_to_object, 0, 0);
      __PYX_ERR(1, 500, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "View.MemoryView":497
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":490
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":506
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  char *__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":509
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 509, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":514
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
*/
  __pyx_t_3 = PyTuple_Check(__pyx_v_value); 
  if (__pyx_t_3) {

    /* "View.MemoryView":515
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 515, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 515, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":514
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":517
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
*/
  /*else*/ {
    __pyx_t_6 = __pyx_v_struct;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 517, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":519
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
*/
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 519, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_9 = __pyx_v_bytesvalue;
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely(__pyx_t_11 == ((char *)NULL))) __PYX_ERR(1, 519, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 519, __pyx_L1_error)
  __pyx_t_13 = (__pyx_t_11 + __pyx_t_12);
  for (__pyx_t_14 = __pyx_t_11; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
    __pyx_t_10 = __pyx_t_14;
    __pyx_v_c = (__pyx_t_10[0]);

    /* "View.MemoryView":520
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    __pyx_v_i = __pyx_t_8;

    /* "View.MemoryView":519
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
*/
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":520
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "View.MemoryView":506
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":522
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
*/

/* Python wrapper */
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  char *__pyx_t_4;
  void *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":524
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
*/
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":525
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Cannot_create_writable_memory_vi, 0, 0);
    __PYX_ERR(1, 525, __pyx_L1_error)

    /* "View.MemoryView":524
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
*/
  }

  /* "View.MemoryView":527
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":528
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_3;

    /* "View.MemoryView":527
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
*/
    goto __pyx_L6;
  }

  /* "View.MemoryView":530
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
*/
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":532
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":533
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_3;

    /* "View.MemoryView":532
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
*/
    goto __pyx_L7;
  }

  /* "View.MemoryView":535
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
*/
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":537
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":538
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_3;

    /* "View.MemoryView":537
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
*/
    goto __pyx_L8;
  }

  /* "View.MemoryView":540
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
*/
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":542
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":543
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
*/
    __pyx_t_4 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":542
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
*/
    goto __pyx_L9;
  }

  /* "View.MemoryView":545
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
*/
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":547
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
*/
  __pyx_t_5 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_5;

  /* "View.MemoryView":548
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
*/
  __pyx_t_6 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":549
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
*/
  __pyx_t_7 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_7;

  /* "View.MemoryView":550
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
*/
  __pyx_t_7 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_7;

  /* "View.MemoryView":551
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
*/
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":552
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = 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);

  /* "View.MemoryView":522
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":555
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":557
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
*/
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 557, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":558
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 558, __pyx_L1_error)

  /* "View.MemoryView":559
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":555
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":561
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__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);

  /* "View.MemoryView":563
 *     @property
 *     def base(self):
 *         return self._get_base()             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":561
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":565
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
*/

static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 0);

  /* "View.MemoryView":566
 * 
 *     cdef _get_base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":565
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":568
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_7genexpr__pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":570
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 570, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":568
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":572
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":574
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
*/
  __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":576
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Buffer_view_does_not_expose_stri, 0, 0);
    __PYX_ERR(1, 576, __pyx_L1_error)

    /* "View.MemoryView":574
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
*/
  }

  /* "View.MemoryView":578
 *             raise ValueError, "Buffer view does not expose strides"
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 578, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":572
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":580
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":582
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
*/
  __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":583
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[1], __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":582
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
*/
  }

  /* "View.MemoryView":585
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 585, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":580
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":587
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__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);

  /* "View.MemoryView":589
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":587
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":591
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__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);

  /* "View.MemoryView":593
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":591
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":595
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__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);

  /* "View.MemoryView":597
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 597, __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_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":595
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":599
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":601
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
*/
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":602
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __pyx_v_result = __pyx_mstate_global->__pyx_int_1;

    /* "View.MemoryView":604
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
*/
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_t_5 = PyLong_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "View.MemoryView":605
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
*/
      __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
      __pyx_t_5 = 0;
    }

    /* "View.MemoryView":607
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
*/
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":601
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
*/
  }

  /* "View.MemoryView":609
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":599
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":611
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
*/

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":612
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
*/
  __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":613
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
*/
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":612
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
*/
  }

  /* "View.MemoryView":615
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":611
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":617
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":618
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":619
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
  __pyx_t_4[1] = __pyx_t_2;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
  __pyx_t_4[3] = __pyx_t_3;
  __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__3;

  /* "View.MemoryView":618
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
*/
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":617
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":621
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "View.MemoryView":622
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
  __pyx_t_3[1] = __pyx_t_2;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_object;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":621
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":625
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_c_contig", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_c_contig", 0);

  /* "View.MemoryView":628
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 628, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":629
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":625
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":631
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_f_contig", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_f_contig", 0);

  /* "View.MemoryView":634
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 634, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":635
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":631
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":637
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "View.MemoryView":639
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
*/
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":641
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
*/
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":642
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
*/
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 642, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":647
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":637
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":649
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy_fortran", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_fortran", 0);

  /* "View.MemoryView":651
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
*/
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":653
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
*/
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":654
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
*/
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 654, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":659
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":649
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":662
 * 
 * 
 * @cname('__pyx_memoryview_new')             # <<<<<<<<<<<<<<
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
*/

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo const *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);

  /* "View.MemoryView":664
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_o, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 664, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":665
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":666
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":662
 * 
 * 
 * @cname('__pyx_memoryview_new')             # <<<<<<<<<<<<<<
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":668
 *     return result
 * 
 * @cname('__pyx_memoryview_check')             # <<<<<<<<<<<<<<
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)
*/

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":670
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":668
 *     return result
 * 
 * @cname('__pyx_memoryview_check')             # <<<<<<<<<<<<<<
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":672
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
*/

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_idx;
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6[3];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unellipsify", 0);

  /* "View.MemoryView":678
 *     """
 *     cdef Py_ssize_t idx
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
 * 
 *     result = [slice(None)] * ndim
*/
  __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
  if (__pyx_t_2) {
    __Pyx_INCREF(((PyObject*)__pyx_v_index));
    __pyx_t_1 = __pyx_v_index;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 678, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_tup = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":680
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
*/
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 680, __pyx_L1_error);
    }
  }
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":681
 * 
 *     result = [slice(None)] * ndim
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     idx = 0
*/
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":682
 *     result = [slice(None)] * ndim
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     idx = 0
 *     for item in tup:
*/
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":683
 *     have_slices = False
 *     seen_ellipsis = False
 *     idx = 0             # <<<<<<<<<<<<<<
 *     for item in tup:
 *         if item is Ellipsis:
*/
  __pyx_v_idx = 0;

  /* "View.MemoryView":684
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
*/
  if (unlikely(__pyx_v_tup == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 684, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 684, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4);
    #endif
    ++__pyx_t_4;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":685
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
*/
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    if (__pyx_t_2) {

      /* "View.MemoryView":686
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
*/
      __pyx_t_2 = (!__pyx_v_seen_ellipsis);
      if (__pyx_t_2) {

        /* "View.MemoryView":687
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             have_slices = True
*/
        if (unlikely(__pyx_v_tup == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(1, 687, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 687, __pyx_L1_error)
        __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));

        /* "View.MemoryView":688
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
*/
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":686
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
*/
      }

      /* "View.MemoryView":689
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if isinstance(item, slice):
*/
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":685
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":691
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
*/
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      if (__pyx_t_2) {

        /* "View.MemoryView":692
 *         else:
 *             if isinstance(item, slice):
 *                 have_slices = True             # <<<<<<<<<<<<<<
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
*/
        __pyx_v_have_slices = 1;

        /* "View.MemoryView":691
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
*/
        goto __pyx_L7;
      }

      /* "View.MemoryView":693
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
*/
      __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
      if (unlikely(__pyx_t_2)) {

        /* "View.MemoryView":694
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
 *             result[idx] = item
 *         idx += 1
*/
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type;
        __pyx_t_6[1] = __pyx_t_3;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__4;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 694, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(1, 694, __pyx_L1_error)

        /* "View.MemoryView":693
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
*/
      }
      __pyx_L7:;

      /* "View.MemoryView":695
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item             # <<<<<<<<<<<<<<
 *         idx += 1
 * 
*/
      if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 695, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "View.MemoryView":696
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
 *         idx += 1             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - idx
*/
    __pyx_v_idx = (__pyx_v_idx + 1);

    /* "View.MemoryView":684
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":698
 *         idx += 1
 * 
 *     nslices = ndim - idx             # <<<<<<<<<<<<<<
 *     return have_slices or nslices, tuple(result)
 * 
*/
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);

  /* "View.MemoryView":699
 * 
 *     nslices = ndim - idx
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
*/
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_L9_bool_binop_done:;
  __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 699, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 699, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":672
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":701
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
*/

static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  int __pyx_r;
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":702
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
*/
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":703
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
*/
    __pyx_t_4 = (__pyx_v_suboffset >= 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":704
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
 *     return 0  # return type just used as an error flag
 * 
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Indirect_dimensions_not_supporte, 0, 0);
      __PYX_ERR(1, 704, __pyx_L1_error)

      /* "View.MemoryView":703
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
*/
    }
  }

  /* "View.MemoryView":705
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":701
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":711
 * 
 * 
 * @cname('__pyx_memview_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
*/

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  Py_ssize_t __pyx_v_cindex;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_3;
  char *__pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memview_slice", 0);

  /* "View.MemoryView":713
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
*/
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":720
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
*/
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":724
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 724, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 724, __pyx_L1_error)
  #endif

  /* "View.MemoryView":726
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":727
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error)
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":728
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
*/
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":726
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":730
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
*/
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":731
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":737
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
*/
  __pyx_t_3 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_3;

  /* "View.MemoryView":738
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_4;

  /* "View.MemoryView":743
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step, cindex
*/
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":744
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step, cindex
 *     cdef bint have_start, have_stop, have_step
*/
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":748
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
*/
  __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 748, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_6;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 748, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
        #endif
        ++__pyx_t_6;
      }
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error)
    } else {
      __pyx_t_8 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 748, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_v_dim = __pyx_t_5;
    __pyx_t_5 = (__pyx_t_5 + 1);

    /* "View.MemoryView":749
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
*/
    __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":750
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             cindex = index             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
*/
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 750, __pyx_L1_error)
      __pyx_v_cindex = __pyx_t_9;

      /* "View.MemoryView":751
 *         if PyIndex_Check(index):
 *             cindex = index
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
*/
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 751, __pyx_L1_error)

      /* "View.MemoryView":749
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
*/
      goto __pyx_L6;
    }

    /* "View.MemoryView":757
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
*/
    __pyx_t_1 = (__pyx_v_index == Py_None);
    if (__pyx_t_1) {

      /* "View.MemoryView":758
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
*/
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":759
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
*/
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":760
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
*/
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":761
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
*/
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":757
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
*/
      goto __pyx_L6;
    }

    /* "View.MemoryView":763
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
*/
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_9;

      /* "View.MemoryView":764
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_9;

      /* "View.MemoryView":765
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 765, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 765, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_9;

      /* "View.MemoryView":767
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":768
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":769
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":771
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
*/
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 771, __pyx_L1_error)

      /* "View.MemoryView":777
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
*/
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":748
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":779
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":780
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":781
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
*/
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }

    /* "View.MemoryView":782
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
*/
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 782, __pyx_L1_error) }

    /* "View.MemoryView":780
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
*/
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 780, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":779
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
*/
  }

  /* "View.MemoryView":785
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":786
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "View.MemoryView":785
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
*/
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 785, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":711
 * 
 * 
 * @cname('__pyx_memview_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":793
 * 
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')             # <<<<<<<<<<<<<<
 * cdef int slice_memviewslice(
 *         __Pyx_memviewslice *dst,
*/

static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
  Py_ssize_t __pyx_v_new_shape;
  int __pyx_v_negative_step;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":814
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
*/
  __pyx_t_1 = (!__pyx_v_is_slice);
  if (__pyx_t_1) {

    /* "View.MemoryView":816
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
*/
    __pyx_t_1 = (__pyx_v_start < 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":817
 * 
 *         if start < 0:
 *             start += shape             # <<<<<<<<<<<<<<
 *         if not 0 <= start < shape:
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
*/
      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

      /* "View.MemoryView":816
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
*/
    }

    /* "View.MemoryView":818
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
*/
    __pyx_t_1 = (0 <= __pyx_v_start);
    if (__pyx_t_1) {
      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
    }
    __pyx_t_2 = (!__pyx_t_1);
    if (__pyx_t_2) {

      /* "View.MemoryView":819
 *             start += shape
 *         if not 0 <= start < shape:
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
 *     else:
 * 
*/
      __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 819, __pyx_L1_error)

      /* "View.MemoryView":818
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
*/
    }

    /* "View.MemoryView":814
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":822
 *     else:
 * 
 *         if have_step:             # <<<<<<<<<<<<<<
 *             negative_step = step < 0
 *             if step == 0:
*/
  /*else*/ {
    __pyx_t_2 = (__pyx_v_have_step != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":823
 * 
 *         if have_step:
 *             negative_step = step < 0             # <<<<<<<<<<<<<<
 *             if step == 0:
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
*/
      __pyx_v_negative_step = (__pyx_v_step < 0);

      /* "View.MemoryView":824
 *         if have_step:
 *             negative_step = step < 0
 *             if step == 0:             # <<<<<<<<<<<<<<
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
*/
      __pyx_t_2 = (__pyx_v_step == 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":825
 *             negative_step = step < 0
 *             if step == 0:
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             negative_step = False
*/
        __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 825, __pyx_L1_error)

        /* "View.MemoryView":824
 *         if have_step:
 *             negative_step = step < 0
 *             if step == 0:             # <<<<<<<<<<<<<<
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
*/
      }

      /* "View.MemoryView":822
 *     else:
 * 
 *         if have_step:             # <<<<<<<<<<<<<<
 *             negative_step = step < 0
 *             if step == 0:
*/
      goto __pyx_L6;
    }

    /* "View.MemoryView":827
 *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
 *         else:
 *             negative_step = False             # <<<<<<<<<<<<<<
 *             step = 1
 * 
*/
    /*else*/ {
      __pyx_v_negative_step = 0;

      /* "View.MemoryView":828
 *         else:
 *             negative_step = False
 *             step = 1             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_v_step = 1;
    }
    __pyx_L6:;

    /* "View.MemoryView":831
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
*/
    __pyx_t_2 = (__pyx_v_have_start != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":832
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
*/
      __pyx_t_2 = (__pyx_v_start < 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":833
 *         if have_start:
 *             if start < 0:
 *                 start += shape             # <<<<<<<<<<<<<<
 *                 if start < 0:
 *                     start = 0
*/
        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

        /* "View.MemoryView":834
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
*/
        __pyx_t_2 = (__pyx_v_start < 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":835
 *                 start += shape
 *                 if start < 0:
 *                     start = 0             # <<<<<<<<<<<<<<
 *             elif start >= shape:
 *                 if negative_step:
*/
          __pyx_v_start = 0;

          /* "View.MemoryView":834
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
*/
        }

        /* "View.MemoryView":832
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
*/
        goto __pyx_L9;
      }

      /* "View.MemoryView":836
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
*/
      __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
      if (__pyx_t_2) {

        /* "View.MemoryView":837
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
*/
        if (__pyx_v_negative_step) {

          /* "View.MemoryView":838
 *             elif start >= shape:
 *                 if negative_step:
 *                     start = shape - 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     start = shape
*/
          __pyx_v_start = (__pyx_v_shape - 1);

          /* "View.MemoryView":837
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
*/
          goto __pyx_L11;
        }

        /* "View.MemoryView":840
 *                     start = shape - 1
 *                 else:
 *                     start = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
*/
        /*else*/ {
          __pyx_v_start = __pyx_v_shape;
        }
        __pyx_L11:;

        /* "View.MemoryView":836
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
*/
      }
      __pyx_L9:;

      /* "View.MemoryView":831
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
*/
      goto __pyx_L8;
    }

    /* "View.MemoryView":842
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
*/
    /*else*/ {
      if (__pyx_v_negative_step) {

        /* "View.MemoryView":843
 *         else:
 *             if negative_step:
 *                 start = shape - 1             # <<<<<<<<<<<<<<
 *             else:
 *                 start = 0
*/
        __pyx_v_start = (__pyx_v_shape - 1);

        /* "View.MemoryView":842
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
*/
        goto __pyx_L12;
      }

      /* "View.MemoryView":845
 *                 start = shape - 1
 *             else:
 *                 start = 0             # <<<<<<<<<<<<<<
 * 
 *         if have_stop:
*/
      /*else*/ {
        __pyx_v_start = 0;
      }
      __pyx_L12:;
    }
    __pyx_L8:;

    /* "View.MemoryView":847
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
*/
    __pyx_t_2 = (__pyx_v_have_stop != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":848
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
*/
      __pyx_t_2 = (__pyx_v_stop < 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":849
 *         if have_stop:
 *             if stop < 0:
 *                 stop += shape             # <<<<<<<<<<<<<<
 *                 if stop < 0:
 *                     stop = 0
*/
        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);

        /* "View.MemoryView":850
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
*/
        __pyx_t_2 = (__pyx_v_stop < 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":851
 *                 stop += shape
 *                 if stop < 0:
 *                     stop = 0             # <<<<<<<<<<<<<<
 *             elif stop > shape:
 *                 stop = shape
*/
          __pyx_v_stop = 0;

          /* "View.MemoryView":850
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
*/
        }

        /* "View.MemoryView":848
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
*/
        goto __pyx_L14;
      }

      /* "View.MemoryView":852
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
*/
      __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
      if (__pyx_t_2) {

        /* "View.MemoryView":853
 *                     stop = 0
 *             elif stop > shape:
 *                 stop = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
*/
        __pyx_v_stop = __pyx_v_shape;

        /* "View.MemoryView":852
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
*/
      }
      __pyx_L14:;

      /* "View.MemoryView":847
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
*/
      goto __pyx_L13;
    }

    /* "View.MemoryView":855
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
*/
    /*else*/ {
      if (__pyx_v_negative_step) {

        /* "View.MemoryView":856
 *         else:
 *             if negative_step:
 *                 stop = -1             # <<<<<<<<<<<<<<
 *             else:
 *                 stop = shape
*/
        __pyx_v_stop = -1L;

        /* "View.MemoryView":855
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
*/
        goto __pyx_L16;
      }

      /* "View.MemoryView":858
 *                 stop = -1
 *             else:
 *                 stop = shape             # <<<<<<<<<<<<<<
 * 
 * 
*/
      /*else*/ {
        __pyx_v_stop = __pyx_v_shape;
      }
      __pyx_L16:;
    }
    __pyx_L13:;

    /* "View.MemoryView":862
 * 
 *         with cython.cdivision(True):
 *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
 * 
 *             if (stop - start) - step * new_shape:
*/
    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);

    /* "View.MemoryView":864
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
*/
    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":865
 * 
 *             if (stop - start) - step * new_shape:
 *                 new_shape += 1             # <<<<<<<<<<<<<<
 * 
 *         if new_shape < 0:
*/
      __pyx_v_new_shape = (__pyx_v_new_shape + 1);

      /* "View.MemoryView":864
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
*/
    }

    /* "View.MemoryView":867
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
*/
    __pyx_t_2 = (__pyx_v_new_shape < 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":868
 * 
 *         if new_shape < 0:
 *             new_shape = 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_v_new_shape = 0;

      /* "View.MemoryView":867
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
*/
    }

    /* "View.MemoryView":871
 * 
 * 
 *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset
*/
    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);

    /* "View.MemoryView":872
 * 
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
 *         dst.suboffsets[new_ndim] = suboffset
 * 
*/
    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;

    /* "View.MemoryView":873
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
 * 
 * 
*/
    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
  }
  __pyx_L3:;

  /* "View.MemoryView":876
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
*/
  __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":877
 * 
 *     if suboffset_dim[0] < 0:
 *         dst.data += start * stride             # <<<<<<<<<<<<<<
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
*/
    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));

    /* "View.MemoryView":876
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
*/
    goto __pyx_L19;
  }

  /* "View.MemoryView":879
 *         dst.data += start * stride
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
 * 
 *     if suboffset >= 0:
*/
  /*else*/ {
    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
  }
  __pyx_L19:;

  /* "View.MemoryView":881
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
*/
  __pyx_t_2 = (__pyx_v_suboffset >= 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":882
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
*/
    __pyx_t_2 = (!__pyx_v_is_slice);
    if (__pyx_t_2) {

      /* "View.MemoryView":883
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
*/
      __pyx_t_2 = (__pyx_v_new_ndim == 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":884
 *         if not is_slice:
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
*/
        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);

        /* "View.MemoryView":883
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
*/
        goto __pyx_L22;
      }

      /* "View.MemoryView":886
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
 *                                      "must be indexed and not sliced", dim)
 *         else:
*/
      /*else*/ {

        /* "View.MemoryView":887
 *             else:
 *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
 *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             suboffset_dim[0] = new_ndim
*/
        __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_mstate_global->__pyx_kp_u_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 886, __pyx_L1_error)
      }
      __pyx_L22:;

      /* "View.MemoryView":882
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
*/
      goto __pyx_L21;
    }

    /* "View.MemoryView":889
 *                                      "must be indexed and not sliced", dim)
 *         else:
 *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
 * 
 *     return 0
*/
    /*else*/ {
      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
    }
    __pyx_L21:;

    /* "View.MemoryView":881
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
*/
  }

  /* "View.MemoryView":891
 *             suboffset_dim[0] = new_ndim
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":793
 * 
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')             # <<<<<<<<<<<<<<
 * cdef int slice_memviewslice(
 *         __Pyx_memviewslice *dst,
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":896
 * 
 * 
 * @cname('__pyx_pybuffer_index')             # <<<<<<<<<<<<<<
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
*/

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[3];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pybuffer_index", 0);

  /* "View.MemoryView":899
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
*/
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":900
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
*/
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":903
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
*/
  __pyx_t_2 = (__pyx_v_view->ndim == 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":904
 * 
 *     if view.ndim == 0:
 *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
*/
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 904, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 904, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0);

    /* "View.MemoryView":905
 *     if view.ndim == 0:
 *         shape = view.len // itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
*/
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":903
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":907
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
*/
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":908
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
*/
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":909
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
*/
    __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":910
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
*/
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":909
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
*/
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":912
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
*/
  __pyx_t_2 = (__pyx_v_index < 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":913
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
*/
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":914
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
    __pyx_t_2 = (__pyx_v_index < 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":915
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
*/
      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
      __pyx_t_4[1] = __pyx_t_3;
      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127);
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_5, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(1, 915, __pyx_L1_error)

      /* "View.MemoryView":914
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
    }

    /* "View.MemoryView":912
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
*/
  }

  /* "View.MemoryView":917
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
  __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":918
 * 
 *     if index >= shape:
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    __pyx_t_4[1] = __pyx_t_5;
    __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127);
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_3, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 918, __pyx_L1_error)

    /* "View.MemoryView":917
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
  }

  /* "View.MemoryView":920
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
*/
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":921
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
*/
  __pyx_t_2 = (__pyx_v_suboffset >= 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":922
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
*/
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":921
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
*/
  }

  /* "View.MemoryView":924
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":896
 * 
 * 
 * @cname('__pyx_pybuffer_index')             # <<<<<<<<<<<<<<
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":929
 * 
 * 
 * @cname('__pyx_memslice_transpose')             # <<<<<<<<<<<<<<
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim
*/

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  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;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":931
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
*/
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":933
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
*/
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":934
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":938
 * 
 *     cdef int i, j
 *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
*/
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":939
 *     cdef int i, j
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
*/
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":940
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
*/
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":941
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
*/
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":943
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
*/
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":944
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 0
*/
      __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 944, __pyx_L1_error)

      /* "View.MemoryView":943
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
*/
    }
  }

  /* "View.MemoryView":946
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":929
 * 
 * 
 * @cname('__pyx_memslice_transpose')             # <<<<<<<<<<<<<<
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":964
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
*/

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {

  /* "View.MemoryView":965
 * 
 *     def __dealloc__(self):
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
*/
  __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":964
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
*/

  /* function exit code */
}

/* "View.MemoryView":967
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
*/

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":968
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
*/
  __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":969
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":968
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
*/
  }

  /* "View.MemoryView":971
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":967
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":973
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
*/

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":974
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
*/
  __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":975
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
*/
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 975, __pyx_L1_error)

    /* "View.MemoryView":974
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":977
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
*/
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":973
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":979
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
*/

static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 0);

  /* "View.MemoryView":980
 * 
 *     cdef _get_base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":979
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":999
 *     pass  # ignore failure, it's a minor issue
 * 
 * @cname('__pyx_memoryview_fromslice')             # <<<<<<<<<<<<<<
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
 *                           int ndim,
*/

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo const *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);

  /* "View.MemoryView":1008
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":1009
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":1008
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  }

  /* "View.MemoryView":1014
 * 
 * 
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
*/
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 1014, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_mstate_global->__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":1016
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
*/
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":1017
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
*/
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":1019
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":1020
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
*/
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":1022
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
*/
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":1023
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
*/
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":1024
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
*/
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":1025
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
*/
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":1026
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
*/
  Py_INCREF(Py_None);

  /* "View.MemoryView":1028
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
*/
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1029
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
*/
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":1028
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
*/
    goto __pyx_L4;
  }

  /* "View.MemoryView":1031
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
*/
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":1033
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
*/
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":1034
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":1037
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
*/
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":1038
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
*/
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":1039
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
*/
    __pyx_t_1 = (__pyx_v_suboffset >= 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":1040
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":1041
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
*/
      goto __pyx_L6_break;

      /* "View.MemoryView":1039
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
*/
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":1043
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
*/
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":1044
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
*/
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyLong_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1045
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
*/
    __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1045, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":1047
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
*/
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":1048
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":1050
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":999
 *     pass  # ignore failure, it's a minor issue
 * 
 * @cname('__pyx_memoryview_fromslice')             # <<<<<<<<<<<<<<
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
 *                           int ndim,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1052
 *     return result
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')             # <<<<<<<<<<<<<<
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
 *                                                    __Pyx_memviewslice *mslice) except NULL:
*/

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);

  /* "View.MemoryView":1056
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":1057
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 1057, __pyx_L1_error)
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1058
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
*/
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":1056
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
*/
  }

  /* "View.MemoryView":1060
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
*/
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":1061
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
*/
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1052
 *     return result
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')             # <<<<<<<<<<<<<<
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
 *                                                    __Pyx_memviewslice *mslice) except NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1063
 *         return mslice
 * 
 * @cname('__pyx_memoryview_slice_copy')             # <<<<<<<<<<<<<<
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
 *     cdef int dim
*/

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;

  /* "View.MemoryView":1068
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
*/
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":1069
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
*/
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":1070
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
*/
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":1072
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
*/
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":1073
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
*/
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":1075
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
*/
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":1076
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
*/
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":1077
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
*/
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":1078
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
*/
    __pyx_t_6 = (__pyx_v_suboffsets != 0);
    if (__pyx_t_6) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":1063
 *         return mslice
 * 
 * @cname('__pyx_memoryview_slice_copy')             # <<<<<<<<<<<<<<
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
 *     cdef int dim
*/

  /* function exit code */
}

/* "View.MemoryView":1080
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 * @cname('__pyx_memoryview_copy_object')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy(memoryview memview):
 *     "Create a new memoryview object"
*/

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  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("memoryview_copy", 0);

  /* "View.MemoryView":1084
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
*/
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":1085
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1080
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 * @cname('__pyx_memoryview_copy_object')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy(memoryview memview):
 *     "Create a new memoryview object"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1087
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
 *     """
*/

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *(*__pyx_t_2)(char *);
  int (*__pyx_t_3)(char *, PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);

  /* "View.MemoryView":1095
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":1096
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
*/
    __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_2;

    /* "View.MemoryView":1097
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
*/
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_3;

    /* "View.MemoryView":1095
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1099
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
*/
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1100
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
*/
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1102
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
*/
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1104
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1087
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
 *     """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1110
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
*/

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":1111
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
 *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
*/
  __pyx_t_2 = (__pyx_v_arg < 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (-__pyx_v_arg);
  } else {
    __pyx_t_1 = __pyx_v_arg;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":1110
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1113
 *     return -arg if arg < 0 else arg
 * 
 * @cname('__pyx_get_best_slice_order')             # <<<<<<<<<<<<<<
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
 *     """
*/

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1119
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
*/
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1120
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
*/
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1122
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
*/
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1123
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
*/
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1124
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1125
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
*/
      goto __pyx_L4_break;

      /* "View.MemoryView":1123
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
*/
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1127
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
*/
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1128
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
*/
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1129
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1130
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
*/
      goto __pyx_L7_break;

      /* "View.MemoryView":1128
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
*/
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1132
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
*/
  __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
  if (__pyx_t_2) {

    /* "View.MemoryView":1133
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
*/
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1132
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
*/
  }

  /* "View.MemoryView":1135
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
*/
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1113
 *     return -arg if arg < 0 else arg
 * 
 * @cname('__pyx_get_best_slice_order')             # <<<<<<<<<<<<<<
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
 *     """
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1137
 *         return 'F'
 * 
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
 *                                    char *dst_data, Py_ssize_t *dst_strides,
*/

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;

  /* "View.MemoryView":1145
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
*/
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1146
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
*/
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1147
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
*/
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1148
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
*/
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1150
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
*/
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1151
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
    __pyx_t_2 = (__pyx_v_src_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_dst_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1152
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
*/
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1151
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
    if (__pyx_t_1) {

      /* "View.MemoryView":1153
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(dst_extent):
*/
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1151
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
      goto __pyx_L4;
    }

    /* "View.MemoryView":1155
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
 *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
*/
    /*else*/ {
      __pyx_t_3 = __pyx_v_dst_extent;
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "View.MemoryView":1156
 *         else:
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                 src_data += src_stride
 *                 dst_data += dst_stride
*/
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1157
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride             # <<<<<<<<<<<<<<
 *                 dst_data += dst_stride
 *     else:
*/
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1158
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
 *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
*/
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1150
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1160
 *                 dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
*/
  /*else*/ {
    __pyx_t_3 = __pyx_v_dst_extent;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":1161
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
*/
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1165
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
*/
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1166
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
*/
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1137
 *         return 'F'
 * 
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
 *                                    char *dst_data, Py_ssize_t *dst_strides,
*/

  /* function exit code */
}

/* "View.MemoryView":1168
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
*/

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1171
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
*/
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1168
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
*/

  /* function exit code */
}

/* "View.MemoryView":1174
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 * @cname('__pyx_memoryview_slice_get_size')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
*/

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;

  /* "View.MemoryView":1177
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for shape in src.shape[:ndim]:
*/
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1179
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 * 
 *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         size *= shape
 * 
*/
  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_shape = (__pyx_t_2[0]);

    /* "View.MemoryView":1180
 * 
 *     for shape in src.shape[:ndim]:
 *         size *= shape             # <<<<<<<<<<<<<<
 * 
 *     return size
*/
    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
  }

  /* "View.MemoryView":1182
 *         size *= shape
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
*/
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1174
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 * @cname('__pyx_memoryview_slice_get_size')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1184
 *     return size
 * 
 * @cname('__pyx_fill_contig_strides_array')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t fill_contig_strides_array(
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
*/

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1194
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
*/
  __pyx_t_1 = (__pyx_v_order == 'F');
  if (__pyx_t_1) {

    /* "View.MemoryView":1195
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
*/
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1196
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 *     else:
*/
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1197
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
*/
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1194
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1199
 *             stride *= shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
*/
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1200
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 * 
*/
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1201
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
*/
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1203
 *             stride *= shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
*/
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1184
 *     return size
 * 
 * @cname('__pyx_fill_contig_strides_array')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t fill_contig_strides_array(
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1205
 *     return stride
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')             # <<<<<<<<<<<<<<
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
 *                              __Pyx_memviewslice *tmpslice,
*/

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":1217
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
*/
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1218
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
*/
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1220
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err_no_memory()
*/
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1221
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
*/
  __pyx_t_2 = (!(__pyx_v_result != 0));
  if (__pyx_t_2) {

    /* "View.MemoryView":1222
 *     result = malloc(size)
 *     if not result:
 *         _err_no_memory()             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1222, __pyx_L1_error)

    /* "View.MemoryView":1221
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
*/
  }

  /* "View.MemoryView":1225
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
*/
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1226
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
*/
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1227
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
*/
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1228
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
*/
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1229
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
*/
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1231
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1234
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
*/
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1235
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
*/
    __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1236
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
*/
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1235
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
*/
    }
  }

  /* "View.MemoryView":1238
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
*/
  __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1239
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
*/
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1238
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
*/
    goto __pyx_L9;
  }

  /* "View.MemoryView":1241
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1243
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1205
 *     return stride
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')             # <<<<<<<<<<<<<<
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
 *                              __Pyx_memviewslice *tmpslice,
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1247
 * 
 * 
 * @cname('__pyx_memoryview_err_extents')             # <<<<<<<<<<<<<<
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
*/

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[7];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1250
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
*/
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi;
  __pyx_t_4[1] = __pyx_t_1;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_got;
  __pyx_t_4[3] = __pyx_t_2;
  __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_and;
  __pyx_t_4[5] = __pyx_t_3;
  __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__5;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127);
  if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_5, 0, 0);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __PYX_ERR(1, 1250, __pyx_L1_error)

  /* "View.MemoryView":1247
 * 
 * 
 * @cname('__pyx_memoryview_err_extents')             # <<<<<<<<<<<<<<
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1252
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 * 
 * @cname('__pyx_memoryview_err_dim')             # <<<<<<<<<<<<<<
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim
*/

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __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;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1254
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(1, 1254, __pyx_L1_error)

  /* "View.MemoryView":1252
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 * 
 * @cname('__pyx_memoryview_err_dim')             # <<<<<<<<<<<<<<
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1256
 *     raise <object>error, msg % dim
 * 
 * @cname('__pyx_memoryview_err')             # <<<<<<<<<<<<<<
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg
*/

static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1258
 * @cname('__pyx_memoryview_err')
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_no_memory')
*/
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
  __PYX_ERR(1, 1258, __pyx_L1_error)

  /* "View.MemoryView":1256
 *     raise <object>error, msg % dim
 * 
 * @cname('__pyx_memoryview_err')             # <<<<<<<<<<<<<<
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1260
 *     raise <object>error, msg
 * 
 * @cname('__pyx_memoryview_err_no_memory')             # <<<<<<<<<<<<<<
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError
*/

static int __pyx_memoryview_err_no_memory(void) {
  int __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "View.MemoryView":1262
 * @cname('__pyx_memoryview_err_no_memory')
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 * 
*/
  PyErr_NoMemory(); __PYX_ERR(1, 1262, __pyx_L1_error)

  /* "View.MemoryView":1260
 *     raise <object>error, msg
 * 
 * @cname('__pyx_memoryview_err_no_memory')             # <<<<<<<<<<<<<<
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1265
 * 
 * 
 * @cname('__pyx_memoryview_copy_contents')             # <<<<<<<<<<<<<<
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
 *                                   __Pyx_memviewslice dst,
*/

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":1274
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
*/
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1275
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
*/
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1277
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
*/
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1278
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
*/
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1279
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
*/
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1282
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
*/
  __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1283
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
*/
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1282
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1284
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
*/
  __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1285
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
*/
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1284
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":1287
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
*/
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1289
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
*/
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1290
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
*/
    __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
    if (__pyx_t_2) {

      /* "View.MemoryView":1291
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
*/
      __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
      if (__pyx_t_2) {

        /* "View.MemoryView":1292
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
*/
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1293
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
*/
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1291
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
*/
        goto __pyx_L7;
      }

      /* "View.MemoryView":1295
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
*/
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1295, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1290
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
*/
    }

    /* "View.MemoryView":1297
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
*/
    __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1298
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
*/
      __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1298, __pyx_L1_error)

      /* "View.MemoryView":1297
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
*/
    }
  }

  /* "View.MemoryView":1300
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
*/
  __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
  if (__pyx_t_2) {

    /* "View.MemoryView":1302
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
*/
    __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
    if (__pyx_t_2) {

      /* "View.MemoryView":1303
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
*/
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1302
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
*/
    }

    /* "View.MemoryView":1305
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
*/
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1305, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1306
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
*/
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1300
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
*/
  }

  /* "View.MemoryView":1308
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = (!__pyx_v_broadcasting);
  if (__pyx_t_2) {

    /* "View.MemoryView":1311
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
*/
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1312
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
*/
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1311
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
*/
      goto __pyx_L12;
    }

    /* "View.MemoryView":1313
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
*/
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1314
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
*/
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1313
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
*/
    }
    __pyx_L12:;

    /* "View.MemoryView":1316
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    if (__pyx_v_direct_copy) {

      /* "View.MemoryView":1318
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
*/
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1319
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
*/
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1320
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
*/
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1321
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
*/
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1322
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1316
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    }

    /* "View.MemoryView":1308
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "View.MemoryView":1324
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  if (__pyx_t_2) {

    /* "View.MemoryView":1327
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
*/
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)

    /* "View.MemoryView":1328
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1328, __pyx_L1_error)

    /* "View.MemoryView":1324
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "View.MemoryView":1330
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
*/
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1331
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
*/
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1332
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
*/
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1334
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
*/
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1335
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1265
 * 
 * 
 * @cname('__pyx_memoryview_copy_contents')             # <<<<<<<<<<<<<<
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
 *                                   __Pyx_memviewslice dst,
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1337
 *     return 0
 * 
 * @cname('__pyx_memoryview_broadcast_leading')             # <<<<<<<<<<<<<<
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
 *                             int ndim,
*/

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1342
 *                             int ndim_other) noexcept nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
*/
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1344
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
*/
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1345
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
*/
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1346
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
*/
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1347
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
*/
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1349
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
*/
  __pyx_t_1 = __pyx_v_offset;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1350
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
*/
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1351
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
*/
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1352
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
*/
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1337
 *     return 0
 * 
 * @cname('__pyx_memoryview_broadcast_leading')             # <<<<<<<<<<<<<<
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
 *                             int ndim,
*/

  /* function exit code */
}

/* "View.MemoryView":1359
 * 
 * 
 * @cname('__pyx_memoryview_refcount_copying')             # <<<<<<<<<<<<<<
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
*/

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {

  /* "View.MemoryView":1362
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
*/
  if (__pyx_v_dtype_is_object) {

    /* "View.MemoryView":1363
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
*/
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1362
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
*/
  }

  /* "View.MemoryView":1359
 * 
 * 
 * @cname('__pyx_memoryview_refcount_copying')             # <<<<<<<<<<<<<<
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
*/

  /* function exit code */
}

/* "View.MemoryView":1365
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
 *                                              Py_ssize_t *strides, int ndim,
*/

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "View.MemoryView":1369
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) noexcept with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
*/
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1365
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
 *                                              Py_ssize_t *strides, int ndim,
*/

  /* function exit code */
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
}

/* "View.MemoryView":1371
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
*/

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1375
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(shape[0]):
*/
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1377
 *     cdef Py_ssize_t stride = strides[0]
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
*/
  __pyx_t_1 = (__pyx_v_shape[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1378
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
*/
    __pyx_t_4 = (__pyx_v_ndim == 1);
    if (__pyx_t_4) {

      /* "View.MemoryView":1379
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
*/
      if (__pyx_v_inc) {

        /* "View.MemoryView":1380
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
*/
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1379
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
*/
        goto __pyx_L6;
      }

      /* "View.MemoryView":1382
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
*/
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1378
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":1384
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += stride
*/
    /*else*/ {
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1386
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
 * 
 *         data += stride             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
  }

  /* "View.MemoryView":1371
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
*/

  /* function exit code */
}

/* "View.MemoryView":1391
 * 
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
 *                               size_t itemsize, void *item,
*/

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1395
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
*/
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1396
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
 * 
*/
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1397
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1391
 * 
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
 *                               size_t itemsize, void *item,
*/

  /* function exit code */
}

/* "View.MemoryView":1400
 * 
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
 *                               Py_ssize_t *strides, int ndim,
*/

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1405
 *                               size_t itemsize, void *item) noexcept nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
*/
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1406
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
*/
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1408
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
*/
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1409
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
*/
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1410
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
*/
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1411
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
*/
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1408
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1413
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride
*/
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1414
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
 *             data += stride
 * 
*/
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1415
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
*/
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1400
 * 
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
 *                               Py_ssize_t *strides, int ndim,
*/

  /* function exit code */
}

/* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 4, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
    __pyx_v___pyx_state = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);

  /* "(tree fragment)":6
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
  __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, __pyx_k_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)

  /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
*/
  __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
  if (__pyx_t_5) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
*/
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(1, 9, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)             # <<<<<<<<<<<<<<
*/
  __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":34
 * 
 * # Helper function to format OSStatus errors
 * cdef str format_osstatus_error(cf.OSStatus status, str operation):             # <<<<<<<<<<<<<<
 *     """Format OSStatus error with human-readable translation, suggestion, and logging"""
 *     error_str = os_status.os_status_to_string(status)
*/

static PyObject *__pyx_f_9coremusic_4capi_format_osstatus_error(OSStatus __pyx_v_status, PyObject *__pyx_v_operation) {
  PyObject *__pyx_v_error_str = NULL;
  PyObject *__pyx_v_suggestion = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7[3];
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[4];
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_osstatus_error", 0);

  /* "coremusic/capi.pyx":36
 * cdef str format_osstatus_error(cf.OSStatus status, str operation):
 *     """Format OSStatus error with human-readable translation, suggestion, and logging"""
 *     error_str = os_status.os_status_to_string(status)             # <<<<<<<<<<<<<<
 *     suggestion = os_status.get_error_suggestion(status)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os_status_to_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_error_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":37
 *     """Format OSStatus error with human-readable translation, suggestion, and logging"""
 *     error_str = os_status.os_status_to_string(status)
 *     suggestion = os_status.get_error_suggestion(status)             # <<<<<<<<<<<<<<
 * 
 *     if operation:
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_error_suggestion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_suggestion = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":39
 *     suggestion = os_status.get_error_suggestion(status)
 * 
 *     if operation:             # <<<<<<<<<<<<<<
 *         message = f"{operation} failed: {error_str}"
 *     else:
*/
  if (__pyx_v_operation == Py_None) __pyx_t_6 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_operation);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 39, __pyx_L1_error)
    __pyx_t_6 = (__pyx_temp != 0);
  }

  if (__pyx_t_6) {

    /* "coremusic/capi.pyx":40
 * 
 *     if operation:
 *         message = f"{operation} failed: {error_str}"             # <<<<<<<<<<<<<<
 *     else:
 *         message = f"Operation failed: {error_str}"
*/
    __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_error_str, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7[0] = __pyx_t_1;
    __pyx_t_7[1] = __pyx_mstate_global->__pyx_kp_u_failed;
    __pyx_t_7[2] = __pyx_t_2;
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __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_v_message = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":39
 *     suggestion = os_status.get_error_suggestion(status)
 * 
 *     if operation:             # <<<<<<<<<<<<<<
 *         message = f"{operation} failed: {error_str}"
 *     else:
*/
    goto __pyx_L3;
  }

  /* "coremusic/capi.pyx":42
 *         message = f"{operation} failed: {error_str}"
 *     else:
 *         message = f"Operation failed: {error_str}"             # <<<<<<<<<<<<<<
 * 
 *     if suggestion:
*/
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_error_str, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Operation_failed, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_message = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "coremusic/capi.pyx":44
 *         message = f"Operation failed: {error_str}"
 * 
 *     if suggestion:             # <<<<<<<<<<<<<<
 *         message += f". {suggestion}"
 * 
*/
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_suggestion); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 44, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "coremusic/capi.pyx":45
 * 
 *     if suggestion:
 *         message += f". {suggestion}"             # <<<<<<<<<<<<<<
 * 
 *     # Log the error with structured information
*/
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_suggestion, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u__6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_message, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_message, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":44
 *         message = f"Operation failed: {error_str}"
 * 
 *     if suggestion:             # <<<<<<<<<<<<<<
 *         message += f". {suggestion}"
 * 
*/
  }

  /* "coremusic/capi.pyx":48
 * 
 *     # Log the error with structured information
 *     logger.error(             # <<<<<<<<<<<<<<
 *         f"OSStatus error in {operation}: {error_str}",
 *         extra={
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":49
 *     # Log the error with structured information
 *     logger.error(
 *         f"OSStatus error in {operation}: {error_str}",             # <<<<<<<<<<<<<<
 *         extra={
 *             'status_code': status,
*/
  __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_operation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_error_str, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_OSStatus_error_in;
  __pyx_t_9[1] = __pyx_t_1;
  __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_;
  __pyx_t_9[3] = __pyx_t_8;
  __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "coremusic/capi.pyx":51
 *         f"OSStatus error in {operation}: {error_str}",
 *         extra={
 *             'status_code': status,             # <<<<<<<<<<<<<<
 *             'operation': operation,
 *             'suggestion': suggestion
*/
  __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_status_code, __pyx_t_1) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":52
 *         extra={
 *             'status_code': status,
 *             'operation': operation,             # <<<<<<<<<<<<<<
 *             'suggestion': suggestion
 *         }
*/
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_operation, __pyx_v_operation) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "coremusic/capi.pyx":53
 *             'status_code': status,
 *             'operation': operation,
 *             'suggestion': suggestion             # <<<<<<<<<<<<<<
 *         }
 *     )
*/
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_suggestion, __pyx_v_suggestion) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_10};
    __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_extra, __pyx_t_8, __pyx_t_1, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":57
 *     )
 * 
 *     return message             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_message);
  __pyx_r = __pyx_v_message;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":34
 * 
 * # Helper function to format OSStatus errors
 * cdef str format_osstatus_error(cf.OSStatus status, str operation):             # <<<<<<<<<<<<<<
 *     """Format OSStatus error with human-readable translation, suggestion, and logging"""
 *     error_str = os_status.os_status_to_string(status)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("coremusic.capi.format_osstatus_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_error_str);
  __Pyx_XDECREF(__pyx_v_suggestion);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":65
 * 
 * # AudioStreamBasicDescription Conversion Helpers
 * cdef void dict_to_asbd(dict format_dict, at.AudioStreamBasicDescription* asbd) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a Python dict to AudioStreamBasicDescription struct.
 * 
*/

static void __pyx_f_9coremusic_4capi_dict_to_asbd(PyObject *__pyx_v_format_dict, AudioStreamBasicDescription *__pyx_v_asbd) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Float64 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  AudioFormatID __pyx_t_4;
  AudioFormatFlags __pyx_t_5;
  UInt32 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dict_to_asbd", 0);

  /* "coremusic/capi.pyx":75
 *         asbd: Pointer to AudioStreamBasicDescription struct to fill
 *     """
 *     asbd.mSampleRate = format_dict.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     asbd.mFormatID = format_dict.get('format_id', ca.kAudioFormatLinearPCM)
 *     asbd.mFormatFlags = format_dict.get('format_flags',
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 75, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_mstate_global->__pyx_float_44100_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == ((Float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mSampleRate = __pyx_t_2;

  /* "coremusic/capi.pyx":76
 *     """
 *     asbd.mSampleRate = format_dict.get('sample_rate', 44100.0)
 *     asbd.mFormatID = format_dict.get('format_id', ca.kAudioFormatLinearPCM)             # <<<<<<<<<<<<<<
 *     asbd.mFormatFlags = format_dict.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 76, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((AudioFormatID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_asbd->mFormatID = __pyx_t_4;

  /* "coremusic/capi.pyx":77
 *     asbd.mSampleRate = format_dict.get('sample_rate', 44100.0)
 *     asbd.mFormatID = format_dict.get('format_id', ca.kAudioFormatLinearPCM)
 *     asbd.mFormatFlags = format_dict.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 77, __pyx_L1_error)
  }

  /* "coremusic/capi.pyx":78
 *     asbd.mFormatID = format_dict.get('format_id', ca.kAudioFormatLinearPCM)
 *     asbd.mFormatFlags = format_dict.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)             # <<<<<<<<<<<<<<
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)
 *     asbd.mFramesPerPacket = format_dict.get('frames_per_packet', 1)
*/
  __pyx_t_3 = __Pyx_PyLong_From_int((kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "coremusic/capi.pyx":77
 *     asbd.mSampleRate = format_dict.get('sample_rate', 44100.0)
 *     asbd.mFormatID = format_dict.get('format_id', ca.kAudioFormatLinearPCM)
 *     asbd.mFormatFlags = format_dict.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_5 == ((AudioFormatFlags)-1)) && PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mFormatFlags = __pyx_t_5;

  /* "coremusic/capi.pyx":79
 *     asbd.mFormatFlags = format_dict.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     asbd.mFramesPerPacket = format_dict.get('frames_per_packet', 1)
 *     asbd.mBytesPerFrame = format_dict.get('bytes_per_frame', 4)
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 79, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mBytesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":80
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)
 *     asbd.mFramesPerPacket = format_dict.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     asbd.mBytesPerFrame = format_dict.get('bytes_per_frame', 4)
 *     asbd.mChannelsPerFrame = format_dict.get('channels_per_frame', 2)
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 80, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mFramesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":81
 *     asbd.mBytesPerPacket = format_dict.get('bytes_per_packet', 4)
 *     asbd.mFramesPerPacket = format_dict.get('frames_per_packet', 1)
 *     asbd.mBytesPerFrame = format_dict.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     asbd.mChannelsPerFrame = format_dict.get('channels_per_frame', 2)
 *     asbd.mBitsPerChannel = format_dict.get('bits_per_channel', 16)
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 81, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mBytesPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":82
 *     asbd.mFramesPerPacket = format_dict.get('frames_per_packet', 1)
 *     asbd.mBytesPerFrame = format_dict.get('bytes_per_frame', 4)
 *     asbd.mChannelsPerFrame = format_dict.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     asbd.mBitsPerChannel = format_dict.get('bits_per_channel', 16)
 *     asbd.mReserved = 0
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 82, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mChannelsPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":83
 *     asbd.mBytesPerFrame = format_dict.get('bytes_per_frame', 4)
 *     asbd.mChannelsPerFrame = format_dict.get('channels_per_frame', 2)
 *     asbd.mBitsPerChannel = format_dict.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     asbd.mReserved = 0
 * 
*/
  if (unlikely(__pyx_v_format_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 83, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_format_dict, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_asbd->mBitsPerChannel = __pyx_t_6;

  /* "coremusic/capi.pyx":84
 *     asbd.mChannelsPerFrame = format_dict.get('channels_per_frame', 2)
 *     asbd.mBitsPerChannel = format_dict.get('bits_per_channel', 16)
 *     asbd.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_asbd->mReserved = 0;

  /* "coremusic/capi.pyx":65
 * 
 * # AudioStreamBasicDescription Conversion Helpers
 * cdef void dict_to_asbd(dict format_dict, at.AudioStreamBasicDescription* asbd) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a Python dict to AudioStreamBasicDescription struct.
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("coremusic.capi.dict_to_asbd", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "coremusic/capi.pyx":87
 * 
 * 
 * cdef dict asbd_to_dict(at.AudioStreamBasicDescription* asbd):             # <<<<<<<<<<<<<<
 *     """Convert an AudioStreamBasicDescription struct to Python dict.
 * 
*/

static PyObject *__pyx_f_9coremusic_4capi_asbd_to_dict(AudioStreamBasicDescription *__pyx_v_asbd) {
  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("asbd_to_dict", 0);

  /* "coremusic/capi.pyx":99
 *         Dictionary with all ASBD fields
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'sample_rate': asbd.mSampleRate,
 *         'format_id': asbd.mFormatID,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":100
 *     """
 *     return {
 *         'sample_rate': asbd.mSampleRate,             # <<<<<<<<<<<<<<
 *         'format_id': asbd.mFormatID,
 *         'format_flags': asbd.mFormatFlags,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_asbd->mSampleRate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":101
 *     return {
 *         'sample_rate': asbd.mSampleRate,
 *         'format_id': asbd.mFormatID,             # <<<<<<<<<<<<<<
 *         'format_flags': asbd.mFormatFlags,
 *         'bytes_per_packet': asbd.mBytesPerPacket,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mFormatID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":102
 *         'sample_rate': asbd.mSampleRate,
 *         'format_id': asbd.mFormatID,
 *         'format_flags': asbd.mFormatFlags,             # <<<<<<<<<<<<<<
 *         'bytes_per_packet': asbd.mBytesPerPacket,
 *         'frames_per_packet': asbd.mFramesPerPacket,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mFormatFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":103
 *         'format_id': asbd.mFormatID,
 *         'format_flags': asbd.mFormatFlags,
 *         'bytes_per_packet': asbd.mBytesPerPacket,             # <<<<<<<<<<<<<<
 *         'frames_per_packet': asbd.mFramesPerPacket,
 *         'bytes_per_frame': asbd.mBytesPerFrame,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mBytesPerPacket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":104
 *         'format_flags': asbd.mFormatFlags,
 *         'bytes_per_packet': asbd.mBytesPerPacket,
 *         'frames_per_packet': asbd.mFramesPerPacket,             # <<<<<<<<<<<<<<
 *         'bytes_per_frame': asbd.mBytesPerFrame,
 *         'channels_per_frame': asbd.mChannelsPerFrame,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mFramesPerPacket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":105
 *         'bytes_per_packet': asbd.mBytesPerPacket,
 *         'frames_per_packet': asbd.mFramesPerPacket,
 *         'bytes_per_frame': asbd.mBytesPerFrame,             # <<<<<<<<<<<<<<
 *         'channels_per_frame': asbd.mChannelsPerFrame,
 *         'bits_per_channel': asbd.mBitsPerChannel,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mBytesPerFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":106
 *         'frames_per_packet': asbd.mFramesPerPacket,
 *         'bytes_per_frame': asbd.mBytesPerFrame,
 *         'channels_per_frame': asbd.mChannelsPerFrame,             # <<<<<<<<<<<<<<
 *         'bits_per_channel': asbd.mBitsPerChannel,
 *         'reserved': asbd.mReserved
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mChannelsPerFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":107
 *         'bytes_per_frame': asbd.mBytesPerFrame,
 *         'channels_per_frame': asbd.mChannelsPerFrame,
 *         'bits_per_channel': asbd.mBitsPerChannel,             # <<<<<<<<<<<<<<
 *         'reserved': asbd.mReserved
 *     }
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mBitsPerChannel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":108
 *         'channels_per_frame': asbd.mChannelsPerFrame,
 *         'bits_per_channel': asbd.mBitsPerChannel,
 *         'reserved': asbd.mReserved             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_asbd->mReserved); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_reserved, __pyx_t_2) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":87
 * 
 * 
 * cdef dict asbd_to_dict(at.AudioStreamBasicDescription* asbd):             # <<<<<<<<<<<<<<
 *     """Convert an AudioStreamBasicDescription struct to Python dict.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.asbd_to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":113
 * 
 * # CFStringRef Conversion Helpers
 * cdef str cfstring_to_str(cf.CFStringRef string_ref):             # <<<<<<<<<<<<<<
 *     """Convert a CFStringRef to Python string.
 * 
*/

static PyObject *__pyx_f_9coremusic_4capi_cfstring_to_str(CFStringRef __pyx_v_string_ref) {
  char __pyx_v_buffer[256];
  PyObject *__pyx_v_result = 0;
  CFIndex __pyx_v_length;
  CFIndex __pyx_v_max_size;
  char *__pyx_v_large_buffer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cfstring_to_str", 0);

  /* "coremusic/capi.pyx":125
 *         Python string, or empty string if conversion fails
 *     """
 *     if string_ref == <cf.CFStringRef>0:             # <<<<<<<<<<<<<<
 *         return ""
 * 
*/
  __pyx_t_1 = (__pyx_v_string_ref == ((CFStringRef)0));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":126
 *     """
 *     if string_ref == <cf.CFStringRef>0:
 *         return ""             # <<<<<<<<<<<<<<
 * 
 *     cdef char buffer[STRING_BUFFER_SIZE]
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_u__7;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":125
 *         Python string, or empty string if conversion fails
 *     """
 *     if string_ref == <cf.CFStringRef>0:             # <<<<<<<<<<<<<<
 *         return ""
 * 
*/
  }

  /* "coremusic/capi.pyx":135
 * 
 *     # Try small buffer first (common case)
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         return buffer.decode('utf-8')
 * 
*/
  __pyx_t_1 = (CFStringGetCString(__pyx_v_string_ref, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), kCFStringEncodingUTF8) != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":136
 *     # Try small buffer first (common case)
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *         return buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     # Fallback: allocate larger buffer for long strings
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 136, __pyx_L1_error)
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_2, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":135
 * 
 *     # Try small buffer first (common case)
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         return buffer.decode('utf-8')
 * 
*/
  }

  /* "coremusic/capi.pyx":139
 * 
 *     # Fallback: allocate larger buffer for long strings
 *     length = cf.CFStringGetLength(string_ref)             # <<<<<<<<<<<<<<
 *     max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8)
 *     large_buffer = <char*>malloc(max_size + 1)
*/
  __pyx_v_length = CFStringGetLength(__pyx_v_string_ref);

  /* "coremusic/capi.pyx":140
 *     # Fallback: allocate larger buffer for long strings
 *     length = cf.CFStringGetLength(string_ref)
 *     max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     large_buffer = <char*>malloc(max_size + 1)
 * 
*/
  __pyx_v_max_size = CFStringGetMaximumSizeForEncoding(__pyx_v_length, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":141
 *     length = cf.CFStringGetLength(string_ref)
 *     max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8)
 *     large_buffer = <char*>malloc(max_size + 1)             # <<<<<<<<<<<<<<
 * 
 *     if large_buffer == <char*>0:
*/
  __pyx_v_large_buffer = ((char *)malloc((__pyx_v_max_size + 1)));

  /* "coremusic/capi.pyx":143
 *     large_buffer = <char*>malloc(max_size + 1)
 * 
 *     if large_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         return ""
 * 
*/
  __pyx_t_1 = (__pyx_v_large_buffer == ((char *)0));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":144
 * 
 *     if large_buffer == <char*>0:
 *         return ""             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_u__7;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":143
 *     large_buffer = <char*>malloc(max_size + 1)
 * 
 *     if large_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         return ""
 * 
*/
  }

  /* "coremusic/capi.pyx":146
 *         return ""
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer.decode('utf-8')
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":147
 * 
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             result = large_buffer.decode('utf-8')
 *             return result
*/
    __pyx_t_1 = (CFStringGetCString(__pyx_v_string_ref, __pyx_v_large_buffer, (__pyx_v_max_size + 1), kCFStringEncodingUTF8) != 0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":148
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *             return result
 *         return ""
*/
      __pyx_t_2 = __Pyx_ssize_strlen(__pyx_v_large_buffer); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 148, __pyx_L7_error)
      __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_large_buffer, 0, __pyx_t_2, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_result = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "coremusic/capi.pyx":149
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer.decode('utf-8')
 *             return result             # <<<<<<<<<<<<<<
 *         return ""
 *     finally:
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_return;

      /* "coremusic/capi.pyx":147
 * 
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             result = large_buffer.decode('utf-8')
 *             return result
*/
    }

    /* "coremusic/capi.pyx":150
 *             result = large_buffer.decode('utf-8')
 *             return result
 *         return ""             # <<<<<<<<<<<<<<
 *     finally:
 *         free(large_buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_u__7;
    goto __pyx_L6_return;
  }

  /* "coremusic/capi.pyx":152
 *         return ""
 *     finally:
 *         free(large_buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        free(__pyx_v_large_buffer);
      }
      __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_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_13 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_large_buffer);
      __pyx_r = __pyx_t_13;
      __pyx_t_13 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":113
 * 
 * # CFStringRef Conversion Helpers
 * cdef str cfstring_to_str(cf.CFStringRef string_ref):             # <<<<<<<<<<<<<<
 *     """Convert a CFStringRef to Python string.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.cfstring_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":155
 * 
 * 
 * cdef cf.CFStringRef str_to_cfstring(str py_string):             # <<<<<<<<<<<<<<
 *     """Convert a Python string to CFStringRef.
 * 
*/

static CFStringRef __pyx_f_9coremusic_4capi_str_to_cfstring(PyObject *__pyx_v_py_string) {
  PyObject *__pyx_v_string_bytes = 0;
  CFStringRef __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("str_to_cfstring", 0);

  /* "coremusic/capi.pyx":167
 *         CFStringRef (must be released by caller), or NULL on failure
 *     """
 *     cdef bytes string_bytes = py_string.encode('utf-8')             # <<<<<<<<<<<<<<
 *     return cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault,
*/
  if (unlikely(__pyx_v_py_string == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 167, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_py_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_string_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":170
 *     return cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault,
 *         string_bytes,             # <<<<<<<<<<<<<<
 *         cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_string_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)

  /* "coremusic/capi.pyx":168
 *     """
 *     cdef bytes string_bytes = py_string.encode('utf-8')
 *     return cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         string_bytes,
*/
  __pyx_r = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);
  goto __pyx_L0;

  /* "coremusic/capi.pyx":155
 * 
 * 
 * cdef cf.CFStringRef str_to_cfstring(str py_string):             # <<<<<<<<<<<<<<
 *     """Convert a Python string to CFStringRef.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.str_to_cfstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_string_bytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":176
 * 
 * # AudioObjectPropertyAddress Helper
 * cdef void init_property_address(             # <<<<<<<<<<<<<<
 *     ca.AudioObjectPropertyAddress* address,
 *     cf.UInt32 selector,
*/

static void __pyx_f_9coremusic_4capi_init_property_address(AudioObjectPropertyAddress *__pyx_v_address, UInt32 __pyx_v_selector, UInt32 __pyx_v_scope, UInt32 __pyx_v_element) {

  /* "coremusic/capi.pyx":192
 *         element: Property element (0 = kAudioObjectPropertyElementMain)
 *     """
 *     address.mSelector = selector             # <<<<<<<<<<<<<<
 *     address.mScope = scope
 *     address.mElement = element
*/
  __pyx_v_address->mSelector = __pyx_v_selector;

  /* "coremusic/capi.pyx":193
 *     """
 *     address.mSelector = selector
 *     address.mScope = scope             # <<<<<<<<<<<<<<
 *     address.mElement = element
 * 
*/
  __pyx_v_address->mScope = __pyx_v_scope;

  /* "coremusic/capi.pyx":194
 *     address.mSelector = selector
 *     address.mScope = scope
 *     address.mElement = element             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_address->mElement = __pyx_v_element;

  /* "coremusic/capi.pyx":176
 * 
 * # AudioObjectPropertyAddress Helper
 * cdef void init_property_address(             # <<<<<<<<<<<<<<
 *     ca.AudioObjectPropertyAddress* address,
 *     cf.UInt32 selector,
*/

  /* function exit code */
}

/* "coremusic/capi.pyx":197
 * 
 * 
 * def fourchar_to_int(code: str) -> int:             # <<<<<<<<<<<<<<
 *    """Convert fourcc chars to an int
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_1fourchar_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_fourchar_to_int, "fourchar_to_int(str code: str) -> int\n\nConvert fourcc chars to an int\n\n>>> fourchar_to_int('TEXT')\n1413830740");
static PyMethodDef __pyx_mdef_9coremusic_4capi_1fourchar_to_int = {"fourchar_to_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_1fourchar_to_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_fourchar_to_int};
static PyObject *__pyx_pw_9coremusic_4capi_1fourchar_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fourchar_to_int (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_code,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 197, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 197, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fourchar_to_int", 0) < (0)) __PYX_ERR(0, 197, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fourchar_to_int", 1, 1, 1, i); __PYX_ERR(0, 197, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 197, __pyx_L3_error)
    }
    __pyx_v_code = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fourchar_to_int", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 197, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.fourchar_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_code), (&PyUnicode_Type), 0, "code", 2))) __PYX_ERR(0, 197, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_fourchar_to_int(__pyx_self, __pyx_v_code);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_fourchar_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  Py_UCS4 __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fourchar_to_int", 0);

  /* "coremusic/capi.pyx":203
 *    1413830740
 *    """
 *    assert len(code) == 4, "should be four characters only"             # <<<<<<<<<<<<<<
 *    return ((ord(code[0]) << 24) | (ord(code[1]) << 16) |
 *            (ord(code[2]) << 8)  | ord(code[3]))
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_code); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 203, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 4);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_should_be_four_characters_only, 0, 0);
      __PYX_ERR(0, 203, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 203, __pyx_L1_error)
  #endif

  /* "coremusic/capi.pyx":204
 *    """
 *    assert len(code) == 4, "should be four characters only"
 *    return ((ord(code[0]) << 24) | (ord(code[1]) << 16) |             # <<<<<<<<<<<<<<
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_GetItemInt_Unicode(__pyx_v_code, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(__pyx_t_3 == (Py_UCS4)-1)) __PYX_ERR(0, 204, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_code, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 204, __pyx_L1_error)

  /* "coremusic/capi.pyx":205
 *    assert len(code) == 4, "should be four characters only"
 *    return ((ord(code[0]) << 24) | (ord(code[1]) << 16) |
 *            (ord(code[2]) << 8)  | ord(code[3]))             # <<<<<<<<<<<<<<
 * 
 * def int_to_fourchar(n: int) -> str:
*/
  __pyx_t_5 = __Pyx_GetItemInt_Unicode(__pyx_v_code, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(__pyx_t_5 == (Py_UCS4)-1)) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "coremusic/capi.pyx":204
 *    """
 *    assert len(code) == 4, "should be four characters only"
 *    return ((ord(code[0]) << 24) | (ord(code[1]) << 16) |             # <<<<<<<<<<<<<<
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
*/
  __pyx_t_6 = __Pyx_GetItemInt_Unicode(__pyx_v_code, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(__pyx_t_6 == (Py_UCS4)-1)) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "coremusic/capi.pyx":205
 *    assert len(code) == 4, "should be four characters only"
 *    return ((ord(code[0]) << 24) | (ord(code[1]) << 16) |
 *            (ord(code[2]) << 8)  | ord(code[3]))             # <<<<<<<<<<<<<<
 * 
 * def int_to_fourchar(n: int) -> str:
*/
  __pyx_t_7 = __Pyx_PyLong_From_long(((((__Pyx_long_cast(__pyx_t_3) << 24) | (__Pyx_long_cast(__pyx_t_4) << 16)) | (__Pyx_long_cast(__pyx_t_5) << 8)) | __Pyx_long_cast(__pyx_t_6))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_7, NULL, 0) < (0)) __PYX_ERR(0, 205, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":197
 * 
 * 
 * def fourchar_to_int(code: str) -> int:             # <<<<<<<<<<<<<<
 *    """Convert fourcc chars to an int
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.fourchar_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":207
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
 * def int_to_fourchar(n: int) -> str:             # <<<<<<<<<<<<<<
 *     """convert int to fourcc 4 chars
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_3int_to_fourchar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_2int_to_fourchar, "int_to_fourchar(int n: int) -> str\n\nconvert int to fourcc 4 chars\n\n>>> int_to_fourchar(1413830740)\n'TEXT'");
static PyMethodDef __pyx_mdef_9coremusic_4capi_3int_to_fourchar = {"int_to_fourchar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_3int_to_fourchar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_2int_to_fourchar};
static PyObject *__pyx_pw_9coremusic_4capi_3int_to_fourchar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("int_to_fourchar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 207, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "int_to_fourchar", 0) < (0)) __PYX_ERR(0, 207, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("int_to_fourchar", 1, 1, 1, i); __PYX_ERR(0, 207, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
    }
    if (__Pyx_PyInt_FromNumber(&values[0], "n", 0) < (0)) __PYX_ERR(0, 207, __pyx_L3_error)
    __pyx_v_n = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("int_to_fourchar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.int_to_fourchar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), (&PyLong_Type), 0, "n", 2))) __PYX_ERR(0, 207, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_2int_to_fourchar(__pyx_self, __pyx_v_n);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_2int_to_fourchar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("int_to_fourchar", 0);

  /* "coremusic/capi.pyx":213
 *     'TEXT'
 *     """
 *     return (             # <<<<<<<<<<<<<<
 *           chr((n >> 24) & 255)
 *         + chr((n >> 16) & 255)
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":214
 *     """
 *     return (
 *           chr((n >> 24) & 255)             # <<<<<<<<<<<<<<
 *         + chr((n >> 16) & 255)
 *         + chr((n >> 8) & 255)
*/
  __pyx_t_1 = __Pyx_PyLong_RshiftObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_AndObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "coremusic/capi.pyx":215
 *     return (
 *           chr((n >> 24) & 255)
 *         + chr((n >> 16) & 255)             # <<<<<<<<<<<<<<
 *         + chr((n >> 8) & 255)
 *         + chr((n & 255))
*/
  __pyx_t_1 = __Pyx_PyLong_RshiftObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyLong_AndObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyUnicode_FromOrdinal(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":216
 *           chr((n >> 24) & 255)
 *         + chr((n >> 16) & 255)
 *         + chr((n >> 8) & 255)             # <<<<<<<<<<<<<<
 *         + chr((n & 255))
 *     )
*/
  __pyx_t_4 = __Pyx_PyLong_RshiftObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyLong_AndObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":217
 *         + chr((n >> 16) & 255)
 *         + chr((n >> 8) & 255)
 *         + chr((n & 255))             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_AndObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":207
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
 * def int_to_fourchar(n: int) -> str:             # <<<<<<<<<<<<<<
 *     """convert int to fourcc 4 chars
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.int_to_fourchar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":220
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     """Show an AudioObject"""
 *     ca.AudioObjectShow(object_id)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_5audio_object_show(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_4audio_object_show, "audio_object_show(int object_id)\n\nShow an AudioObject");
static PyMethodDef __pyx_mdef_9coremusic_4capi_5audio_object_show = {"audio_object_show", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_5audio_object_show, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_4audio_object_show};
static PyObject *__pyx_pw_9coremusic_4capi_5audio_object_show(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_object_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_show (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 220, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_object_show", 0) < (0)) __PYX_ERR(0, 220, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_object_show", 1, 1, 1, i); __PYX_ERR(0, 220, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error)
    }
    __pyx_v_object_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_object_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_show", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 220, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_object_show", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_4audio_object_show(__pyx_self, __pyx_v_object_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_4audio_object_show(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_show", 0);

  /* "coremusic/capi.pyx":222
 * def audio_object_show(int object_id):
 *     """Show an AudioObject"""
 *     ca.AudioObjectShow(object_id)             # <<<<<<<<<<<<<<
 * 
 * def audio_hardware_unload() -> int:
*/
  AudioObjectShow(__pyx_v_object_id);

  /* "coremusic/capi.pyx":220
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     """Show an AudioObject"""
 *     ca.AudioObjectShow(object_id)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":224
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     """Unload the audio hardware"""
 *     return ca.AudioHardwareUnload()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_7audio_hardware_unload(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_6audio_hardware_unload, "audio_hardware_unload() -> int\n\nUnload the audio hardware");
static PyMethodDef __pyx_mdef_9coremusic_4capi_7audio_hardware_unload = {"audio_hardware_unload", (PyCFunction)__pyx_pw_9coremusic_4capi_7audio_hardware_unload, METH_NOARGS, __pyx_doc_9coremusic_4capi_6audio_hardware_unload};
static PyObject *__pyx_pw_9coremusic_4capi_7audio_hardware_unload(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_hardware_unload (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_6audio_hardware_unload(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_6audio_hardware_unload(CYTHON_UNUSED PyObject *__pyx_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("audio_hardware_unload", 0);

  /* "coremusic/capi.pyx":226
 * def audio_hardware_unload() -> int:
 *     """Unload the audio hardware"""
 *     return ca.AudioHardwareUnload()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(AudioHardwareUnload()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":224
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     """Unload the audio hardware"""
 *     return ca.AudioHardwareUnload()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_unload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":229
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     """Destroy an audio hardware aggregate device"""
 *     return ca.AudioHardwareDestroyAggregateDevice(in_device_id)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_9audio_hardware_destroy_aggregate_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_8audio_hardware_destroy_aggregate_device, "audio_hardware_destroy_aggregate_device(int in_device_id) -> int\n\nDestroy an audio hardware aggregate device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_9audio_hardware_destroy_aggregate_device = {"audio_hardware_destroy_aggregate_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_9audio_hardware_destroy_aggregate_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_8audio_hardware_destroy_aggregate_device};
static PyObject *__pyx_pw_9coremusic_4capi_9audio_hardware_destroy_aggregate_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_in_device_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_hardware_destroy_aggregate_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_in_device_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 229, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_hardware_destroy_aggregate_device", 0) < (0)) __PYX_ERR(0, 229, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_hardware_destroy_aggregate_device", 1, 1, 1, i); __PYX_ERR(0, 229, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error)
    }
    __pyx_v_in_device_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_in_device_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_hardware_destroy_aggregate_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 229, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_destroy_aggregate_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_8audio_hardware_destroy_aggregate_device(__pyx_self, __pyx_v_in_device_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_8audio_hardware_destroy_aggregate_device(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_in_device_id) {
  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("audio_hardware_destroy_aggregate_device", 0);

  /* "coremusic/capi.pyx":231
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:
 *     """Destroy an audio hardware aggregate device"""
 *     return ca.AudioHardwareDestroyAggregateDevice(in_device_id)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(AudioHardwareDestroyAggregateDevice(__pyx_v_in_device_id)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 231, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":229
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     """Destroy an audio hardware aggregate device"""
 *     return ca.AudioHardwareDestroyAggregateDevice(in_device_id)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_destroy_aggregate_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":235
 * 
 * # Audio Hardware Device Functions
 * def audio_object_get_property_data(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get property data from an AudioObject
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11audio_object_get_property_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_10audio_object_get_property_data, "audio_object_get_property_data(int object_id, int property_selector, int scope, int element)\n\nGet property data from an AudioObject\n\nWARNING: For string properties (like device names), use audio_object_get_property_string instead.\nThis function returns raw bytes which may be a CFStringRef pointer for string properties.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11audio_object_get_property_data = {"audio_object_get_property_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11audio_object_get_property_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_10audio_object_get_property_data};
static PyObject *__pyx_pw_9coremusic_4capi_11audio_object_get_property_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_object_id;
  int __pyx_v_property_selector;
  int __pyx_v_scope;
  int __pyx_v_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_get_property_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,&__pyx_mstate_global->__pyx_n_u_property_selector,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 235, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_object_get_property_data", 0) < (0)) __PYX_ERR(0, 235, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_object_get_property_data", 1, 4, 4, i); __PYX_ERR(0, 235, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 235, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 235, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 235, __pyx_L3_error)
    }
    __pyx_v_object_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_object_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L3_error)
    __pyx_v_property_selector = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_selector == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_get_property_data", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 235, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_object_get_property_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_10audio_object_get_property_data(__pyx_self, __pyx_v_object_id, __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_10audio_object_get_property_data(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element) {
  AudioObjectPropertyAddress __pyx_v_address;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_object_get_property_data", 0);

  /* "coremusic/capi.pyx":242
 *     """
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef char* buffer
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":247
 *     cdef bytes result
 * 
 *     init_property_address(&address, property_selector, scope, element)             # <<<<<<<<<<<<<<
 * 
 *     # Get the data size
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* "coremusic/capi.pyx":250
 * 
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))
*/
  __pyx_v_status = AudioObjectGetPropertyDataSize(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), (&__pyx_v_data_size));

  /* "coremusic/capi.pyx":251
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":252
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))             # <<<<<<<<<<<<<<
 * 
 *     if data_size == 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioObjectGetPropertyDataSize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __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_ERR(0, 252, __pyx_L1_error)

    /* "coremusic/capi.pyx":251
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))
 * 
*/
  }

  /* "coremusic/capi.pyx":254
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_data_size == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":255
 * 
 *     if data_size == 0:
 *         return b''             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b__7;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":254
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyDataSize"))
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":258
 * 
 *     # Allocate buffer
 *     buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":259
 *     # Allocate buffer
 *     buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  __pyx_t_1 = (__pyx_v_buffer == ((char *)0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":260
 *     buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __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_ERR(0, 260, __pyx_L1_error)

    /* "coremusic/capi.pyx":259
 *     # Allocate buffer
 *     buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":262
 *         raise MemoryError("Failed to allocate buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":263
 * 
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
*/
    __pyx_v_status = AudioObjectGetPropertyData(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":264
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":265
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))             # <<<<<<<<<<<<<<
 * 
 *         # Copy to Python bytes object
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioObjectGetPropertyData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 265, __pyx_L7_error)

      /* "coremusic/capi.pyx":264
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
 * 
*/
    }

    /* "coremusic/capi.pyx":268
 * 
 *         # Copy to Python bytes object
 *         result = buffer[:data_size]             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_data_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":269
 *         # Copy to Python bytes object
 *         result = buffer[:data_size]
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         free(buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L6_return;
  }

  /* "coremusic/capi.pyx":271
 *         return result
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_14 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":235
 * 
 * # Audio Hardware Device Functions
 * def audio_object_get_property_data(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get property data from an AudioObject
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_object_get_property_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":274
 * 
 * 
 * def audio_object_set_property_data(int object_id, int property_selector, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set property data on an AudioObject
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13audio_object_set_property_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_12audio_object_set_property_data, "audio_object_set_property_data(int object_id, int property_selector, int scope, int element, bytes data)\n\nSet property data on an AudioObject\n\nArgs:\n    object_id: The AudioObjectID\n    property_selector: The property selector (e.g., kAudioDevicePropertyVolumeScalar)\n    scope: The property scope (e.g., kAudioObjectPropertyScopeOutput)\n    element: The property element (0 for main/master)\n    data: The raw bytes data to set\n\nRaises:\n    RuntimeError: If setting the property fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13audio_object_set_property_data = {"audio_object_set_property_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13audio_object_set_property_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_12audio_object_set_property_data};
static PyObject *__pyx_pw_9coremusic_4capi_13audio_object_set_property_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_object_id;
  int __pyx_v_property_selector;
  int __pyx_v_scope;
  int __pyx_v_element;
  PyObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_set_property_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,&__pyx_mstate_global->__pyx_n_u_property_selector,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 274, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_object_set_property_data", 0) < (0)) __PYX_ERR(0, 274, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_object_set_property_data", 1, 5, 5, i); __PYX_ERR(0, 274, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 274, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 274, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 274, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 274, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 274, __pyx_L3_error)
    }
    __pyx_v_object_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_object_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
    __pyx_v_property_selector = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_selector == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[4]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_set_property_data", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 274, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_object_set_property_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 274, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_12audio_object_set_property_data(__pyx_self, __pyx_v_object_id, __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_12audio_object_set_property_data(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element, PyObject *__pyx_v_data) {
  AudioObjectPropertyAddress __pyx_v_address;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_object_set_property_data", 0);

  /* "coremusic/capi.pyx":290
 *     cdef cf.OSStatus status
 * 
 *     init_property_address(&address, property_selector, scope, element)             # <<<<<<<<<<<<<<
 * 
 *     status = ca.AudioObjectSetPropertyData(object_id, &address, 0, <void*>0, len(data), <const void*><char*>data)
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* "coremusic/capi.pyx":292
 *     init_property_address(&address, property_selector, scope, element)
 * 
 *     status = ca.AudioObjectSetPropertyData(object_id, &address, 0, <void*>0, len(data), <const void*><char*>data)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectSetPropertyData"))
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 292, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 292, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 292, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error)
  __pyx_v_status = AudioObjectSetPropertyData(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), __pyx_t_1, ((void const *)((char *)__pyx_t_2)));

  /* "coremusic/capi.pyx":293
 * 
 *     status = ca.AudioObjectSetPropertyData(object_id, &address, 0, <void*>0, len(data), <const void*><char*>data)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectSetPropertyData"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":294
 *     status = ca.AudioObjectSetPropertyData(object_id, &address, 0, <void*>0, len(data), <const void*><char*>data)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectSetPropertyData"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioObjectSetPropertyData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __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_ERR(0, 294, __pyx_L1_error)

    /* "coremusic/capi.pyx":293
 * 
 *     status = ca.AudioObjectSetPropertyData(object_id, &address, 0, <void*>0, len(data), <const void*><char*>data)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectSetPropertyData"))
 * 
*/
  }

  /* "coremusic/capi.pyx":274
 * 
 * 
 * def audio_object_set_property_data(int object_id, int property_selector, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set property data on an AudioObject
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_object_set_property_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":297
 * 
 * 
 * def audio_object_is_property_settable(int object_id, int property_selector, int scope, int element) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if a property is settable on an AudioObject
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15audio_object_is_property_settable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_14audio_object_is_property_settable, "audio_object_is_property_settable(int object_id, int property_selector, int scope, int element) -> bool\n\nCheck if a property is settable on an AudioObject\n\nArgs:\n    object_id: The AudioObjectID\n    property_selector: The property selector\n    scope: The property scope\n    element: The property element\n\nReturns:\n    True if the property is settable, False otherwise");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15audio_object_is_property_settable = {"audio_object_is_property_settable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15audio_object_is_property_settable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_14audio_object_is_property_settable};
static PyObject *__pyx_pw_9coremusic_4capi_15audio_object_is_property_settable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_object_id;
  int __pyx_v_property_selector;
  int __pyx_v_scope;
  int __pyx_v_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_is_property_settable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,&__pyx_mstate_global->__pyx_n_u_property_selector,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 297, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 297, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 297, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 297, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 297, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_object_is_property_settable", 0) < (0)) __PYX_ERR(0, 297, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_object_is_property_settable", 1, 4, 4, i); __PYX_ERR(0, 297, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 297, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 297, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 297, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 297, __pyx_L3_error)
    }
    __pyx_v_object_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_object_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
    __pyx_v_property_selector = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_selector == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_is_property_settable", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 297, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_object_is_property_settable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_14audio_object_is_property_settable(__pyx_self, __pyx_v_object_id, __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_14audio_object_is_property_settable(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element) {
  AudioObjectPropertyAddress __pyx_v_address;
  OSStatus __pyx_v_status;
  Boolean __pyx_v_is_settable;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_object_is_property_settable", 0);

  /* "coremusic/capi.pyx":311
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.OSStatus status
 *     cdef cf.Boolean is_settable = 0             # <<<<<<<<<<<<<<
 * 
 *     init_property_address(&address, property_selector, scope, element)
*/
  __pyx_v_is_settable = 0;

  /* "coremusic/capi.pyx":313
 *     cdef cf.Boolean is_settable = 0
 * 
 *     init_property_address(&address, property_selector, scope, element)             # <<<<<<<<<<<<<<
 * 
 *     status = ca.AudioObjectIsPropertySettable(object_id, &address, &is_settable)
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* "coremusic/capi.pyx":315
 *     init_property_address(&address, property_selector, scope, element)
 * 
 *     status = ca.AudioObjectIsPropertySettable(object_id, &address, &is_settable)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         return False
*/
  __pyx_v_status = AudioObjectIsPropertySettable(__pyx_v_object_id, (&__pyx_v_address), (&__pyx_v_is_settable));

  /* "coremusic/capi.pyx":316
 * 
 *     status = ca.AudioObjectIsPropertySettable(object_id, &address, &is_settable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return False
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":317
 *     status = ca.AudioObjectIsPropertySettable(object_id, &address, &is_settable)
 *     if status != 0:
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     return bool(is_settable)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":316
 * 
 *     status = ca.AudioObjectIsPropertySettable(object_id, &address, &is_settable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return False
 * 
*/
  }

  /* "coremusic/capi.pyx":319
 *         return False
 * 
 *     return bool(is_settable)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_settable != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":297
 * 
 * 
 * def audio_object_is_property_settable(int object_id, int property_selector, int scope, int element) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if a property is settable on an AudioObject
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.audio_object_is_property_settable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":322
 * 
 * 
 * def audio_object_get_property_string(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a string property from an AudioObject
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_17audio_object_get_property_string(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_16audio_object_get_property_string, "audio_object_get_property_string(int object_id, int property_selector, int scope, int element)\n\nGet a string property from an AudioObject\n\nThis properly handles CFStringRef properties by dereferencing the pointer\nand extracting the actual string content using CoreFoundation APIs.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_17audio_object_get_property_string = {"audio_object_get_property_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_17audio_object_get_property_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_16audio_object_get_property_string};
static PyObject *__pyx_pw_9coremusic_4capi_17audio_object_get_property_string(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_object_id;
  int __pyx_v_property_selector;
  int __pyx_v_scope;
  int __pyx_v_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_object_get_property_string (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,&__pyx_mstate_global->__pyx_n_u_property_selector,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 322, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_object_get_property_string", 0) < (0)) __PYX_ERR(0, 322, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_object_get_property_string", 1, 4, 4, i); __PYX_ERR(0, 322, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 322, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 322, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 322, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 322, __pyx_L3_error)
    }
    __pyx_v_object_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_object_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error)
    __pyx_v_property_selector = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_selector == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_get_property_string", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_object_get_property_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_16audio_object_get_property_string(__pyx_self, __pyx_v_object_id, __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_16audio_object_get_property_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_object_id, int __pyx_v_property_selector, int __pyx_v_scope, int __pyx_v_element) {
  AudioObjectPropertyAddress __pyx_v_address;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  CFStringRef __pyx_v_string_ref;
  PyObject *__pyx_v_result_str = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_object_get_property_string", 0);

  /* "coremusic/capi.pyx":329
 *     """
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = sizeof(cf.CFStringRef)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef cf.CFStringRef string_ref
*/
  __pyx_v_data_size = (sizeof(CFStringRef));

  /* "coremusic/capi.pyx":333
 *     cdef cf.CFStringRef string_ref
 * 
 *     init_property_address(&address, property_selector, scope, element)             # <<<<<<<<<<<<<<
 * 
 *     # Get the CFStringRef
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), __pyx_v_property_selector, __pyx_v_scope, __pyx_v_element);

  /* "coremusic/capi.pyx":336
 * 
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
*/
  __pyx_v_status = AudioObjectGetPropertyData(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), (&__pyx_v_data_size), (&__pyx_v_string_ref));

  /* "coremusic/capi.pyx":337
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":338
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))             # <<<<<<<<<<<<<<
 * 
 *     # Use helper to convert CFString to Python string (returns str, encode to bytes for compatibility)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioObjectGetPropertyData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __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_ERR(0, 338, __pyx_L1_error)

    /* "coremusic/capi.pyx":337
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioObjectGetPropertyData"))
 * 
*/
  }

  /* "coremusic/capi.pyx":341
 * 
 *     # Use helper to convert CFString to Python string (returns str, encode to bytes for compatibility)
 *     cdef str result_str = cfstring_to_str(string_ref)             # <<<<<<<<<<<<<<
 *     return result_str.encode('utf-8') if result_str else b''
 * 
*/
  __pyx_t_2 = __pyx_f_9coremusic_4capi_cfstring_to_str(__pyx_v_string_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result_str = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":342
 *     # Use helper to convert CFString to Python string (returns str, encode to bytes for compatibility)
 *     cdef str result_str = cfstring_to_str(string_ref)
 *     return result_str.encode('utf-8') if result_str else b''             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (__pyx_v_result_str == Py_None) __pyx_t_1 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_result_str);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 342, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {
    if (unlikely(__pyx_v_result_str == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
      __PYX_ERR(0, 342, __pyx_L1_error)
    }
    __pyx_t_4 = PyUnicode_AsUTF8String(__pyx_v_result_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__7);
    __pyx_t_2 = __pyx_mstate_global->__pyx_kp_b__7;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":322
 * 
 * 
 * def audio_object_get_property_string(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a string property from an AudioObject
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_object_get_property_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":345
 * 
 * 
 * def audio_hardware_get_devices() -> list:             # <<<<<<<<<<<<<<
 *     """Get list of all audio device IDs"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_19audio_hardware_get_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_18audio_hardware_get_devices, "audio_hardware_get_devices() -> list\n\nGet list of all audio device IDs");
static PyMethodDef __pyx_mdef_9coremusic_4capi_19audio_hardware_get_devices = {"audio_hardware_get_devices", (PyCFunction)__pyx_pw_9coremusic_4capi_19audio_hardware_get_devices, METH_NOARGS, __pyx_doc_9coremusic_4capi_18audio_hardware_get_devices};
static PyObject *__pyx_pw_9coremusic_4capi_19audio_hardware_get_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_hardware_get_devices (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_18audio_hardware_get_devices(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_18audio_hardware_get_devices(CYTHON_UNUSED PyObject *__pyx_self) {
  AudioObjectPropertyAddress __pyx_v_address;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  AudioObjectID *__pyx_v_device_ids;
  int __pyx_v_device_count;
  PyObject *__pyx_v_devices = 0;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_hardware_get_devices", 0);

  /* "coremusic/capi.pyx":348
 *     """Get list of all audio device IDs"""
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef ca.AudioObjectID* device_ids
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":352
 *     cdef ca.AudioObjectID* device_ids
 *     cdef int device_count
 *     cdef list devices = []             # <<<<<<<<<<<<<<
 * 
 *     init_property_address(
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_devices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":354
 *     cdef list devices = []
 * 
 *     init_property_address(             # <<<<<<<<<<<<<<
 *         &address,
 *         ca.kAudioHardwarePropertyDevices,
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain);

  /* "coremusic/capi.pyx":362
 * 
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         return []
*/
  __pyx_v_status = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, (&__pyx_v_address), 0, NULL, (&__pyx_v_data_size));

  /* "coremusic/capi.pyx":363
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":364
 *     status = ca.AudioObjectGetPropertyDataSize(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size)
 *     if status != 0:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     device_count = data_size // sizeof(ca.AudioObjectID)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":363
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":366
 *         return []
 * 
 *     device_count = data_size // sizeof(ca.AudioObjectID)             # <<<<<<<<<<<<<<
 *     if device_count == 0:
 *         return []
*/
  __pyx_t_3 = (sizeof(AudioObjectID));
  if (unlikely(__pyx_t_3 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 366, __pyx_L1_error)
  }
  __pyx_v_device_count = (__pyx_v_data_size / __pyx_t_3);

  /* "coremusic/capi.pyx":367
 * 
 *     device_count = data_size // sizeof(ca.AudioObjectID)
 *     if device_count == 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_2 = (__pyx_v_device_count == 0);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":368
 *     device_count = data_size // sizeof(ca.AudioObjectID)
 *     if device_count == 0:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":367
 * 
 *     device_count = data_size // sizeof(ca.AudioObjectID)
 *     if device_count == 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":371
 * 
 *     # Allocate buffer
 *     device_ids = <ca.AudioObjectID*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if device_ids == NULL:
 *         return []
*/
  __pyx_v_device_ids = ((AudioObjectID *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":372
 *     # Allocate buffer
 *     device_ids = <ca.AudioObjectID*>malloc(data_size)
 *     if device_ids == NULL:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_2 = (__pyx_v_device_ids == NULL);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":373
 *     device_ids = <ca.AudioObjectID*>malloc(data_size)
 *     if device_ids == NULL:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":372
 *     # Allocate buffer
 *     device_ids = <ca.AudioObjectID*>malloc(data_size)
 *     if device_ids == NULL:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":375
 *         return []
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)
 *         if status == 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":376
 * 
 *     try:
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)             # <<<<<<<<<<<<<<
 *         if status == 0:
 *             for i in range(device_count):
*/
    __pyx_v_status = AudioObjectGetPropertyData(kAudioObjectSystemObject, (&__pyx_v_address), 0, NULL, (&__pyx_v_data_size), __pyx_v_device_ids);

    /* "coremusic/capi.pyx":377
 *     try:
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)
 *         if status == 0:             # <<<<<<<<<<<<<<
 *             for i in range(device_count):
 *                 devices.append(device_ids[i])
*/
    __pyx_t_2 = (__pyx_v_status == 0);
    if (__pyx_t_2) {

      /* "coremusic/capi.pyx":378
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)
 *         if status == 0:
 *             for i in range(device_count):             # <<<<<<<<<<<<<<
 *                 devices.append(device_ids[i])
 *     finally:
*/
      __pyx_t_4 = __pyx_v_device_count;
      __pyx_t_5 = __pyx_t_4;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

        /* "coremusic/capi.pyx":379
 *         if status == 0:
 *             for i in range(device_count):
 *                 devices.append(device_ids[i])             # <<<<<<<<<<<<<<
 *     finally:
 *         free(device_ids)
*/
        __pyx_t_1 = __Pyx_PyLong_From_UInt32((__pyx_v_device_ids[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_devices, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 379, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "coremusic/capi.pyx":377
 *     try:
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)
 *         if status == 0:             # <<<<<<<<<<<<<<
 *             for i in range(device_count):
 *                 devices.append(device_ids[i])
*/
    }
  }

  /* "coremusic/capi.pyx":381
 *                 devices.append(device_ids[i])
 *     finally:
 *         free(device_ids)             # <<<<<<<<<<<<<<
 * 
 *     return devices
*/
  /*finally:*/ {
    /*normal exit:*/{
      free(__pyx_v_device_ids);
      goto __pyx_L8;
    }
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_device_ids);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L8:;
  }

  /* "coremusic/capi.pyx":383
 *         free(device_ids)
 * 
 *     return devices             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_devices);
  __pyx_r = __pyx_v_devices;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":345
 * 
 * 
 * def audio_hardware_get_devices() -> list:             # <<<<<<<<<<<<<<
 *     """Get list of all audio device IDs"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_get_devices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_devices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":386
 * 
 * 
 * def audio_hardware_get_default_output_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default output device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_21audio_hardware_get_default_output_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_20audio_hardware_get_default_output_device, "audio_hardware_get_default_output_device() -> int\n\nGet the default output device ID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_21audio_hardware_get_default_output_device = {"audio_hardware_get_default_output_device", (PyCFunction)__pyx_pw_9coremusic_4capi_21audio_hardware_get_default_output_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_20audio_hardware_get_default_output_device};
static PyObject *__pyx_pw_9coremusic_4capi_21audio_hardware_get_default_output_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_hardware_get_default_output_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_20audio_hardware_get_default_output_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_20audio_hardware_get_default_output_device(CYTHON_UNUSED PyObject *__pyx_self) {
  AudioObjectPropertyAddress __pyx_v_address;
  UInt32 __pyx_v_data_size;
  AudioObjectID __pyx_v_device_id;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_hardware_get_default_output_device", 0);

  /* "coremusic/capi.pyx":389
 *     """Get the default output device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = sizeof(ca.AudioObjectID)             # <<<<<<<<<<<<<<
 *     cdef ca.AudioObjectID device_id = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = (sizeof(AudioObjectID));

  /* "coremusic/capi.pyx":390
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = sizeof(ca.AudioObjectID)
 *     cdef ca.AudioObjectID device_id = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_device_id = 0;

  /* "coremusic/capi.pyx":393
 *     cdef cf.OSStatus status
 * 
 *     init_property_address(             # <<<<<<<<<<<<<<
 *         &address,
 *         ca.kAudioHardwarePropertyDefaultOutputDevice,
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain);

  /* "coremusic/capi.pyx":400
 *     )
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         return 0
*/
  __pyx_v_status = AudioObjectGetPropertyData(kAudioObjectSystemObject, (&__pyx_v_address), 0, NULL, (&__pyx_v_data_size), (&__pyx_v_device_id));

  /* "coremusic/capi.pyx":401
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":402
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     return device_id
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":401
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "coremusic/capi.pyx":404
 *         return 0
 * 
 *     return device_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_device_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 404, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":386
 * 
 * 
 * def audio_hardware_get_default_output_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default output device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_get_default_output_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":407
 * 
 * 
 * def audio_hardware_get_default_input_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default input device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_23audio_hardware_get_default_input_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_22audio_hardware_get_default_input_device, "audio_hardware_get_default_input_device() -> int\n\nGet the default input device ID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_23audio_hardware_get_default_input_device = {"audio_hardware_get_default_input_device", (PyCFunction)__pyx_pw_9coremusic_4capi_23audio_hardware_get_default_input_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_22audio_hardware_get_default_input_device};
static PyObject *__pyx_pw_9coremusic_4capi_23audio_hardware_get_default_input_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_hardware_get_default_input_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_22audio_hardware_get_default_input_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_22audio_hardware_get_default_input_device(CYTHON_UNUSED PyObject *__pyx_self) {
  AudioObjectPropertyAddress __pyx_v_address;
  UInt32 __pyx_v_data_size;
  AudioObjectID __pyx_v_device_id;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_hardware_get_default_input_device", 0);

  /* "coremusic/capi.pyx":410
 *     """Get the default input device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = sizeof(ca.AudioObjectID)             # <<<<<<<<<<<<<<
 *     cdef ca.AudioObjectID device_id = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = (sizeof(AudioObjectID));

  /* "coremusic/capi.pyx":411
 *     cdef ca.AudioObjectPropertyAddress address
 *     cdef cf.UInt32 data_size = sizeof(ca.AudioObjectID)
 *     cdef ca.AudioObjectID device_id = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_device_id = 0;

  /* "coremusic/capi.pyx":414
 *     cdef cf.OSStatus status
 * 
 *     init_property_address(             # <<<<<<<<<<<<<<
 *         &address,
 *         ca.kAudioHardwarePropertyDefaultInputDevice,
*/
  __pyx_f_9coremusic_4capi_init_property_address((&__pyx_v_address), kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMain);

  /* "coremusic/capi.pyx":421
 *     )
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         return 0
*/
  __pyx_v_status = AudioObjectGetPropertyData(kAudioObjectSystemObject, (&__pyx_v_address), 0, NULL, (&__pyx_v_data_size), (&__pyx_v_device_id));

  /* "coremusic/capi.pyx":422
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":423
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     return device_id
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":422
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "coremusic/capi.pyx":425
 *         return 0
 * 
 *     return device_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_device_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 425, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":407
 * 
 * 
 * def audio_hardware_get_default_input_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default input device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.audio_hardware_get_default_input_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":429
 * 
 * # Audio File Functions
 * def audio_file_open_url(str file_path, int permissions=1, int file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an audio file at the given path"""
 *     cdef at.AudioFileID audio_file
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_25audio_file_open_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_24audio_file_open_url, "audio_file_open_url(str file_path, int permissions=1, int file_type_hint=0)\n\nOpen an audio file at the given path");
static PyMethodDef __pyx_mdef_9coremusic_4capi_25audio_file_open_url = {"audio_file_open_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_25audio_file_open_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_24audio_file_open_url};
static PyObject *__pyx_pw_9coremusic_4capi_25audio_file_open_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  int __pyx_v_permissions;
  int __pyx_v_file_type_hint;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_open_url (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,&__pyx_mstate_global->__pyx_n_u_permissions,&__pyx_mstate_global->__pyx_n_u_file_type_hint,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 429, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_open_url", 0) < (0)) __PYX_ERR(0, 429, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_open_url", 0, 1, 3, i); __PYX_ERR(0, 429, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 429, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_permissions = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_permissions == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L3_error)
    } else {
      __pyx_v_permissions = ((int)((int)1));
    }
    if (values[2]) {
      __pyx_v_file_type_hint = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_file_type_hint == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L3_error)
    } else {
      __pyx_v_file_type_hint = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_open_url", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 429, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_open_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 429, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_24audio_file_open_url(__pyx_self, __pyx_v_file_path, __pyx_v_permissions, __pyx_v_file_type_hint);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_24audio_file_open_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path, int __pyx_v_permissions, int __pyx_v_file_type_hint) {
  AudioFileID __pyx_v_audio_file;
  CFURLRef __pyx_v_url_ref;
  PyObject *__pyx_v_path_bytes = 0;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt8 const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_open_url", 0);

  /* "coremusic/capi.pyx":433
 *     cdef at.AudioFileID audio_file
 *     cdef cf.CFURLRef url_ref
 *     cdef bytes path_bytes = file_path.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 433, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":437
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,             # <<<<<<<<<<<<<<
 *         len(path_bytes),
 *         False
*/
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_path_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error)

  /* "coremusic/capi.pyx":438
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
 *         len(path_bytes),             # <<<<<<<<<<<<<<
 *         False
 *     )
*/
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_path_bytes); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 438, __pyx_L1_error)

  /* "coremusic/capi.pyx":435
 *     cdef bytes path_bytes = file_path.encode('utf-8')
 * 
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
*/
  __pyx_v_url_ref = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, ((UInt8 const *)__pyx_t_2), __pyx_t_3, 0);

  /* "coremusic/capi.pyx":442
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  __pyx_t_4 = (!(__pyx_v_url_ref != 0));
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":443
 * 
 *     if not url_ref:
 *         raise ValueError("Could not create URL from file path")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileOpenURL(
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_from_file_p};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __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_ERR(0, 443, __pyx_L1_error)

    /* "coremusic/capi.pyx":442
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  }

  /* "coremusic/capi.pyx":445
 *         raise ValueError("Could not create URL from file path")
 * 
 *     cdef cf.OSStatus status = at.AudioFileOpenURL(             # <<<<<<<<<<<<<<
 *         url_ref,
 *         <at.AudioFilePermissions>permissions,
*/
  __pyx_v_status = AudioFileOpenURL(__pyx_v_url_ref, ((AudioFilePermissions)__pyx_v_permissions), ((AudioFileTypeID)__pyx_v_file_type_hint), (&__pyx_v_audio_file));

  /* "coremusic/capi.pyx":452
 *     )
 * 
 *     cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":454
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileOpenURL"))
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":455
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileOpenURL"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>audio_file
*/
    __pyx_t_5 = NULL;
    __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileOpenURL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __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_ERR(0, 455, __pyx_L1_error)

    /* "coremusic/capi.pyx":454
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileOpenURL"))
 * 
*/
  }

  /* "coremusic/capi.pyx":457
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileOpenURL"))
 * 
 *     return <long>audio_file             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_audio_file)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":429
 * 
 * # Audio File Functions
 * def audio_file_open_url(str file_path, int permissions=1, int file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an audio file at the given path"""
 *     cdef at.AudioFileID audio_file
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_file_open_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":460
 * 
 * 
 * def audio_file_close(long audio_file_id):             # <<<<<<<<<<<<<<
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_27audio_file_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_26audio_file_close, "audio_file_close(long audio_file_id)\n\nClose an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_27audio_file_close = {"audio_file_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_27audio_file_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_26audio_file_close};
static PyObject *__pyx_pw_9coremusic_4capi_27audio_file_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_file_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_file_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 460, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 460, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_close", 0) < (0)) __PYX_ERR(0, 460, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_close", 1, 1, 1, i); __PYX_ERR(0, 460, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 460, __pyx_L3_error)
    }
    __pyx_v_audio_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 460, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 460, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_26audio_file_close(__pyx_self, __pyx_v_audio_file_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_26audio_file_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id) {
  AudioFileID __pyx_v_audio_file;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_close", 0);

  /* "coremusic/capi.pyx":462
 * def audio_file_close(long audio_file_id):
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:
*/
  __pyx_v_audio_file = ((AudioFileID)__pyx_v_audio_file_id);

  /* "coremusic/capi.pyx":463
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileClose"))
*/
  __pyx_v_status = AudioFileClose(__pyx_v_audio_file);

  /* "coremusic/capi.pyx":464
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileClose"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":465
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileClose"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileClose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __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_ERR(0, 465, __pyx_L1_error)

    /* "coremusic/capi.pyx":464
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileClose"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":466
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileClose"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":460
 * 
 * 
 * def audio_file_close(long audio_file_id):             # <<<<<<<<<<<<<<
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_file_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":469
 * 
 * 
 * def audio_file_get_property(long audio_file_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_29audio_file_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_28audio_file_get_property, "audio_file_get_property(long audio_file_id, int property_id)\n\nGet a property from an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_29audio_file_get_property = {"audio_file_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_29audio_file_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_28audio_file_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_29audio_file_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_file_id;
  int __pyx_v_property_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_file_id,&__pyx_mstate_global->__pyx_n_u_property_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 469, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 469, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 469, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_get_property", 0) < (0)) __PYX_ERR(0, 469, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_get_property", 1, 2, 2, i); __PYX_ERR(0, 469, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 469, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 469, __pyx_L3_error)
    }
    __pyx_v_audio_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_get_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 469, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_28audio_file_get_property(__pyx_self, __pyx_v_audio_file_id, __pyx_v_property_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_28audio_file_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, int __pyx_v_property_id) {
  AudioFileID __pyx_v_audio_file;
  UInt32 __pyx_v_data_size;
  UInt32 __pyx_v_writable;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_get_property", 0);

  /* "coremusic/capi.pyx":471
 * def audio_file_get_property(long audio_file_id, int property_id):
 *     """Get a property from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.UInt32 writable = 0
*/
  __pyx_v_audio_file = ((AudioFileID)__pyx_v_audio_file_id);

  /* "coremusic/capi.pyx":472
 *     """Get a property from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 writable = 0
 * 
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":473
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.UInt32 writable = 0             # <<<<<<<<<<<<<<
 * 
 *     # Get the size of the property data
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":476
 * 
 *     # Get the size of the property data
 *     cdef cf.OSStatus status = at.AudioFileGetPropertyInfo(             # <<<<<<<<<<<<<<
 *         audio_file,
 *         <at.AudioFilePropertyID>property_id,
*/
  __pyx_v_status = AudioFileGetPropertyInfo(__pyx_v_audio_file, ((AudioFilePropertyID)__pyx_v_property_id), (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":483
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetPropertyInfo"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":484
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetPropertyInfo"))             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property data
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileGetPropertyInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __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_ERR(0, 484, __pyx_L1_error)

    /* "coremusic/capi.pyx":483
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetPropertyInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":487
 * 
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for property data")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":488
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
*/
  __pyx_t_1 = (!(__pyx_v_buffer != 0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":489
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for property data")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_pr};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __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_ERR(0, 489, __pyx_L1_error)

    /* "coremusic/capi.pyx":488
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
*/
  }

  /* "coremusic/capi.pyx":491
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioFileGetProperty(
 *             audio_file,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":492
 * 
 *     try:
 *         status = at.AudioFileGetProperty(             # <<<<<<<<<<<<<<
 *             audio_file,
 *             <at.AudioFilePropertyID>property_id,
*/
    __pyx_v_status = AudioFileGetProperty(__pyx_v_audio_file, ((AudioFilePropertyID)__pyx_v_property_id), (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":499
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":500
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         # Return the data as bytes
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileGetProperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 500, __pyx_L6_error)

      /* "coremusic/capi.pyx":499
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":503
 * 
 *         # Return the data as bytes
 *         return buffer[:data_size]             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_data_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":506
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_14 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":469
 * 
 * 
 * def audio_file_get_property(long audio_file_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_file_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":509
 * 
 * 
 * def audio_file_read_packets(long audio_file_id, long start_packet, int num_packets):             # <<<<<<<<<<<<<<
 *     """Read packets from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_31audio_file_read_packets(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_30audio_file_read_packets, "audio_file_read_packets(long audio_file_id, long start_packet, int num_packets)\n\nRead packets from an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_31audio_file_read_packets = {"audio_file_read_packets", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_31audio_file_read_packets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_30audio_file_read_packets};
static PyObject *__pyx_pw_9coremusic_4capi_31audio_file_read_packets(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_file_id;
  long __pyx_v_start_packet;
  int __pyx_v_num_packets;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_read_packets (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_file_id,&__pyx_mstate_global->__pyx_n_u_start_packet,&__pyx_mstate_global->__pyx_n_u_num_packets,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 509, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 509, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 509, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 509, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_read_packets", 0) < (0)) __PYX_ERR(0, 509, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_read_packets", 1, 3, 3, i); __PYX_ERR(0, 509, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 509, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 509, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 509, __pyx_L3_error)
    }
    __pyx_v_audio_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error)
    __pyx_v_start_packet = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_start_packet == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error)
    __pyx_v_num_packets = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_num_packets == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_read_packets", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 509, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_read_packets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_30audio_file_read_packets(__pyx_self, __pyx_v_audio_file_id, __pyx_v_start_packet, __pyx_v_num_packets);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_30audio_file_read_packets(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, long __pyx_v_start_packet, int __pyx_v_num_packets) {
  AudioFileID __pyx_v_audio_file;
  UInt32 __pyx_v_num_bytes;
  UInt32 __pyx_v_packet_count;
  UInt32 __pyx_v_max_packet_size;
  UInt32 __pyx_v_prop_size;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_buffer_size;
  char *__pyx_v_buffer;
  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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("audio_file_read_packets", 0);

  /* "coremusic/capi.pyx":511
 * def audio_file_read_packets(long audio_file_id, long start_packet, int num_packets):
 *     """Read packets from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 num_bytes = 0
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets
*/
  __pyx_v_audio_file = ((AudioFileID)__pyx_v_audio_file_id);

  /* "coremusic/capi.pyx":512
 *     """Read packets from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 num_bytes = 0             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets
 * 
*/
  __pyx_v_num_bytes = 0;

  /* "coremusic/capi.pyx":513
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 num_bytes = 0
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets             # <<<<<<<<<<<<<<
 * 
 *     # First get the maximum packet size to determine buffer size
*/
  __pyx_v_packet_count = ((UInt32)__pyx_v_num_packets);

  /* "coremusic/capi.pyx":516
 * 
 *     # First get the maximum packet size to determine buffer size
 *     cdef cf.UInt32 max_packet_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)
 * 
*/
  __pyx_v_max_packet_size = 0;

  /* "coremusic/capi.pyx":517
 *     # First get the maximum packet size to determine buffer size
 *     cdef cf.UInt32 max_packet_size = 0
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileGetProperty(
*/
  __pyx_v_prop_size = (sizeof(UInt32));

  /* "coremusic/capi.pyx":519
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)
 * 
 *     cdef cf.OSStatus status = at.AudioFileGetProperty(             # <<<<<<<<<<<<<<
 *         audio_file,
 *         at.kAudioFilePropertyMaximumPacketSize,
*/
  __pyx_v_status = AudioFileGetProperty(__pyx_v_audio_file, kAudioFilePropertyMaximumPacketSize, (&__pyx_v_prop_size), (&__pyx_v_max_packet_size));

  /* "coremusic/capi.pyx":526
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Could not get maximum packet size: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":527
 * 
 *     if status != 0:
 *         raise RuntimeError(f"Could not get maximum packet size: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_get_maximum_packet_siz, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __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_ERR(0, 527, __pyx_L1_error)

    /* "coremusic/capi.pyx":526
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Could not get maximum packet size: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":530
 * 
 *     # Allocate buffer
 *     cdef cf.UInt32 buffer_size = max_packet_size * packet_count             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     if not buffer:
*/
  __pyx_v_buffer_size = (__pyx_v_max_packet_size * __pyx_v_packet_count);

  /* "coremusic/capi.pyx":531
 *     # Allocate buffer
 *     cdef cf.UInt32 buffer_size = max_packet_size * packet_count
 *     cdef char* buffer = <char*>malloc(buffer_size)             # <<<<<<<<<<<<<<
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for packet data")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_buffer_size));

  /* "coremusic/capi.pyx":532
 *     cdef cf.UInt32 buffer_size = max_packet_size * packet_count
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for packet data")
 * 
*/
  __pyx_t_1 = (!(__pyx_v_buffer != 0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":533
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for packet data")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_pa};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __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_ERR(0, 533, __pyx_L1_error)

    /* "coremusic/capi.pyx":532
 *     cdef cf.UInt32 buffer_size = max_packet_size * packet_count
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for packet data")
 * 
*/
  }

  /* "coremusic/capi.pyx":535
 *         raise MemoryError("Could not allocate buffer for packet data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         num_bytes = buffer_size
 *         status = at.AudioFileReadPackets(
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":536
 * 
 *     try:
 *         num_bytes = buffer_size             # <<<<<<<<<<<<<<
 *         status = at.AudioFileReadPackets(
 *             audio_file,
*/
    __pyx_v_num_bytes = __pyx_v_buffer_size;

    /* "coremusic/capi.pyx":537
 *     try:
 *         num_bytes = buffer_size
 *         status = at.AudioFileReadPackets(             # <<<<<<<<<<<<<<
 *             audio_file,
 *             False,  # don't use cache
*/
    __pyx_v_status = AudioFileReadPackets(__pyx_v_audio_file, 0, (&__pyx_v_num_bytes), NULL, ((SInt64)__pyx_v_start_packet), (&__pyx_v_packet_count), __pyx_v_buffer);

    /* "coremusic/capi.pyx":547
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":548
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))             # <<<<<<<<<<<<<<
 * 
 *         return buffer[:num_bytes], packet_count
*/
      __pyx_t_5 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileReadPackets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 548, __pyx_L6_error)

      /* "coremusic/capi.pyx":547
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
*/
    }

    /* "coremusic/capi.pyx":550
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
 *         return buffer[:num_bytes], packet_count             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_num_bytes - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_packet_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 550, __pyx_L6_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 550, __pyx_L6_error);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":553
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":509
 * 
 * 
 * def audio_file_read_packets(long audio_file_id, long start_packet, int num_packets):             # <<<<<<<<<<<<<<
 *     """Read packets from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.audio_file_read_packets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":556
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_read_packets_into(long audio_file_id, long start_packet, int num_packets,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_33audio_file_read_packets_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_32audio_file_read_packets_into, "audio_file_read_packets_into(long audio_file_id, long start_packet, int num_packets, char[::1] buffer)\n\nRead packets from an audio file directly into a provided buffer (zero-copy).\n\nThis is a high-performance variant of audio_file_read_packets() that reads\ndirectly into a caller-provided buffer, avoiding memory allocation and copying.\n\nArgs:\n    audio_file_id: AudioFile ID from audio_file_open_url()\n    start_packet: Starting packet number\n    num_packets: Number of packets to read\n    buffer: Contiguous byte buffer (bytearray or numpy array) to read into.\n            Must be large enough to hold the requested packets.\n\nReturns:\n    Tuple of (bytes_read, packets_read) indicating actual data read.\n    The data is written directly into the provided buffer.\n\nRaises:\n    RuntimeError: If the read operation fails\n    ValueError: If buffer is too small\n\nExample:\n    >>> import numpy as np\n    >>> file_id = audio_file_open_url(\"audio.wav\")\n    >>> # Pre-allocate buffer (e.g., 1MB)\n    >>> buffer = bytearray(1024 * 1024)\n    >>> bytes_read, packets_read = audio_file_read_packets_into(\n    ...     file_id, 0, 10000, buffer)\n    >>> # Data is now in buffer[:bytes_read]\n    >>> audio_file_close(file_id)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_33audio_file_read_packets_into = {"audio_file_read_packets_into", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_33audio_file_read_packets_into, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_32audio_file_read_packets_into};
static PyObject *__pyx_pw_9coremusic_4capi_33audio_file_read_packets_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_file_id;
  long __pyx_v_start_packet;
  int __pyx_v_num_packets;
  __Pyx_memviewslice __pyx_v_buffer = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_read_packets_into (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_file_id,&__pyx_mstate_global->__pyx_n_u_start_packet,&__pyx_mstate_global->__pyx_n_u_num_packets,&__pyx_mstate_global->__pyx_n_u_buffer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 556, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 556, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 556, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 556, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 556, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_read_packets_into", 0) < (0)) __PYX_ERR(0, 556, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_read_packets_into", 1, 4, 4, i); __PYX_ERR(0, 556, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 556, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 556, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 556, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 556, __pyx_L3_error)
    }
    __pyx_v_audio_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 558, __pyx_L3_error)
    __pyx_v_start_packet = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_start_packet == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 558, __pyx_L3_error)
    __pyx_v_num_packets = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_num_packets == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 558, __pyx_L3_error)
    __pyx_v_buffer = __Pyx_PyObject_to_MemoryviewSlice_dc_char(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_buffer.memview)) __PYX_ERR(0, 559, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_read_packets_into", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 556, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_buffer, 1);
  __Pyx_AddTraceback("coremusic.capi.audio_file_read_packets_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_buffer.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buffer"); __PYX_ERR(0, 559, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9coremusic_4capi_32audio_file_read_packets_into(__pyx_self, __pyx_v_audio_file_id, __pyx_v_start_packet, __pyx_v_num_packets, __pyx_v_buffer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_buffer, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_32audio_file_read_packets_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id, long __pyx_v_start_packet, int __pyx_v_num_packets, __Pyx_memviewslice __pyx_v_buffer) {
  AudioFileID __pyx_v_audio_file;
  UInt32 __pyx_v_num_bytes;
  UInt32 __pyx_v_packet_count;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_max_packet_size;
  UInt32 __pyx_v_prop_size;
  UInt32 __pyx_v_required_size;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[9];
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_read_packets_into", 0);

  /* "coremusic/capi.pyx":590
 *         >>> audio_file_close(file_id)
 *     """
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 num_bytes = <cf.UInt32>buffer.shape[0]
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets
*/
  __pyx_v_audio_file = ((AudioFileID)__pyx_v_audio_file_id);

  /* "coremusic/capi.pyx":591
 *     """
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 num_bytes = <cf.UInt32>buffer.shape[0]             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets
 *     cdef cf.OSStatus status
*/
  __pyx_v_num_bytes = ((UInt32)(__pyx_v_buffer.shape[0]));

  /* "coremusic/capi.pyx":592
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.UInt32 num_bytes = <cf.UInt32>buffer.shape[0]
 *     cdef cf.UInt32 packet_count = <cf.UInt32>num_packets             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_packet_count = ((UInt32)__pyx_v_num_packets);

  /* "coremusic/capi.pyx":596
 * 
 *     # Validate buffer size by checking max packet size
 *     cdef cf.UInt32 max_packet_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)
 * 
*/
  __pyx_v_max_packet_size = 0;

  /* "coremusic/capi.pyx":597
 *     # Validate buffer size by checking max packet size
 *     cdef cf.UInt32 max_packet_size = 0
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)             # <<<<<<<<<<<<<<
 * 
 *     status = at.AudioFileGetProperty(
*/
  __pyx_v_prop_size = (sizeof(UInt32));

  /* "coremusic/capi.pyx":599
 *     cdef cf.UInt32 prop_size = sizeof(cf.UInt32)
 * 
 *     status = at.AudioFileGetProperty(             # <<<<<<<<<<<<<<
 *         audio_file,
 *         at.kAudioFilePropertyMaximumPacketSize,
*/
  __pyx_v_status = AudioFileGetProperty(__pyx_v_audio_file, kAudioFilePropertyMaximumPacketSize, (&__pyx_v_prop_size), (&__pyx_v_max_packet_size));

  /* "coremusic/capi.pyx":606
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty (MaximumPacketSize)"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":607
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty (MaximumPacketSize)"))             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.UInt32 required_size = max_packet_size * packet_count
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_kp_u_AudioFileGetProperty_MaximumPack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __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_ERR(0, 607, __pyx_L1_error)

    /* "coremusic/capi.pyx":606
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty (MaximumPacketSize)"))
 * 
*/
  }

  /* "coremusic/capi.pyx":609
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileGetProperty (MaximumPacketSize)"))
 * 
 *     cdef cf.UInt32 required_size = max_packet_size * packet_count             # <<<<<<<<<<<<<<
 *     if <cf.UInt32>buffer.shape[0] < required_size:
 *         raise ValueError(
*/
  __pyx_v_required_size = (__pyx_v_max_packet_size * __pyx_v_packet_count);

  /* "coremusic/capi.pyx":610
 * 
 *     cdef cf.UInt32 required_size = max_packet_size * packet_count
 *     if <cf.UInt32>buffer.shape[0] < required_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "
*/
  __pyx_t_1 = (((UInt32)(__pyx_v_buffer.shape[0])) < __pyx_v_required_size);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":611
 *     cdef cf.UInt32 required_size = max_packet_size * packet_count
 *     if <cf.UInt32>buffer.shape[0] < required_size:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "
 *             f"but {required_size} bytes required for {num_packets} packets "
*/
    __pyx_t_4 = NULL;

    /* "coremusic/capi.pyx":612
 *     if <cf.UInt32>buffer.shape[0] < required_size:
 *         raise ValueError(
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {required_size} bytes required for {num_packets} packets "
 *             f"(max packet size: {max_packet_size})"
*/
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_buffer.shape[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "coremusic/capi.pyx":613
 *         raise ValueError(
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "
 *             f"but {required_size} bytes required for {num_packets} packets "             # <<<<<<<<<<<<<<
 *             f"(max packet size: {max_packet_size})"
 *         )
*/
    __pyx_t_6 = __Pyx_PyUnicode_From_UInt32(__pyx_v_required_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_num_packets, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "coremusic/capi.pyx":614
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "
 *             f"but {required_size} bytes required for {num_packets} packets "
 *             f"(max packet size: {max_packet_size})"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_8 = __Pyx_PyUnicode_From_UInt32(__pyx_v_max_packet_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Buffer_too_small;
    __pyx_t_9[1] = __pyx_t_3;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_bytes_provided_but;
    __pyx_t_9[3] = __pyx_t_6;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_bytes_required_for;
    __pyx_t_9[5] = __pyx_t_7;
    __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u_packets_max_packet_size;
    __pyx_t_9[7] = __pyx_t_8;
    __pyx_t_9[8] = __pyx_mstate_global->__pyx_kp_u__5;

    /* "coremusic/capi.pyx":612
 *     if <cf.UInt32>buffer.shape[0] < required_size:
 *         raise ValueError(
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {required_size} bytes required for {num_packets} packets "
 *             f"(max packet size: {max_packet_size})"
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 9, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127);
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __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_ERR(0, 611, __pyx_L1_error)

    /* "coremusic/capi.pyx":610
 * 
 *     cdef cf.UInt32 required_size = max_packet_size * packet_count
 *     if <cf.UInt32>buffer.shape[0] < required_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Buffer too small: {buffer.shape[0]} bytes provided, "
*/
  }

  /* "coremusic/capi.pyx":625
 *         <cf.SInt64>start_packet,
 *         &packet_count,
 *         &buffer[0]             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":618
 * 
 *     # Read directly into the provided buffer
 *     status = at.AudioFileReadPackets(             # <<<<<<<<<<<<<<
 *         audio_file,
 *         False,  # don't use cache
*/
  __pyx_v_status = AudioFileReadPackets(__pyx_v_audio_file, 0, (&__pyx_v_num_bytes), NULL, ((SInt64)__pyx_v_start_packet), (&__pyx_v_packet_count), (&(*((char *) ( /* dim=0 */ ((char *) (((char *) __pyx_v_buffer.data) + __pyx_t_11)) )))));

  /* "coremusic/capi.pyx":628
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":629
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))             # <<<<<<<<<<<<<<
 * 
 *     return num_bytes, packet_count
*/
    __pyx_t_10 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileReadPackets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __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_ERR(0, 629, __pyx_L1_error)

    /* "coremusic/capi.pyx":628
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
*/
  }

  /* "coremusic/capi.pyx":631
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileReadPackets"))
 * 
 *     return num_bytes, packet_count             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_num_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_packet_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 631, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 631, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":556
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_read_packets_into(long audio_file_id, long start_packet, int num_packets,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("coremusic.capi.audio_file_read_packets_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":636
 * # AudioFileStream Functions
 * # Dummy callback functions to avoid NULL pointer issues
 * cdef void dummy_property_listener(void* client_data, at.AudioFileStreamID stream,             # <<<<<<<<<<<<<<
 *                                  at.AudioFileStreamPropertyID property_id,
 *                                  at.AudioFileStreamPropertyFlags* flags) noexcept:
*/

static void __pyx_f_9coremusic_4capi_dummy_property_listener(CYTHON_UNUSED void *__pyx_v_client_data, CYTHON_UNUSED AudioFileStreamID __pyx_v_stream, CYTHON_UNUSED AudioFileStreamPropertyID __pyx_v_property_id, CYTHON_UNUSED AudioFileStreamPropertyFlags *__pyx_v_flags) {

  /* function exit code */
}

/* "coremusic/capi.pyx":642
 *     pass
 * 
 * cdef void dummy_packets_callback(void* client_data, cf.UInt32 num_bytes,             # <<<<<<<<<<<<<<
 *                                 cf.UInt32 num_packets, const void* input_data,
 *                                 ct.AudioStreamPacketDescription* packet_descriptions) noexcept:
*/

static void __pyx_f_9coremusic_4capi_dummy_packets_callback(CYTHON_UNUSED void *__pyx_v_client_data, CYTHON_UNUSED UInt32 __pyx_v_num_bytes, CYTHON_UNUSED UInt32 __pyx_v_num_packets, CYTHON_UNUSED void const *__pyx_v_input_data, CYTHON_UNUSED AudioStreamPacketDescription *__pyx_v_packet_descriptions) {

  /* function exit code */
}

/* "coremusic/capi.pyx":648
 *     pass
 * 
 * def audio_file_stream_open(file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an AudioFileStream parser for streaming audio data"""
 *     cdef at.AudioFileStreamID stream_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_35audio_file_stream_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_34audio_file_stream_open, "audio_file_stream_open(file_type_hint=0)\n\nOpen an AudioFileStream parser for streaming audio data");
static PyMethodDef __pyx_mdef_9coremusic_4capi_35audio_file_stream_open = {"audio_file_stream_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_35audio_file_stream_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_34audio_file_stream_open};
static PyObject *__pyx_pw_9coremusic_4capi_35audio_file_stream_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_type_hint = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_open (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_type_hint,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 648, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 648, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_open", 0) < (0)) __PYX_ERR(0, 648, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 648, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    }
    __pyx_v_file_type_hint = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_open", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 648, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_34audio_file_stream_open(__pyx_self, __pyx_v_file_type_hint);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_34audio_file_stream_open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_type_hint) {
  AudioFileStreamID __pyx_v_stream_id;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  AudioFileTypeID __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_open", 0);

  /* "coremusic/capi.pyx":656
 *         dummy_property_listener,  # property listener proc
 *         dummy_packets_callback,  # packets proc
 *         <at.AudioFileTypeID>file_type_hint,             # <<<<<<<<<<<<<<
 *         &stream_id
 *     )
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_file_type_hint); if (unlikely((__pyx_t_1 == ((AudioFileTypeID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)

  /* "coremusic/capi.pyx":652
 *     cdef at.AudioFileStreamID stream_id
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamOpen(             # <<<<<<<<<<<<<<
 *         NULL,  # client data
 *         dummy_property_listener,  # property listener proc
*/
  __pyx_v_status = AudioFileStreamOpen(NULL, __pyx_f_9coremusic_4capi_dummy_property_listener, __pyx_f_9coremusic_4capi_dummy_packets_callback, ((AudioFileTypeID)__pyx_t_1), (&__pyx_v_stream_id));

  /* "coremusic/capi.pyx":660
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamOpen"))
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":661
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamOpen"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>stream_id
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamOpen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __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_ERR(0, 661, __pyx_L1_error)

    /* "coremusic/capi.pyx":660
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamOpen"))
 * 
*/
  }

  /* "coremusic/capi.pyx":663
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamOpen"))
 * 
 *     return <long>stream_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_stream_id)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":648
 *     pass
 * 
 * def audio_file_stream_open(file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an AudioFileStream parser for streaming audio data"""
 *     cdef at.AudioFileStreamID stream_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":666
 * 
 * 
 * def audio_file_stream_close(long stream_id):             # <<<<<<<<<<<<<<
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_37audio_file_stream_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_36audio_file_stream_close, "audio_file_stream_close(long stream_id)\n\nClose an AudioFileStream parser");
static PyMethodDef __pyx_mdef_9coremusic_4capi_37audio_file_stream_close = {"audio_file_stream_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_37audio_file_stream_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_36audio_file_stream_close};
static PyObject *__pyx_pw_9coremusic_4capi_37audio_file_stream_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_stream_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 666, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_close", 0) < (0)) __PYX_ERR(0, 666, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_stream_close", 1, 1, 1, i); __PYX_ERR(0, 666, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 666, __pyx_L3_error)
    }
    __pyx_v_stream_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_stream_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 666, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_36audio_file_stream_close(__pyx_self, __pyx_v_stream_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_36audio_file_stream_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id) {
  AudioFileStreamID __pyx_v_stream;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_close", 0);

  /* "coremusic/capi.pyx":668
 * def audio_file_stream_close(long stream_id):
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:
*/
  __pyx_v_stream = ((AudioFileStreamID)__pyx_v_stream_id);

  /* "coremusic/capi.pyx":669
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamClose"))
*/
  __pyx_v_status = AudioFileStreamClose(__pyx_v_stream);

  /* "coremusic/capi.pyx":670
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamClose"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":671
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamClose"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamClose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __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_ERR(0, 671, __pyx_L1_error)

    /* "coremusic/capi.pyx":670
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamClose"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":672
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamClose"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":666
 * 
 * 
 * def audio_file_stream_close(long stream_id):             # <<<<<<<<<<<<<<
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":675
 * 
 * 
 * def audio_file_stream_parse_bytes(long stream_id, bytes data, int flags=0):             # <<<<<<<<<<<<<<
 *     """Parse bytes through the AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_39audio_file_stream_parse_bytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_38audio_file_stream_parse_bytes, "audio_file_stream_parse_bytes(long stream_id, bytes data, int flags=0)\n\nParse bytes through the AudioFileStream parser");
static PyMethodDef __pyx_mdef_9coremusic_4capi_39audio_file_stream_parse_bytes = {"audio_file_stream_parse_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_39audio_file_stream_parse_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_38audio_file_stream_parse_bytes};
static PyObject *__pyx_pw_9coremusic_4capi_39audio_file_stream_parse_bytes(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_stream_id;
  PyObject *__pyx_v_data = 0;
  int __pyx_v_flags;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_parse_bytes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_flags,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 675, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 675, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 675, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_parse_bytes", 0) < (0)) __PYX_ERR(0, 675, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_stream_parse_bytes", 0, 2, 3, i); __PYX_ERR(0, 675, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 675, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 675, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stream_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_stream_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_flags = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L3_error)
    } else {
      __pyx_v_flags = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_parse_bytes", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_parse_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_38audio_file_stream_parse_bytes(__pyx_self, __pyx_v_stream_id, __pyx_v_data, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_38audio_file_stream_parse_bytes(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, PyObject *__pyx_v_data, int __pyx_v_flags) {
  AudioFileStreamID __pyx_v_stream;
  char *__pyx_v_data_ptr;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_parse_bytes", 0);

  /* "coremusic/capi.pyx":677
 * def audio_file_stream_parse_bytes(long stream_id, bytes data, int flags=0):
 *     """Parse bytes through the AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id             # <<<<<<<<<<<<<<
 *     cdef char* data_ptr = <char*>data
 *     cdef cf.UInt32 data_size = len(data)
*/
  __pyx_v_stream = ((AudioFileStreamID)__pyx_v_stream_id);

  /* "coremusic/capi.pyx":678
 *     """Parse bytes through the AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef char* data_ptr = <char*>data             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = len(data)
 * 
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 678, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
  __pyx_v_data_ptr = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":679
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef char* data_ptr = <char*>data
 *     cdef cf.UInt32 data_size = len(data)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamParseBytes(
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 679, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 679, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_2;

  /* "coremusic/capi.pyx":681
 *     cdef cf.UInt32 data_size = len(data)
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamParseBytes(             # <<<<<<<<<<<<<<
 *         stream,
 *         data_size,
*/
  __pyx_v_status = AudioFileStreamParseBytes(__pyx_v_stream, __pyx_v_data_size, ((void const *)__pyx_v_data_ptr), ((AudioFileStreamParseFlags)__pyx_v_flags));

  /* "coremusic/capi.pyx":688
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":689
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamParseBytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __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_ERR(0, 689, __pyx_L1_error)

    /* "coremusic/capi.pyx":688
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
*/
  }

  /* "coremusic/capi.pyx":691
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":675
 * 
 * 
 * def audio_file_stream_parse_bytes(long stream_id, bytes data, int flags=0):             # <<<<<<<<<<<<<<
 *     """Parse bytes through the AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_parse_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":694
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_stream_parse_buffer(long stream_id,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_41audio_file_stream_parse_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_40audio_file_stream_parse_buffer, "audio_file_stream_parse_buffer(long stream_id, const unsigned char[::1] data, int flags=0)\n\nParse buffer data through the AudioFileStream parser (zero-copy).\n\nThis is a high-performance variant of audio_file_stream_parse_bytes() that\naccepts any buffer object (bytes, bytearray, numpy array, memoryview) without\ncopying the data.\n\nUseful for streaming scenarios where:\n- Data arrives in chunks from network/file\n- Buffer pools are reused across multiple parse calls\n- Large buffers need to be parsed without copying\n\nArgs:\n    stream_id: AudioFileStream ID from audio_file_stream_open()\n    data: Audio data as contiguous buffer (bytes, bytearray, numpy uint8 array)\n    flags: Parse flags (default 0)\n\nReturns:\n    OSStatus code (0 for success)\n\nRaises:\n    RuntimeError: If parsing fails\n\nExample:\n    >>> stream_id = audio_file_stream_open()\n    >>> # Reusable buffer for streaming\n    >>> buffer = bytearray(4096)\n    >>> while chunk := read_from_network(buffer):\n    ...     audio_file_stream_parse_buffer(stream_id, buffer[:len(chunk)])\n    >>> audio_file_stream_close(stream_id)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_41audio_file_stream_parse_buffer = {"audio_file_stream_parse_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_41audio_file_stream_parse_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_40audio_file_stream_parse_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_41audio_file_stream_parse_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_stream_id;
  __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_flags;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_parse_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_flags,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 694, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_parse_buffer", 0) < (0)) __PYX_ERR(0, 694, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_stream_parse_buffer", 0, 2, 3, i); __PYX_ERR(0, 694, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 694, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 694, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stream_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_stream_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 696, __pyx_L3_error)
    __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(values[1], 0); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 697, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_flags = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L3_error)
    } else {
      __pyx_v_flags = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_parse_buffer", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 694, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_parse_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_data.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "data"); __PYX_ERR(0, 697, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9coremusic_4capi_40audio_file_stream_parse_buffer(__pyx_self, __pyx_v_stream_id, __pyx_v_data, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_40audio_file_stream_parse_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, __Pyx_memviewslice __pyx_v_data, int __pyx_v_flags) {
  AudioFileStreamID __pyx_v_stream;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_parse_buffer", 0);

  /* "coremusic/capi.pyx":729
 *         >>> audio_file_stream_close(stream_id)
 *     """
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = <cf.UInt32>data.shape[0]
 * 
*/
  __pyx_v_stream = ((AudioFileStreamID)__pyx_v_stream_id);

  /* "coremusic/capi.pyx":730
 *     """
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.UInt32 data_size = <cf.UInt32>data.shape[0]             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamParseBytes(
*/
  __pyx_v_data_size = ((UInt32)(__pyx_v_data.shape[0]));

  /* "coremusic/capi.pyx":735
 *         stream,
 *         data_size,
 *         &data[0],             # <<<<<<<<<<<<<<
 *         <at.AudioFileStreamParseFlags>flags
 *     )
*/
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":732
 *     cdef cf.UInt32 data_size = <cf.UInt32>data.shape[0]
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamParseBytes(             # <<<<<<<<<<<<<<
 *         stream,
 *         data_size,
*/
  __pyx_v_status = AudioFileStreamParseBytes(__pyx_v_stream, __pyx_v_data_size, (&(*((unsigned char const  *) ( /* dim=0 */ ((char *) (((unsigned char const  *) __pyx_v_data.data) + __pyx_t_1)) )))), ((AudioFileStreamParseFlags)__pyx_v_flags));

  /* "coremusic/capi.pyx":739
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":740
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamParseBytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __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_ERR(0, 740, __pyx_L1_error)

    /* "coremusic/capi.pyx":739
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
*/
  }

  /* "coremusic/capi.pyx":742
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamParseBytes"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":694
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_stream_parse_buffer(long stream_id,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_parse_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":745
 * 
 * 
 * def audio_file_stream_get_property(long stream_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_43audio_file_stream_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_42audio_file_stream_get_property, "audio_file_stream_get_property(long stream_id, int property_id)\n\nGet a property from an AudioFileStream parser");
static PyMethodDef __pyx_mdef_9coremusic_4capi_43audio_file_stream_get_property = {"audio_file_stream_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_43audio_file_stream_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_42audio_file_stream_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_43audio_file_stream_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_stream_id;
  int __pyx_v_property_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,&__pyx_mstate_global->__pyx_n_u_property_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 745, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_get_property", 0) < (0)) __PYX_ERR(0, 745, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_stream_get_property", 1, 2, 2, i); __PYX_ERR(0, 745, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 745, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 745, __pyx_L3_error)
    }
    __pyx_v_stream_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_stream_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_get_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 745, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_42audio_file_stream_get_property(__pyx_self, __pyx_v_stream_id, __pyx_v_property_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_42audio_file_stream_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, int __pyx_v_property_id) {
  AudioFileStreamID __pyx_v_stream;
  UInt32 __pyx_v_data_size;
  Boolean __pyx_v_writable;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  UInt32 __pyx_v_actual_size;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_get_property", 0);

  /* "coremusic/capi.pyx":747
 * def audio_file_stream_get_property(long stream_id, int property_id):
 *     """Get a property from an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0
*/
  __pyx_v_stream = ((AudioFileStreamID)__pyx_v_stream_id);

  /* "coremusic/capi.pyx":748
 *     """Get a property from an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.Boolean writable = 0
 * 
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":749
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0             # <<<<<<<<<<<<<<
 * 
 *     # Get the size of the property data
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":752
 * 
 *     # Get the size of the property data
 *     cdef cf.OSStatus status = at.AudioFileStreamGetPropertyInfo(             # <<<<<<<<<<<<<<
 *         stream,
 *         <at.AudioFileStreamPropertyID>property_id,
*/
  __pyx_v_status = AudioFileStreamGetPropertyInfo(__pyx_v_stream, ((AudioFileStreamPropertyID)__pyx_v_property_id), (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":759
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetPropertyInfo"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":760
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetPropertyInfo"))             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property data
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamGetPropertyInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __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_ERR(0, 760, __pyx_L1_error)

    /* "coremusic/capi.pyx":759
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetPropertyInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":763
 * 
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if not buffer:
 *         raise MemoryError("Could not allocate memory for property data")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":764
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for property data")
 * 
*/
  __pyx_t_1 = (!(__pyx_v_buffer != 0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":765
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:
 *         raise MemoryError("Could not allocate memory for property data")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.UInt32 actual_size = data_size
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_memory_for_pr};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __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_ERR(0, 765, __pyx_L1_error)

    /* "coremusic/capi.pyx":764
 *     # Allocate buffer and get the property data
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for property data")
 * 
*/
  }

  /* "coremusic/capi.pyx":767
 *         raise MemoryError("Could not allocate memory for property data")
 * 
 *     cdef cf.UInt32 actual_size = data_size             # <<<<<<<<<<<<<<
 *     cdef at.AudioStreamBasicDescription* asbd
 *     try:
*/
  __pyx_v_actual_size = __pyx_v_data_size;

  /* "coremusic/capi.pyx":769
 *     cdef cf.UInt32 actual_size = data_size
 *     cdef at.AudioStreamBasicDescription* asbd
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioFileStreamGetProperty(
 *             stream,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":770
 *     cdef at.AudioStreamBasicDescription* asbd
 *     try:
 *         status = at.AudioFileStreamGetProperty(             # <<<<<<<<<<<<<<
 *             stream,
 *             <at.AudioFileStreamPropertyID>property_id,
*/
    __pyx_v_status = AudioFileStreamGetProperty(__pyx_v_stream, ((AudioFileStreamPropertyID)__pyx_v_property_id), (&__pyx_v_actual_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":777
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetProperty"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":778
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         # Handle different property types
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamGetProperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 778, __pyx_L6_error)

      /* "coremusic/capi.pyx":777
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioFileStreamGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":781
 * 
 *         # Handle different property types
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:             # <<<<<<<<<<<<<<
 *             # Return AudioStreamBasicDescription as dict using helper
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)
*/
    switch (__pyx_v_property_id) {
      case kAudioFileStreamProperty_DataFormat:

      /* "coremusic/capi.pyx":783
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:
 *             # Return AudioStreamBasicDescription as dict using helper
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)             # <<<<<<<<<<<<<<
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,
 *                            at.kAudioFileStreamProperty_FileFormat,
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_f_9coremusic_4capi_asbd_to_dict(((AudioStreamBasicDescription *)__pyx_v_buffer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":781
 * 
 *         # Handle different property types
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:             # <<<<<<<<<<<<<<
 *             # Return AudioStreamBasicDescription as dict using helper
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)
*/
      break;
      case kAudioFileStreamProperty_ReadyToProducePackets:

      /* "coremusic/capi.pyx":784
 *             # Return AudioStreamBasicDescription as dict using helper
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
*/
      case kAudioFileStreamProperty_FileFormat:

      /* "coremusic/capi.pyx":785
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,
 *                            at.kAudioFileStreamProperty_FileFormat,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
 *                            at.kAudioFileStreamProperty_AudioDataPacketCount,
*/
      case kAudioFileStreamProperty_MaximumPacketSize:

      /* "coremusic/capi.pyx":786
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_AudioDataPacketCount,
 *                            at.kAudioFileStreamProperty_BitRate]:
*/
      case kAudioFileStreamProperty_AudioDataPacketCount:

      /* "coremusic/capi.pyx":787
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
 *                            at.kAudioFileStreamProperty_AudioDataPacketCount,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_BitRate]:
 *             # Return scalar values
*/
      case kAudioFileStreamProperty_BitRate:

      /* "coremusic/capi.pyx":790
 *                            at.kAudioFileStreamProperty_BitRate]:
 *             # Return scalar values
 *             if data_size == 4:             # <<<<<<<<<<<<<<
 *                 return (<cf.UInt32*>buffer)[0]
 *             elif data_size == 8:
*/
      switch (__pyx_v_data_size) {
        case 4:

        /* "coremusic/capi.pyx":791
 *             # Return scalar values
 *             if data_size == 4:
 *                 return (<cf.UInt32*>buffer)[0]             # <<<<<<<<<<<<<<
 *             elif data_size == 8:
 *                 return (<cf.UInt64*>buffer)[0]
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyLong_From_UInt32((((UInt32 *)__pyx_v_buffer)[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L5_return;

        /* "coremusic/capi.pyx":790
 *                            at.kAudioFileStreamProperty_BitRate]:
 *             # Return scalar values
 *             if data_size == 4:             # <<<<<<<<<<<<<<
 *                 return (<cf.UInt32*>buffer)[0]
 *             elif data_size == 8:
*/
        break;
        case 8:

        /* "coremusic/capi.pyx":793
 *                 return (<cf.UInt32*>buffer)[0]
 *             elif data_size == 8:
 *                 return (<cf.UInt64*>buffer)[0]             # <<<<<<<<<<<<<<
 *         elif property_id in [at.kAudioFileStreamProperty_AudioDataByteCount,
 *                            at.kAudioFileStreamProperty_DataOffset]:
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyLong_From_uint64_t((((UInt64 *)__pyx_v_buffer)[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L5_return;

        /* "coremusic/capi.pyx":792
 *             if data_size == 4:
 *                 return (<cf.UInt32*>buffer)[0]
 *             elif data_size == 8:             # <<<<<<<<<<<<<<
 *                 return (<cf.UInt64*>buffer)[0]
 *         elif property_id in [at.kAudioFileStreamProperty_AudioDataByteCount,
*/
        break;
        default: break;
      }

      /* "coremusic/capi.pyx":784
 *             # Return AudioStreamBasicDescription as dict using helper
 *             return asbd_to_dict(<at.AudioStreamBasicDescription*>buffer)
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
*/
      break;
      case kAudioFileStreamProperty_AudioDataByteCount:

      /* "coremusic/capi.pyx":794
 *             elif data_size == 8:
 *                 return (<cf.UInt64*>buffer)[0]
 *         elif property_id in [at.kAudioFileStreamProperty_AudioDataByteCount,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_DataOffset]:
 *             # Return 64-bit values
*/
      case kAudioFileStreamProperty_DataOffset:

      /* "coremusic/capi.pyx":797
 *                            at.kAudioFileStreamProperty_DataOffset]:
 *             # Return 64-bit values
 *             return (<cf.UInt64*>buffer)[0]             # <<<<<<<<<<<<<<
 *         else:
 *             # Return raw bytes for other properties
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyLong_From_uint64_t((((UInt64 *)__pyx_v_buffer)[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":794
 *             elif data_size == 8:
 *                 return (<cf.UInt64*>buffer)[0]
 *         elif property_id in [at.kAudioFileStreamProperty_AudioDataByteCount,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_DataOffset]:
 *             # Return 64-bit values
*/
      break;
      default:

      /* "coremusic/capi.pyx":800
 *         else:
 *             # Return raw bytes for other properties
 *             return buffer[:actual_size]             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_actual_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5_return;
      break;
    }
  }

  /* "coremusic/capi.pyx":803
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    /*normal exit:*/{
      free(__pyx_v_buffer);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_14 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L0;
    }
    __pyx_L7:;
  }

  /* "coremusic/capi.pyx":745
 * 
 * 
 * def audio_file_stream_get_property(long stream_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":806
 * 
 * 
 * def audio_file_stream_seek(long stream_id, long packet_offset):             # <<<<<<<<<<<<<<
 *     """Seek to a packet offset in the AudioFileStream"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_45audio_file_stream_seek(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_44audio_file_stream_seek, "audio_file_stream_seek(long stream_id, long packet_offset)\n\nSeek to a packet offset in the AudioFileStream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_45audio_file_stream_seek = {"audio_file_stream_seek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_45audio_file_stream_seek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_44audio_file_stream_seek};
static PyObject *__pyx_pw_9coremusic_4capi_45audio_file_stream_seek(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_stream_id;
  long __pyx_v_packet_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_file_stream_seek (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,&__pyx_mstate_global->__pyx_n_u_packet_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 806, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 806, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 806, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_file_stream_seek", 0) < (0)) __PYX_ERR(0, 806, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_file_stream_seek", 1, 2, 2, i); __PYX_ERR(0, 806, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 806, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 806, __pyx_L3_error)
    }
    __pyx_v_stream_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_stream_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error)
    __pyx_v_packet_offset = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_packet_offset == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_stream_seek", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 806, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_44audio_file_stream_seek(__pyx_self, __pyx_v_stream_id, __pyx_v_packet_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_44audio_file_stream_seek(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id, long __pyx_v_packet_offset) {
  AudioFileStreamID __pyx_v_stream;
  SInt64 __pyx_v_byte_offset;
  AudioFileStreamSeekFlags __pyx_v_flags;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_seek", 0);

  /* "coremusic/capi.pyx":808
 * def audio_file_stream_seek(long stream_id, long packet_offset):
 *     """Seek to a packet offset in the AudioFileStream"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id             # <<<<<<<<<<<<<<
 *     cdef cf.SInt64 byte_offset = 0
 *     cdef at.AudioFileStreamSeekFlags flags
*/
  __pyx_v_stream = ((AudioFileStreamID)__pyx_v_stream_id);

  /* "coremusic/capi.pyx":809
 *     """Seek to a packet offset in the AudioFileStream"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.SInt64 byte_offset = 0             # <<<<<<<<<<<<<<
 *     cdef at.AudioFileStreamSeekFlags flags
 *     flags = <at.AudioFileStreamSeekFlags>0
*/
  __pyx_v_byte_offset = 0;

  /* "coremusic/capi.pyx":811
 *     cdef cf.SInt64 byte_offset = 0
 *     cdef at.AudioFileStreamSeekFlags flags
 *     flags = <at.AudioFileStreamSeekFlags>0             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamSeek(
*/
  __pyx_v_flags = ((AudioFileStreamSeekFlags)0);

  /* "coremusic/capi.pyx":813
 *     flags = <at.AudioFileStreamSeekFlags>0
 * 
 *     cdef cf.OSStatus status = at.AudioFileStreamSeek(             # <<<<<<<<<<<<<<
 *         stream,
 *         <cf.SInt64>packet_offset,
*/
  __pyx_v_status = AudioFileStreamSeek(__pyx_v_stream, ((SInt64)__pyx_v_packet_offset), (&__pyx_v_byte_offset), (&__pyx_v_flags));

  /* "coremusic/capi.pyx":820
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamSeek"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":821
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamSeek"))             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioFileStreamSeek); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __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_ERR(0, 821, __pyx_L1_error)

    /* "coremusic/capi.pyx":820
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamSeek"))
 * 
*/
  }

  /* "coremusic/capi.pyx":823
 *         raise RuntimeError(format_osstatus_error(status, "AudioFileStreamSeek"))
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'byte_offset': byte_offset,
 *         'flags': flags,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":824
 * 
 *     return {
 *         'byte_offset': byte_offset,             # <<<<<<<<<<<<<<
 *         'flags': flags,
 *         'is_estimated': bool(flags & at.kAudioFileStreamSeekFlag_OffsetIsEstimated)
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_int64_t(__pyx_v_byte_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_byte_offset, __pyx_t_4) < (0)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":825
 *     return {
 *         'byte_offset': byte_offset,
 *         'flags': flags,             # <<<<<<<<<<<<<<
 *         'is_estimated': bool(flags & at.kAudioFileStreamSeekFlag_OffsetIsEstimated)
 *     }
*/
  __pyx_t_4 = __Pyx_PyLong_From_AudioFileStreamSeekFlags(__pyx_v_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":826
 *         'byte_offset': byte_offset,
 *         'flags': flags,
 *         'is_estimated': bool(flags & at.kAudioFileStreamSeekFlag_OffsetIsEstimated)             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!((__pyx_v_flags & kAudioFileStreamSeekFlag_OffsetIsEstimated) != 0)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_estimated, __pyx_t_4) < (0)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":806
 * 
 * 
 * def audio_file_stream_seek(long stream_id, long packet_offset):             # <<<<<<<<<<<<<<
 *     """Seek to a packet offset in the AudioFileStream"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_file_stream_seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":834
 * # ============================================================================
 * 
 * def audio_converter_new(source_format: dict, dest_format: dict) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AudioConverter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_47audio_converter_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_46audio_converter_new, "audio_converter_new(dict source_format: dict, dict dest_format: dict) -> int\n\nCreate a new AudioConverter\n\nArgs:\n    source_format: Source audio format dictionary (AudioStreamBasicDescription)\n    dest_format: Destination audio format dictionary (AudioStreamBasicDescription)\n\nReturns:\n    AudioConverter ID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_47audio_converter_new = {"audio_converter_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_47audio_converter_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_46audio_converter_new};
static PyObject *__pyx_pw_9coremusic_4capi_47audio_converter_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_source_format = 0;
  PyObject *__pyx_v_dest_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_new (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source_format,&__pyx_mstate_global->__pyx_n_u_dest_format,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 834, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_new", 0) < (0)) __PYX_ERR(0, 834, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_new", 1, 2, 2, i); __PYX_ERR(0, 834, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 834, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 834, __pyx_L3_error)
    }
    __pyx_v_source_format = ((PyObject*)values[0]);
    __pyx_v_dest_format = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_new", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 834, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format), (&PyDict_Type), 0, "source_format", 2))) __PYX_ERR(0, 834, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest_format), (&PyDict_Type), 0, "dest_format", 2))) __PYX_ERR(0, 834, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_46audio_converter_new(__pyx_self, __pyx_v_source_format, __pyx_v_dest_format);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_46audio_converter_new(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source_format, PyObject *__pyx_v_dest_format) {
  AudioStreamBasicDescription __pyx_v_src_format;
  AudioStreamBasicDescription __pyx_v_dst_format;
  AudioConverterRef __pyx_v_converter;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_new", 0);

  /* "coremusic/capi.pyx":849
 * 
 *     # Set up formats using helper
 *     dict_to_asbd(source_format, &src_format)             # <<<<<<<<<<<<<<
 *     dict_to_asbd(dest_format, &dst_format)
 * 
*/
  __pyx_f_9coremusic_4capi_dict_to_asbd(__pyx_v_source_format, (&__pyx_v_src_format));

  /* "coremusic/capi.pyx":850
 *     # Set up formats using helper
 *     dict_to_asbd(source_format, &src_format)
 *     dict_to_asbd(dest_format, &dst_format)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
*/
  __pyx_f_9coremusic_4capi_dict_to_asbd(__pyx_v_dest_format, (&__pyx_v_dst_format));

  /* "coremusic/capi.pyx":852
 *     dict_to_asbd(dest_format, &dst_format)
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterNew"))
*/
  __pyx_v_status = AudioConverterNew((&__pyx_v_src_format), (&__pyx_v_dst_format), (&__pyx_v_converter));

  /* "coremusic/capi.pyx":853
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterNew"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":854
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterNew"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>converter
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterNew); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __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_ERR(0, 854, __pyx_L1_error)

    /* "coremusic/capi.pyx":853
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterNew"))
 * 
*/
  }

  /* "coremusic/capi.pyx":856
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterNew"))
 * 
 *     return <long>converter             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_converter)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 856, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":834
 * # ============================================================================
 * 
 * def audio_converter_new(source_format: dict, dest_format: dict) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AudioConverter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":859
 * 
 * 
 * def audio_converter_dispose(long converter_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_49audio_converter_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_48audio_converter_dispose, "audio_converter_dispose(long converter_id)\n\nDispose of an AudioConverter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_49audio_converter_dispose = {"audio_converter_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_49audio_converter_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_48audio_converter_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_49audio_converter_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 859, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 859, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_dispose", 0) < (0)) __PYX_ERR(0, 859, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_dispose", 1, 1, 1, i); __PYX_ERR(0, 859, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 859, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 859, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 859, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_48audio_converter_dispose(__pyx_self, __pyx_v_converter_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_48audio_converter_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id) {
  AudioConverterRef __pyx_v_converter;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_dispose", 0);

  /* "coremusic/capi.pyx":861
 * def audio_converter_dispose(long converter_id):
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":862
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterDispose"))
*/
  __pyx_v_status = AudioConverterDispose(__pyx_v_converter);

  /* "coremusic/capi.pyx":863
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":864
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterDispose"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __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_ERR(0, 864, __pyx_L1_error)

    /* "coremusic/capi.pyx":863
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":859
 * 
 * 
 * def audio_converter_dispose(long converter_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":867
 * 
 * 
 * def audio_converter_convert_buffer(long converter_id, bytes input_data) -> bytes:             # <<<<<<<<<<<<<<
 *     """Convert audio data using AudioConverter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_51audio_converter_convert_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_50audio_converter_convert_buffer, "audio_converter_convert_buffer(long converter_id, bytes input_data) -> bytes\n\nConvert audio data using AudioConverter\n\nArgs:\n    converter_id: AudioConverter ID\n    input_data: Input audio data bytes\n\nReturns:\n    Converted audio data bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_51audio_converter_convert_buffer = {"audio_converter_convert_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_51audio_converter_convert_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_50audio_converter_convert_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_51audio_converter_convert_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  PyObject *__pyx_v_input_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_convert_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_input_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 867, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 867, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 867, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_convert_buffer", 0) < (0)) __PYX_ERR(0, 867, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_convert_buffer", 1, 2, 2, i); __PYX_ERR(0, 867, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 867, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 867, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 867, __pyx_L3_error)
    __pyx_v_input_data = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_convert_buffer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 867, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_convert_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_data), (&PyBytes_Type), 1, "input_data", 1))) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_50audio_converter_convert_buffer(__pyx_self, __pyx_v_converter_id, __pyx_v_input_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_50audio_converter_convert_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, PyObject *__pyx_v_input_data) {
  AudioConverterRef __pyx_v_converter;
  UInt32 __pyx_v_input_data_size;
  UInt32 __pyx_v_output_data_size;
  char *__pyx_v_input_buffer;
  char *__pyx_v_output_buffer;
  OSStatus __pyx_v_status;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_convert_buffer", 0);

  /* "coremusic/capi.pyx":877
 *         Converted audio data bytes
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 input_data_size = len(input_data)
 *     cdef cf.UInt32 output_data_size = input_data_size * 4  # Allocate extra space
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":878
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 input_data_size = len(input_data)             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 output_data_size = input_data_size * 4  # Allocate extra space
 *     cdef char* input_buffer = <char*><bytes>input_data
*/
  if (unlikely(__pyx_v_input_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 878, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_input_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 878, __pyx_L1_error)
  __pyx_v_input_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":879
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 input_data_size = len(input_data)
 *     cdef cf.UInt32 output_data_size = input_data_size * 4  # Allocate extra space             # <<<<<<<<<<<<<<
 *     cdef char* input_buffer = <char*><bytes>input_data
 *     cdef char* output_buffer = <char*>malloc(output_data_size)
*/
  __pyx_v_output_data_size = (__pyx_v_input_data_size * 4);

  /* "coremusic/capi.pyx":880
 *     cdef cf.UInt32 input_data_size = len(input_data)
 *     cdef cf.UInt32 output_data_size = input_data_size * 4  # Allocate extra space
 *     cdef char* input_buffer = <char*><bytes>input_data             # <<<<<<<<<<<<<<
 *     cdef char* output_buffer = <char*>malloc(output_data_size)
 *     cdef cf.OSStatus status
*/
  if (unlikely(__pyx_v_input_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 880, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_input_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L1_error)
  __pyx_v_input_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":881
 *     cdef cf.UInt32 output_data_size = input_data_size * 4  # Allocate extra space
 *     cdef char* input_buffer = <char*><bytes>input_data
 *     cdef char* output_buffer = <char*>malloc(output_data_size)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_output_buffer = ((char *)malloc(__pyx_v_output_data_size));

  /* "coremusic/capi.pyx":884
 *     cdef cf.OSStatus status
 * 
 *     if output_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate output buffer")
 * 
*/
  __pyx_t_3 = (__pyx_v_output_buffer == ((char *)0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":885
 * 
 *     if output_buffer == <char*>0:
 *         raise MemoryError("Failed to allocate output buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_output_buffer};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __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_ERR(0, 885, __pyx_L1_error)

    /* "coremusic/capi.pyx":884
 *     cdef cf.OSStatus status
 * 
 *     if output_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate output buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":887
 *         raise MemoryError("Failed to allocate output buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioConverterConvertBuffer(
 *             converter,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":888
 * 
 *     try:
 *         status = at.AudioConverterConvertBuffer(             # <<<<<<<<<<<<<<
 *             converter,
 *             input_data_size,
*/
    __pyx_v_status = AudioConverterConvertBuffer(__pyx_v_converter, __pyx_v_input_data_size, __pyx_v_input_buffer, (&__pyx_v_output_data_size), __pyx_v_output_buffer);

    /* "coremusic/capi.pyx":896
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":897
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))             # <<<<<<<<<<<<<<
 * 
 *         result = output_buffer[:output_data_size]
*/
      __pyx_t_5 = NULL;
      __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterConvertBuffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 897, __pyx_L5_error)

      /* "coremusic/capi.pyx":896
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
*/
    }

    /* "coremusic/capi.pyx":899
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
 *         result = output_buffer[:output_data_size]             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_output_buffer + 0, __pyx_v_output_data_size - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_result = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":900
 * 
 *         result = output_buffer[:output_data_size]
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         free(output_buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":902
 *         return result
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 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;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        free(__pyx_v_output_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_output_buffer);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":867
 * 
 * 
 * def audio_converter_convert_buffer(long converter_id, bytes input_data) -> bytes:             # <<<<<<<<<<<<<<
 *     """Convert audio data using AudioConverter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_convert_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":905
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_convert_buffer_into(long converter_id,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_53audio_converter_convert_buffer_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_52audio_converter_convert_buffer_into, "audio_converter_convert_buffer_into(long converter_id, const unsigned char[::1] input_data, unsigned char[::1] output_buffer)\n\nConvert audio data directly into a provided output buffer (zero-copy).\n\nThis is a high-performance variant of audio_converter_convert_buffer() that:\n1. Accepts memoryview/buffer input (bytes, bytearray, numpy array)\n2. Writes directly to a caller-provided output buffer\n3. Avoids all memory allocation and copying\n\nArgs:\n    converter_id: AudioConverter ID from audio_converter_new()\n    input_data: Input audio data as contiguous buffer (bytes, bytearray, or numpy array)\n    output_buffer: Pre-allocated output buffer (bytearray or numpy array).\n                  Must be large enough for converted output (typically 4x input for upsampling)\n\nReturns:\n    Number of bytes written to output_buffer\n\nRaises:\n    RuntimeError: If conversion fails or output buffer is too small\n\nExample:\n    >>> # Create converter (e.g., 44.1kHz -> 48kHz)\n    >>> converter = audio_converter_new(source_format, dest_format)\n    >>> # Pre-allocate output buffer (4x input size for safety)\n    >>> input_data = bytearray(audio_bytes)\n    >>> output_buffer = bytearray(len(input_data) * 4)\n    >>> bytes_written = audio_converter_convert_buffer_into(\n    ...     converter, input_data, output_buffer)\n    >>> # Converted data is in output_buffer[:bytes_written]");
static PyMethodDef __pyx_mdef_9coremusic_4capi_53audio_converter_convert_buffer_into = {"audio_converter_convert_buffer_into", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_53audio_converter_convert_buffer_into, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_52audio_converter_convert_buffer_into};
static PyObject *__pyx_pw_9coremusic_4capi_53audio_converter_convert_buffer_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  __Pyx_memviewslice __pyx_v_input_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_output_buffer = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_convert_buffer_into (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_input_data,&__pyx_mstate_global->__pyx_n_u_output_buffer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 905, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 905, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 905, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 905, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_convert_buffer_into", 0) < (0)) __PYX_ERR(0, 905, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_convert_buffer_into", 1, 3, 3, i); __PYX_ERR(0, 905, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 905, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 905, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 905, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
    __pyx_v_input_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(values[1], 0); if (unlikely(!__pyx_v_input_data.memview)) __PYX_ERR(0, 908, __pyx_L3_error)
    __pyx_v_output_buffer = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_output_buffer.memview)) __PYX_ERR(0, 909, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_convert_buffer_into", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 905, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_convert_buffer_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_input_data.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "input_data"); __PYX_ERR(0, 908, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_output_buffer.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "output_buffer"); __PYX_ERR(0, 909, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9coremusic_4capi_52audio_converter_convert_buffer_into(__pyx_self, __pyx_v_converter_id, __pyx_v_input_data, __pyx_v_output_buffer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_52audio_converter_convert_buffer_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer) {
  AudioConverterRef __pyx_v_converter;
  UInt32 __pyx_v_input_data_size;
  UInt32 __pyx_v_output_data_size;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_convert_buffer_into", 0);

  /* "coremusic/capi.pyx":939
 *         >>> # Converted data is in output_buffer[:bytes_written]
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 input_data_size = <cf.UInt32>input_data.shape[0]
 *     cdef cf.UInt32 output_data_size = <cf.UInt32>output_buffer.shape[0]
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":940
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 input_data_size = <cf.UInt32>input_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 output_data_size = <cf.UInt32>output_buffer.shape[0]
 *     cdef cf.OSStatus status
*/
  __pyx_v_input_data_size = ((UInt32)(__pyx_v_input_data.shape[0]));

  /* "coremusic/capi.pyx":941
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 input_data_size = <cf.UInt32>input_data.shape[0]
 *     cdef cf.UInt32 output_data_size = <cf.UInt32>output_buffer.shape[0]             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_output_data_size = ((UInt32)(__pyx_v_output_buffer.shape[0]));

  /* "coremusic/capi.pyx":947
 *         converter,
 *         input_data_size,
 *         &input_data[0],             # <<<<<<<<<<<<<<
 *         &output_data_size,
 *         &output_buffer[0]
*/
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":949
 *         &input_data[0],
 *         &output_data_size,
 *         &output_buffer[0]             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":944
 *     cdef cf.OSStatus status
 * 
 *     status = at.AudioConverterConvertBuffer(             # <<<<<<<<<<<<<<
 *         converter,
 *         input_data_size,
*/
  __pyx_v_status = AudioConverterConvertBuffer(__pyx_v_converter, __pyx_v_input_data_size, (&(*((unsigned char const  *) ( /* dim=0 */ ((char *) (((unsigned char const  *) __pyx_v_input_data.data) + __pyx_t_1)) )))), (&__pyx_v_output_data_size), (&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_output_buffer.data) + __pyx_t_2)) )))));

  /* "coremusic/capi.pyx":952
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":953
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))             # <<<<<<<<<<<<<<
 * 
 *     return output_data_size
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterConvertBuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __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_ERR(0, 953, __pyx_L1_error)

    /* "coremusic/capi.pyx":952
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
*/
  }

  /* "coremusic/capi.pyx":955
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterConvertBuffer"))
 * 
 *     return output_data_size             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_output_data_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":905
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_convert_buffer_into(long converter_id,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_convert_buffer_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":958
 * 
 * 
 * def audio_converter_get_property(long converter_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioConverter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_55audio_converter_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_54audio_converter_get_property, "audio_converter_get_property(long converter_id, int property_id) -> bytes\n\nGet a property from an AudioConverter\n\nArgs:\n    converter_id: AudioConverter ID\n    property_id: Property ID\n\nReturns:\n    Property data as bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_55audio_converter_get_property = {"audio_converter_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_55audio_converter_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_54audio_converter_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_55audio_converter_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  int __pyx_v_property_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_property_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 958, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 958, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 958, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_get_property", 0) < (0)) __PYX_ERR(0, 958, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_get_property", 1, 2, 2, i); __PYX_ERR(0, 958, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 958, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 958, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_get_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 958, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_54audio_converter_get_property(__pyx_self, __pyx_v_converter_id, __pyx_v_property_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_54audio_converter_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, int __pyx_v_property_id) {
  AudioConverterRef __pyx_v_converter;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("audio_converter_get_property", 0);

  /* "coremusic/capi.pyx":968
 *         Property data as bytes
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":969
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":973
 * 
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))
*/
  __pyx_v_status = AudioConverterGetPropertyInfo(__pyx_v_converter, __pyx_v_property_id, (&__pyx_v_data_size), NULL);

  /* "coremusic/capi.pyx":974
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":975
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))             # <<<<<<<<<<<<<<
 * 
 *     if data_size == 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterGetPropertyInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __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_ERR(0, 975, __pyx_L1_error)

    /* "coremusic/capi.pyx":974
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":977
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_data_size == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":978
 * 
 *     if data_size == 0:
 *         return b''             # <<<<<<<<<<<<<<
 * 
 *     cdef char* buffer = <char*>malloc(data_size)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b__7;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":977
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterGetPropertyInfo"))
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":980
 *         return b''
 * 
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":981
 * 
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  __pyx_t_1 = (__pyx_v_buffer == ((char *)0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":982
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __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_ERR(0, 982, __pyx_L1_error)

    /* "coremusic/capi.pyx":981
 * 
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":984
 *         raise MemoryError("Failed to allocate buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":985
 * 
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterGetProperty"))
*/
    __pyx_v_status = AudioConverterGetProperty(__pyx_v_converter, __pyx_v_property_id, (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":986
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterGetProperty"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":987
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         result = buffer[:data_size]
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterGetProperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 987, __pyx_L7_error)

      /* "coremusic/capi.pyx":986
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":989
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterGetProperty"))
 * 
 *         result = buffer[:data_size]             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_data_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":990
 * 
 *         result = buffer[:data_size]
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         free(buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L6_return;
  }

  /* "coremusic/capi.pyx":992
 *         return result
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":958
 * 
 * 
 * def audio_converter_get_property(long converter_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioConverter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":995
 * 
 * 
 * def audio_converter_set_property(long converter_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an AudioConverter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_57audio_converter_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_56audio_converter_set_property, "audio_converter_set_property(long converter_id, int property_id, bytes data)\n\nSet a property on an AudioConverter\n\nArgs:\n    converter_id: AudioConverter ID\n    property_id: Property ID\n    data: Property data as bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_57audio_converter_set_property = {"audio_converter_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_57audio_converter_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_56audio_converter_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_57audio_converter_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  int __pyx_v_property_id;
  PyObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_set_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 995, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 995, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 995, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 995, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_set_property", 0) < (0)) __PYX_ERR(0, 995, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_set_property", 1, 3, 3, i); __PYX_ERR(0, 995, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 995, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 995, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 995, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_set_property", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 995, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 995, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_56audio_converter_set_property(__pyx_self, __pyx_v_converter_id, __pyx_v_property_id, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_56audio_converter_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, int __pyx_v_property_id, PyObject *__pyx_v_data) {
  AudioConverterRef __pyx_v_converter;
  UInt32 __pyx_v_data_size;
  char *__pyx_v_buffer;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_set_property", 0);

  /* "coremusic/capi.pyx":1003
 *         data: Property data as bytes
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = len(data)
 *     cdef char* buffer = <char*><bytes>data
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":1004
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 data_size = len(data)             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*><bytes>data
 * 
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1004, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1004, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":1005
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.UInt32 data_size = len(data)
 *     cdef char* buffer = <char*><bytes>data             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1005, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":1007
 *     cdef char* buffer = <char*><bytes>data
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterSetProperty"))
*/
  __pyx_v_status = AudioConverterSetProperty(__pyx_v_converter, __pyx_v_property_id, __pyx_v_data_size, __pyx_v_buffer);

  /* "coremusic/capi.pyx":1008
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterSetProperty"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1009
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterSetProperty"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterSetProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1009, __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_ERR(0, 1009, __pyx_L1_error)

    /* "coremusic/capi.pyx":1008
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterSetProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":995
 * 
 * 
 * def audio_converter_set_property(long converter_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an AudioConverter
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1012
 * 
 * 
 * def audio_converter_reset(long converter_id):             # <<<<<<<<<<<<<<
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_59audio_converter_reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_58audio_converter_reset, "audio_converter_reset(long converter_id)\n\nReset an AudioConverter to its initial state");
static PyMethodDef __pyx_mdef_9coremusic_4capi_59audio_converter_reset = {"audio_converter_reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_59audio_converter_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_58audio_converter_reset};
static PyObject *__pyx_pw_9coremusic_4capi_59audio_converter_reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1012, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1012, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_reset", 0) < (0)) __PYX_ERR(0, 1012, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_reset", 1, 1, 1, i); __PYX_ERR(0, 1012, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1012, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1012, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_58audio_converter_reset(__pyx_self, __pyx_v_converter_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_58audio_converter_reset(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id) {
  AudioConverterRef __pyx_v_converter;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_reset", 0);

  /* "coremusic/capi.pyx":1014
 * def audio_converter_reset(long converter_id):
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":1015
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterReset"))
*/
  __pyx_v_status = AudioConverterReset(__pyx_v_converter);

  /* "coremusic/capi.pyx":1016
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterReset"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1017
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterReset"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterReset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __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_ERR(0, 1017, __pyx_L1_error)

    /* "coremusic/capi.pyx":1016
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioConverterReset"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1012
 * 
 * 
 * def audio_converter_reset(long converter_id):             # <<<<<<<<<<<<<<
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1033
 * 
 * 
 * cdef at.OSStatus audio_converter_input_callback(             # <<<<<<<<<<<<<<
 *     at.AudioConverterRef converter,
 *     cf.UInt32* num_packets,
*/

static OSStatus __pyx_f_9coremusic_4capi_audio_converter_input_callback(CYTHON_UNUSED AudioConverterRef __pyx_v_converter, UInt32 *__pyx_v_num_packets, AudioBufferList *__pyx_v_buffer_list, CYTHON_UNUSED AudioStreamPacketDescription **__pyx_v_packet_descriptions, void *__pyx_v_user_data) {
  struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData *__pyx_v_data;
  UInt32 __pyx_v_requested_packets;
  UInt32 __pyx_v_available_packets;
  UInt32 __pyx_v_packets_to_provide;
  UInt32 __pyx_v_bytes_to_copy;
  char *__pyx_v_source_ptr;
  char *__pyx_v_dest_ptr;
  UInt32 __pyx_v_offset;
  OSStatus __pyx_r;
  int __pyx_t_1;
  UInt32 __pyx_t_2;

  /* "coremusic/capi.pyx":1058
 *     cdef cf.UInt32 offset
 * 
 *     if user_data == NULL:             # <<<<<<<<<<<<<<
 *         return -50  # paramErr
 * 
*/
  __pyx_t_1 = (__pyx_v_user_data == NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1059
 * 
 *     if user_data == NULL:
 *         return -50  # paramErr             # <<<<<<<<<<<<<<
 * 
 *     data = <AudioConverterCallbackData*>user_data
*/
    __pyx_r = -50;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":1058
 *     cdef cf.UInt32 offset
 * 
 *     if user_data == NULL:             # <<<<<<<<<<<<<<
 *         return -50  # paramErr
 * 
*/
  }

  /* "coremusic/capi.pyx":1061
 *         return -50  # paramErr
 * 
 *     data = <AudioConverterCallbackData*>user_data             # <<<<<<<<<<<<<<
 *     requested_packets = num_packets[0]
 * 
*/
  __pyx_v_data = ((struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData *)__pyx_v_user_data);

  /* "coremusic/capi.pyx":1062
 * 
 *     data = <AudioConverterCallbackData*>user_data
 *     requested_packets = num_packets[0]             # <<<<<<<<<<<<<<
 * 
 *     # Calculate how many packets we can provide
*/
  __pyx_v_requested_packets = (__pyx_v_num_packets[0]);

  /* "coremusic/capi.pyx":1065
 * 
 *     # Calculate how many packets we can provide
 *     available_packets = data.total_packets - data.packets_read             # <<<<<<<<<<<<<<
 *     if available_packets == 0:
 *         num_packets[0] = 0
*/
  __pyx_v_available_packets = (__pyx_v_data->total_packets - __pyx_v_data->packets_read);

  /* "coremusic/capi.pyx":1066
 *     # Calculate how many packets we can provide
 *     available_packets = data.total_packets - data.packets_read
 *     if available_packets == 0:             # <<<<<<<<<<<<<<
 *         num_packets[0] = 0
 *         return 0  # End of data
*/
  __pyx_t_1 = (__pyx_v_available_packets == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1067
 *     available_packets = data.total_packets - data.packets_read
 *     if available_packets == 0:
 *         num_packets[0] = 0             # <<<<<<<<<<<<<<
 *         return 0  # End of data
 * 
*/
    (__pyx_v_num_packets[0]) = 0;

    /* "coremusic/capi.pyx":1068
 *     if available_packets == 0:
 *         num_packets[0] = 0
 *         return 0  # End of data             # <<<<<<<<<<<<<<
 * 
 *     packets_to_provide = requested_packets if requested_packets < available_packets else available_packets
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":1066
 *     # Calculate how many packets we can provide
 *     available_packets = data.total_packets - data.packets_read
 *     if available_packets == 0:             # <<<<<<<<<<<<<<
 *         num_packets[0] = 0
 *         return 0  # End of data
*/
  }

  /* "coremusic/capi.pyx":1070
 *         return 0  # End of data
 * 
 *     packets_to_provide = requested_packets if requested_packets < available_packets else available_packets             # <<<<<<<<<<<<<<
 *     bytes_to_copy = packets_to_provide * data.packet_size
 * 
*/
  __pyx_t_1 = (__pyx_v_requested_packets < __pyx_v_available_packets);
  if (__pyx_t_1) {
    __pyx_t_2 = __pyx_v_requested_packets;
  } else {
    __pyx_t_2 = __pyx_v_available_packets;
  }
  __pyx_v_packets_to_provide = __pyx_t_2;

  /* "coremusic/capi.pyx":1071
 * 
 *     packets_to_provide = requested_packets if requested_packets < available_packets else available_packets
 *     bytes_to_copy = packets_to_provide * data.packet_size             # <<<<<<<<<<<<<<
 * 
 *     # Calculate offset into input buffer
*/
  __pyx_v_bytes_to_copy = (__pyx_v_packets_to_provide * __pyx_v_data->packet_size);

  /* "coremusic/capi.pyx":1074
 * 
 *     # Calculate offset into input buffer
 *     offset = data.packets_read * data.packet_size             # <<<<<<<<<<<<<<
 * 
 *     # Get pointer to input data
*/
  __pyx_v_offset = (__pyx_v_data->packets_read * __pyx_v_data->packet_size);

  /* "coremusic/capi.pyx":1077
 * 
 *     # Get pointer to input data
 *     source_ptr = data.input_buffer + offset             # <<<<<<<<<<<<<<
 * 
 *     # Fill AudioBufferList
*/
  __pyx_v_source_ptr = (__pyx_v_data->input_buffer + __pyx_v_offset);

  /* "coremusic/capi.pyx":1080
 * 
 *     # Fill AudioBufferList
 *     if buffer_list.mNumberBuffers > 0:             # <<<<<<<<<<<<<<
 *         dest_ptr = <char*>buffer_list.mBuffers[0].mData
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)
*/
  __pyx_t_1 = (__pyx_v_buffer_list->mNumberBuffers > 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1081
 *     # Fill AudioBufferList
 *     if buffer_list.mNumberBuffers > 0:
 *         dest_ptr = <char*>buffer_list.mBuffers[0].mData             # <<<<<<<<<<<<<<
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)
 *         buffer_list.mBuffers[0].mDataByteSize = bytes_to_copy
*/
    __pyx_v_dest_ptr = ((char *)(__pyx_v_buffer_list->mBuffers[0]).mData);

    /* "coremusic/capi.pyx":1082
 *     if buffer_list.mNumberBuffers > 0:
 *         dest_ptr = <char*>buffer_list.mBuffers[0].mData
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mDataByteSize = bytes_to_copy
 *         buffer_list.mBuffers[0].mNumberChannels = data.source_format.mChannelsPerFrame
*/
    (void)(memcpy(__pyx_v_dest_ptr, __pyx_v_source_ptr, __pyx_v_bytes_to_copy));

    /* "coremusic/capi.pyx":1083
 *         dest_ptr = <char*>buffer_list.mBuffers[0].mData
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)
 *         buffer_list.mBuffers[0].mDataByteSize = bytes_to_copy             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mNumberChannels = data.source_format.mChannelsPerFrame
 * 
*/
    (__pyx_v_buffer_list->mBuffers[0]).mDataByteSize = __pyx_v_bytes_to_copy;

    /* "coremusic/capi.pyx":1084
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)
 *         buffer_list.mBuffers[0].mDataByteSize = bytes_to_copy
 *         buffer_list.mBuffers[0].mNumberChannels = data.source_format.mChannelsPerFrame             # <<<<<<<<<<<<<<
 * 
 *     # Update packets read
*/
    __pyx_t_2 = __pyx_v_data->source_format.mChannelsPerFrame;
    (__pyx_v_buffer_list->mBuffers[0]).mNumberChannels = __pyx_t_2;

    /* "coremusic/capi.pyx":1080
 * 
 *     # Fill AudioBufferList
 *     if buffer_list.mNumberBuffers > 0:             # <<<<<<<<<<<<<<
 *         dest_ptr = <char*>buffer_list.mBuffers[0].mData
 *         memcpy(dest_ptr, source_ptr, bytes_to_copy)
*/
  }

  /* "coremusic/capi.pyx":1087
 * 
 *     # Update packets read
 *     data.packets_read += packets_to_provide             # <<<<<<<<<<<<<<
 *     num_packets[0] = packets_to_provide
 * 
*/
  __pyx_v_data->packets_read = (__pyx_v_data->packets_read + __pyx_v_packets_to_provide);

  /* "coremusic/capi.pyx":1088
 *     # Update packets read
 *     data.packets_read += packets_to_provide
 *     num_packets[0] = packets_to_provide             # <<<<<<<<<<<<<<
 * 
 *     return 0  # noErr
*/
  (__pyx_v_num_packets[0]) = __pyx_v_packets_to_provide;

  /* "coremusic/capi.pyx":1090
 *     num_packets[0] = packets_to_provide
 * 
 *     return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1033
 * 
 * 
 * cdef at.OSStatus audio_converter_input_callback(             # <<<<<<<<<<<<<<
 *     at.AudioConverterRef converter,
 *     cf.UInt32* num_packets,
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":1093
 * 
 * 
 * def audio_converter_fill_complex_buffer(             # <<<<<<<<<<<<<<
 *     long converter_id,
 *     bytes input_data,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_61audio_converter_fill_complex_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_60audio_converter_fill_complex_buffer, "audio_converter_fill_complex_buffer(long converter_id, bytes input_data, int input_packet_count, int output_packet_count, dict source_format_dict) -> tuple\n\nConvert audio using callback-based API for complex conversions\n\nThis method supports all types of conversions including:\n- Sample rate changes (e.g., 44.1kHz -> 48kHz)\n- Bit depth changes (e.g., 16-bit -> 24-bit)\n- Channel count changes (stereo <-> mono)\n- Codec conversions (e.g., MP3 -> PCM)\n\nArgs:\n    converter_id: AudioConverter ID\n    input_data: Input audio data as bytes\n    input_packet_count: Number of packets in input data\n    output_packet_count: Number of output packets to produce\n    source_format_dict: Source AudioStreamBasicDescription as dict\n\nReturns:\n    (output_data, actual_packet_count) tuple\n\nRaises:\n    RuntimeError: If conversion fails\n    MemoryError: If buffer allocation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_61audio_converter_fill_complex_buffer = {"audio_converter_fill_complex_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_61audio_converter_fill_complex_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_60audio_converter_fill_complex_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_61audio_converter_fill_complex_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  PyObject *__pyx_v_input_data = 0;
  int __pyx_v_input_packet_count;
  int __pyx_v_output_packet_count;
  PyObject *__pyx_v_source_format_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_fill_complex_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_input_data,&__pyx_mstate_global->__pyx_n_u_input_packet_count,&__pyx_mstate_global->__pyx_n_u_output_packet_count,&__pyx_mstate_global->__pyx_n_u_source_format_dict,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1093, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1093, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1093, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1093, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1093, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1093, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_fill_complex_buffer", 0) < (0)) __PYX_ERR(0, 1093, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_fill_complex_buffer", 1, 5, 5, i); __PYX_ERR(0, 1093, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1093, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1093, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1093, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1093, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1093, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1094, __pyx_L3_error)
    __pyx_v_input_data = ((PyObject*)values[1]);
    __pyx_v_input_packet_count = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_input_packet_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L3_error)
    __pyx_v_output_packet_count = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_output_packet_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L3_error)
    __pyx_v_source_format_dict = ((PyObject*)values[4]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_fill_complex_buffer", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1093, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_converter_fill_complex_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_data), (&PyBytes_Type), 1, "input_data", 1))) __PYX_ERR(0, 1095, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format_dict), (&PyDict_Type), 1, "source_format_dict", 1))) __PYX_ERR(0, 1098, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_60audio_converter_fill_complex_buffer(__pyx_self, __pyx_v_converter_id, __pyx_v_input_data, __pyx_v_input_packet_count, __pyx_v_output_packet_count, __pyx_v_source_format_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_60audio_converter_fill_complex_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, PyObject *__pyx_v_input_data, int __pyx_v_input_packet_count, int __pyx_v_output_packet_count, PyObject *__pyx_v_source_format_dict) {
  AudioConverterRef __pyx_v_converter;
  struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData __pyx_v_callback_data;
  AudioBufferList *__pyx_v_output_buffer_list;
  UInt32 __pyx_v_output_data_packet_size;
  OSStatus __pyx_v_status;
  char *__pyx_v_output_buffer;
  UInt32 __pyx_v_output_buffer_size;
  PyObject *__pyx_v_result = 0;
  char *__pyx_v_input_ptr;
  UInt32 __pyx_v_actual_bytes;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  UInt32 __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_fill_complex_buffer", 0);

  /* "coremusic/capi.pyx":1122
 *         MemoryError: If buffer allocation fails
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef AudioConverterCallbackData callback_data
 *     cdef at.AudioBufferList* output_buffer_list
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":1125
 *     cdef AudioConverterCallbackData callback_data
 *     cdef at.AudioBufferList* output_buffer_list
 *     cdef cf.UInt32 output_data_packet_size = output_packet_count             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef char* output_buffer
*/
  __pyx_v_output_data_packet_size = __pyx_v_output_packet_count;

  /* "coremusic/capi.pyx":1133
 * 
 *     # Get pointer to input data (Python bytes object)
 *     input_ptr = <char*><bytes>input_data             # <<<<<<<<<<<<<<
 * 
 *     # Initialize callback data
*/
  if (unlikely(__pyx_v_input_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1133, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_input_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1133, __pyx_L1_error)
  __pyx_v_input_ptr = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":1136
 * 
 *     # Initialize callback data
 *     callback_data.input_buffer = input_ptr             # <<<<<<<<<<<<<<
 *     callback_data.input_buffer_size = len(input_data)
 *     callback_data.packets_read = 0
*/
  __pyx_v_callback_data.input_buffer = __pyx_v_input_ptr;

  /* "coremusic/capi.pyx":1137
 *     # Initialize callback data
 *     callback_data.input_buffer = input_ptr
 *     callback_data.input_buffer_size = len(input_data)             # <<<<<<<<<<<<<<
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count
*/
  if (unlikely(__pyx_v_input_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1137, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_input_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1137, __pyx_L1_error)
  __pyx_v_callback_data.input_buffer_size = __pyx_t_2;

  /* "coremusic/capi.pyx":1138
 *     callback_data.input_buffer = input_ptr
 *     callback_data.input_buffer_size = len(input_data)
 *     callback_data.packets_read = 0             # <<<<<<<<<<<<<<
 *     callback_data.total_packets = input_packet_count
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']
*/
  __pyx_v_callback_data.packets_read = 0;

  /* "coremusic/capi.pyx":1139
 *     callback_data.input_buffer_size = len(input_data)
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count             # <<<<<<<<<<<<<<
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']
 * 
*/
  __pyx_v_callback_data.total_packets = __pyx_v_input_packet_count;

  /* "coremusic/capi.pyx":1140
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']             # <<<<<<<<<<<<<<
 * 
 *     # Fill source format structure using helper
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1140, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_bytes_per_packet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.packet_size = __pyx_t_4;

  /* "coremusic/capi.pyx":1143
 * 
 *     # Fill source format structure using helper
 *     dict_to_asbd(source_format_dict, &callback_data.source_format)             # <<<<<<<<<<<<<<
 * 
 *     # Allocate output buffer (estimate size generously)
*/
  __pyx_f_9coremusic_4capi_dict_to_asbd(__pyx_v_source_format_dict, (&__pyx_v_callback_data.source_format));

  /* "coremusic/capi.pyx":1147
 *     # Allocate output buffer (estimate size generously)
 *     # For sample rate conversion, output size = input_size * (output_rate / input_rate)
 *     output_buffer_size = len(input_data) * 4  # 4x for safety             # <<<<<<<<<<<<<<
 *     output_buffer = <char*>malloc(output_buffer_size)
 *     if output_buffer == NULL:
*/
  if (unlikely(__pyx_v_input_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1147, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_input_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1147, __pyx_L1_error)
  __pyx_v_output_buffer_size = (__pyx_t_2 * 4);

  /* "coremusic/capi.pyx":1148
 *     # For sample rate conversion, output size = input_size * (output_rate / input_rate)
 *     output_buffer_size = len(input_data) * 4  # 4x for safety
 *     output_buffer = <char*>malloc(output_buffer_size)             # <<<<<<<<<<<<<<
 *     if output_buffer == NULL:
 *         raise MemoryError("Failed to allocate output buffer")
*/
  __pyx_v_output_buffer = ((char *)malloc(__pyx_v_output_buffer_size));

  /* "coremusic/capi.pyx":1149
 *     output_buffer_size = len(input_data) * 4  # 4x for safety
 *     output_buffer = <char*>malloc(output_buffer_size)
 *     if output_buffer == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate output buffer")
 * 
*/
  __pyx_t_5 = (__pyx_v_output_buffer == NULL);
  if (unlikely(__pyx_t_5)) {

    /* "coremusic/capi.pyx":1150
 *     output_buffer = <char*>malloc(output_buffer_size)
 *     if output_buffer == NULL:
 *         raise MemoryError("Failed to allocate output buffer")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate and initialize AudioBufferList
*/
    __pyx_t_6 = NULL;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_output_buffer};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __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_ERR(0, 1150, __pyx_L1_error)

    /* "coremusic/capi.pyx":1149
 *     output_buffer_size = len(input_data) * 4  # 4x for safety
 *     output_buffer = <char*>malloc(output_buffer_size)
 *     if output_buffer == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate output buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":1153
 * 
 *     # Allocate and initialize AudioBufferList
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))             # <<<<<<<<<<<<<<
 *     if output_buffer_list == NULL:
 *         free(output_buffer)
*/
  __pyx_v_output_buffer_list = ((AudioBufferList *)malloc(((sizeof(AudioBufferList)) + (sizeof(AudioBuffer)))));

  /* "coremusic/capi.pyx":1154
 *     # Allocate and initialize AudioBufferList
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         free(output_buffer)
 *         raise MemoryError("Failed to allocate AudioBufferList")
*/
  __pyx_t_5 = (__pyx_v_output_buffer_list == NULL);
  if (unlikely(__pyx_t_5)) {

    /* "coremusic/capi.pyx":1155
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate AudioBufferList")
 * 
*/
    free(__pyx_v_output_buffer);

    /* "coremusic/capi.pyx":1156
 *     if output_buffer_list == NULL:
 *         free(output_buffer)
 *         raise MemoryError("Failed to allocate AudioBufferList")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_6 = NULL;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_AudioBufferLi};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __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_ERR(0, 1156, __pyx_L1_error)

    /* "coremusic/capi.pyx":1154
 *     # Allocate and initialize AudioBufferList
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         free(output_buffer)
 *         raise MemoryError("Failed to allocate AudioBufferList")
*/
  }

  /* "coremusic/capi.pyx":1158
 *         raise MemoryError("Failed to allocate AudioBufferList")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         output_buffer_list.mNumberBuffers = 1
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1159
 * 
 *     try:
 *         output_buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = output_buffer_size
*/
    __pyx_v_output_buffer_list->mNumberBuffers = 1;

    /* "coremusic/capi.pyx":1160
 *     try:
 *         output_buffer_list.mNumberBuffers = 1
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mDataByteSize = output_buffer_size
 *         output_buffer_list.mBuffers[0].mData = output_buffer
*/
    __pyx_t_4 = __pyx_v_callback_data.source_format.mChannelsPerFrame;
    (__pyx_v_output_buffer_list->mBuffers[0]).mNumberChannels = __pyx_t_4;

    /* "coremusic/capi.pyx":1161
 *         output_buffer_list.mNumberBuffers = 1
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = output_buffer_size             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mData = output_buffer
 * 
*/
    (__pyx_v_output_buffer_list->mBuffers[0]).mDataByteSize = __pyx_v_output_buffer_size;

    /* "coremusic/capi.pyx":1162
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = output_buffer_size
 *         output_buffer_list.mBuffers[0].mData = output_buffer             # <<<<<<<<<<<<<<
 * 
 *         # Call AudioConverterFillComplexBuffer
*/
    (__pyx_v_output_buffer_list->mBuffers[0]).mData = __pyx_v_output_buffer;

    /* "coremusic/capi.pyx":1165
 * 
 *         # Call AudioConverterFillComplexBuffer
 *         status = at.AudioConverterFillComplexBuffer(             # <<<<<<<<<<<<<<
 *             converter,
 *             audio_converter_input_callback,  # Our callback function
*/
    __pyx_v_status = AudioConverterFillComplexBuffer(__pyx_v_converter, __pyx_f_9coremusic_4capi_audio_converter_input_callback, (&__pyx_v_callback_data), (&__pyx_v_output_data_packet_size), __pyx_v_output_buffer_list, NULL);

    /* "coremusic/capi.pyx":1174
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))
 * 
*/
    __pyx_t_5 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_5)) {

      /* "coremusic/capi.pyx":1175
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))             # <<<<<<<<<<<<<<
 * 
 *         # Extract result
*/
      __pyx_t_6 = NULL;
      __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterFillComplexBuffer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1175, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1175, __pyx_L6_error)

      /* "coremusic/capi.pyx":1174
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))
 * 
*/
    }

    /* "coremusic/capi.pyx":1178
 * 
 *         # Extract result
 *         actual_bytes = output_buffer_list.mBuffers[0].mDataByteSize             # <<<<<<<<<<<<<<
 *         result = output_buffer[:actual_bytes]
 * 
*/
    __pyx_t_4 = (__pyx_v_output_buffer_list->mBuffers[0]).mDataByteSize;
    __pyx_v_actual_bytes = __pyx_t_4;

    /* "coremusic/capi.pyx":1179
 *         # Extract result
 *         actual_bytes = output_buffer_list.mBuffers[0].mDataByteSize
 *         result = output_buffer[:actual_bytes]             # <<<<<<<<<<<<<<
 * 
 *         return (result, output_data_packet_size)
*/
    __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_output_buffer + 0, __pyx_v_actual_bytes - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":1181
 *         result = output_buffer[:actual_bytes]
 * 
 *         return (result, output_data_packet_size)             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_output_data_packet_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1181, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 1181, __pyx_L6_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1181, __pyx_L6_error);
    __pyx_t_3 = 0;
    __pyx_r = ((PyObject*)__pyx_t_8);
    __pyx_t_8 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":1184
 * 
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 *         free(output_buffer_list)
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
      {
        free(__pyx_v_output_buffer);

        /* "coremusic/capi.pyx":1185
 *     finally:
 *         free(output_buffer)
 *         free(output_buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        free(__pyx_v_output_buffer_list);
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":1184
 * 
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 *         free(output_buffer_list)
 * 
*/
      free(__pyx_v_output_buffer);

      /* "coremusic/capi.pyx":1185
 *     finally:
 *         free(output_buffer)
 *         free(output_buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      free(__pyx_v_output_buffer_list);
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1093
 * 
 * 
 * def audio_converter_fill_complex_buffer(             # <<<<<<<<<<<<<<
 *     long converter_id,
 *     bytes input_data,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_fill_complex_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1188
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_fill_complex_buffer_into(
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_63audio_converter_fill_complex_buffer_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_62audio_converter_fill_complex_buffer_into, "audio_converter_fill_complex_buffer_into(long converter_id, const unsigned char[::1] input_data, unsigned char[::1] output_buffer, int input_packet_count, int output_packet_count, dict source_format_dict) -> tuple\n\nConvert audio using callback-based API directly into provided buffers (zero-copy).\n\nThis is a high-performance variant of audio_converter_fill_complex_buffer() that:\n1. Accepts memoryview input (bytes, bytearray, numpy array)\n2. Writes converted data directly to caller-provided output buffer\n3. Avoids all memory allocation (except for internal AudioBufferList struct)\n\nSupports all types of conversions including:\n- Sample rate changes (e.g., 44.1kHz -> 48kHz)\n- Bit depth changes (e.g., 16-bit -> 24-bit)\n- Channel count changes (stereo <-> mono)\n- Codec conversions (e.g., MP3 -> PCM)\n\nArgs:\n    converter_id: AudioConverter ID from audio_converter_new()\n    input_data: Input audio data as contiguous buffer\n    output_buffer: Pre-allocated output buffer (bytearray or numpy uint8 array).\n                  Should be 4x input size for sample rate upsampling headroom\n    input_packet_count: Number of packets in input data\n    output_packet_count: Number of output packets to produce\n    source_format_dict: Source AudioStreamBasicDescription as dict\n\nReturns:\n    (bytes_written, actual_packet_count) tuple\n\nRaises:\n    RuntimeError: If conversion fails\n\nExample:\n    >>> # Sample rate conversion 44.1kHz -> 48kHz\n    >>> input_data = bytearray(audio_bytes)\n    >>> output_buffer = bytearray(len(input_data) * 4)\n    >>> bytes_written, packets = audio_converter_fill_complex_buffer_into(\n    ...     converter, input_data, output_buffer,\n    ...     input_packets, output_packets, source_format)\n    >>> # Converted data is in output_buffer[:bytes_written]");
static PyMethodDef __pyx_mdef_9coremusic_4capi_63audio_converter_fill_complex_buffer_into = {"audio_converter_fill_complex_buffer_into", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_63audio_converter_fill_complex_buffer_into, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_62audio_converter_fill_complex_buffer_into};
static PyObject *__pyx_pw_9coremusic_4capi_63audio_converter_fill_complex_buffer_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_converter_id;
  __Pyx_memviewslice __pyx_v_input_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_output_buffer = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_input_packet_count;
  int __pyx_v_output_packet_count;
  PyObject *__pyx_v_source_format_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_converter_fill_complex_buffer_into (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_converter_id,&__pyx_mstate_global->__pyx_n_u_input_data,&__pyx_mstate_global->__pyx_n_u_output_buffer,&__pyx_mstate_global->__pyx_n_u_input_packet_count,&__pyx_mstate_global->__pyx_n_u_output_packet_count,&__pyx_mstate_global->__pyx_n_u_source_format_dict,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1188, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_converter_fill_complex_buffer_into", 0) < (0)) __PYX_ERR(0, 1188, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_converter_fill_complex_buffer_into", 1, 6, 6, i); __PYX_ERR(0, 1188, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1188, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1188, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1188, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1188, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1188, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1188, __pyx_L3_error)
    }
    __pyx_v_converter_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_converter_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L3_error)
    __pyx_v_input_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(values[1], 0); if (unlikely(!__pyx_v_input_data.memview)) __PYX_ERR(0, 1192, __pyx_L3_error)
    __pyx_v_output_buffer = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_output_buffer.memview)) __PYX_ERR(0, 1193, __pyx_L3_error)
    __pyx_v_input_packet_count = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_input_packet_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
    __pyx_v_output_packet_count = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_output_packet_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L3_error)
    __pyx_v_source_format_dict = ((PyObject*)values[5]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_fill_complex_buffer_into", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 1188, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_fill_complex_buffer_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_input_data.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "input_data"); __PYX_ERR(0, 1192, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_output_buffer.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "output_buffer"); __PYX_ERR(0, 1193, __pyx_L1_error)
  }
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format_dict), (&PyDict_Type), 1, "source_format_dict", 1))) __PYX_ERR(0, 1196, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_62audio_converter_fill_complex_buffer_into(__pyx_self, __pyx_v_converter_id, __pyx_v_input_data, __pyx_v_output_buffer, __pyx_v_input_packet_count, __pyx_v_output_packet_count, __pyx_v_source_format_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_62audio_converter_fill_complex_buffer_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer, int __pyx_v_input_packet_count, int __pyx_v_output_packet_count, PyObject *__pyx_v_source_format_dict) {
  AudioConverterRef __pyx_v_converter;
  struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData __pyx_v_callback_data;
  AudioBufferList *__pyx_v_output_buffer_list;
  UInt32 __pyx_v_output_data_packet_size;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_actual_bytes;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  UInt32 __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_fill_complex_buffer_into", 0);

  /* "coremusic/capi.pyx":1235
 *         >>> # Converted data is in output_buffer[:bytes_written]
 *     """
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id             # <<<<<<<<<<<<<<
 *     cdef AudioConverterCallbackData callback_data
 *     cdef at.AudioBufferList* output_buffer_list
*/
  __pyx_v_converter = ((AudioConverterRef)__pyx_v_converter_id);

  /* "coremusic/capi.pyx":1238
 *     cdef AudioConverterCallbackData callback_data
 *     cdef at.AudioBufferList* output_buffer_list
 *     cdef cf.UInt32 output_data_packet_size = output_packet_count             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef cf.UInt32 actual_bytes
*/
  __pyx_v_output_data_packet_size = __pyx_v_output_packet_count;

  /* "coremusic/capi.pyx":1243
 * 
 *     # Initialize callback data pointing directly to input memoryview
 *     callback_data.input_buffer = <char*>&input_data[0]             # <<<<<<<<<<<<<<
 *     callback_data.input_buffer_size = <cf.UInt32>input_data.shape[0]
 *     callback_data.packets_read = 0
*/
  __pyx_t_1 = 0;
  __pyx_v_callback_data.input_buffer = ((char *)(&(*((unsigned char const  *) ( /* dim=0 */ ((char *) (((unsigned char const  *) __pyx_v_input_data.data) + __pyx_t_1)) )))));

  /* "coremusic/capi.pyx":1244
 *     # Initialize callback data pointing directly to input memoryview
 *     callback_data.input_buffer = <char*>&input_data[0]
 *     callback_data.input_buffer_size = <cf.UInt32>input_data.shape[0]             # <<<<<<<<<<<<<<
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count
*/
  __pyx_v_callback_data.input_buffer_size = ((UInt32)(__pyx_v_input_data.shape[0]));

  /* "coremusic/capi.pyx":1245
 *     callback_data.input_buffer = <char*>&input_data[0]
 *     callback_data.input_buffer_size = <cf.UInt32>input_data.shape[0]
 *     callback_data.packets_read = 0             # <<<<<<<<<<<<<<
 *     callback_data.total_packets = input_packet_count
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']
*/
  __pyx_v_callback_data.packets_read = 0;

  /* "coremusic/capi.pyx":1246
 *     callback_data.input_buffer_size = <cf.UInt32>input_data.shape[0]
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count             # <<<<<<<<<<<<<<
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']
 * 
*/
  __pyx_v_callback_data.total_packets = __pyx_v_input_packet_count;

  /* "coremusic/capi.pyx":1247
 *     callback_data.packets_read = 0
 *     callback_data.total_packets = input_packet_count
 *     callback_data.packet_size = source_format_dict['bytes_per_packet']             # <<<<<<<<<<<<<<
 * 
 *     # Fill source format structure using helper
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1247, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_bytes_per_packet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_3 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_callback_data.packet_size = __pyx_t_3;

  /* "coremusic/capi.pyx":1250
 * 
 *     # Fill source format structure using helper
 *     dict_to_asbd(source_format_dict, &callback_data.source_format)             # <<<<<<<<<<<<<<
 * 
 *     # Allocate AudioBufferList (small fixed-size struct, unavoidable)
*/
  __pyx_f_9coremusic_4capi_dict_to_asbd(__pyx_v_source_format_dict, (&__pyx_v_callback_data.source_format));

  /* "coremusic/capi.pyx":1253
 * 
 *     # Allocate AudioBufferList (small fixed-size struct, unavoidable)
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))             # <<<<<<<<<<<<<<
 *     if output_buffer_list == NULL:
 *         raise MemoryError("Failed to allocate AudioBufferList")
*/
  __pyx_v_output_buffer_list = ((AudioBufferList *)malloc(((sizeof(AudioBufferList)) + (sizeof(AudioBuffer)))));

  /* "coremusic/capi.pyx":1254
 *     # Allocate AudioBufferList (small fixed-size struct, unavoidable)
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate AudioBufferList")
 * 
*/
  __pyx_t_4 = (__pyx_v_output_buffer_list == NULL);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":1255
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:
 *         raise MemoryError("Failed to allocate AudioBufferList")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_AudioBufferLi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __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_ERR(0, 1255, __pyx_L1_error)

    /* "coremusic/capi.pyx":1254
 *     # Allocate AudioBufferList (small fixed-size struct, unavoidable)
 *     output_buffer_list = <at.AudioBufferList*>malloc(sizeof(at.AudioBufferList) + sizeof(at.AudioBuffer))
 *     if output_buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate AudioBufferList")
 * 
*/
  }

  /* "coremusic/capi.pyx":1257
 *         raise MemoryError("Failed to allocate AudioBufferList")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Setup output buffer list to point directly to the provided buffer
 *         output_buffer_list.mNumberBuffers = 1
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1259
 *     try:
 *         # Setup output buffer list to point directly to the provided buffer
 *         output_buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = <cf.UInt32>output_buffer.shape[0]
*/
    __pyx_v_output_buffer_list->mNumberBuffers = 1;

    /* "coremusic/capi.pyx":1260
 *         # Setup output buffer list to point directly to the provided buffer
 *         output_buffer_list.mNumberBuffers = 1
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mDataByteSize = <cf.UInt32>output_buffer.shape[0]
 *         output_buffer_list.mBuffers[0].mData = &output_buffer[0]
*/
    __pyx_t_3 = __pyx_v_callback_data.source_format.mChannelsPerFrame;
    (__pyx_v_output_buffer_list->mBuffers[0]).mNumberChannels = __pyx_t_3;

    /* "coremusic/capi.pyx":1261
 *         output_buffer_list.mNumberBuffers = 1
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = <cf.UInt32>output_buffer.shape[0]             # <<<<<<<<<<<<<<
 *         output_buffer_list.mBuffers[0].mData = &output_buffer[0]
 * 
*/
    (__pyx_v_output_buffer_list->mBuffers[0]).mDataByteSize = ((UInt32)(__pyx_v_output_buffer.shape[0]));

    /* "coremusic/capi.pyx":1262
 *         output_buffer_list.mBuffers[0].mNumberChannels = callback_data.source_format.mChannelsPerFrame
 *         output_buffer_list.mBuffers[0].mDataByteSize = <cf.UInt32>output_buffer.shape[0]
 *         output_buffer_list.mBuffers[0].mData = &output_buffer[0]             # <<<<<<<<<<<<<<
 * 
 *         # Call AudioConverterFillComplexBuffer
*/
    __pyx_t_1 = 0;
    (__pyx_v_output_buffer_list->mBuffers[0]).mData = (&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_output_buffer.data) + __pyx_t_1)) ))));

    /* "coremusic/capi.pyx":1265
 * 
 *         # Call AudioConverterFillComplexBuffer
 *         status = at.AudioConverterFillComplexBuffer(             # <<<<<<<<<<<<<<
 *             converter,
 *             audio_converter_input_callback,  # Our callback function
*/
    __pyx_v_status = AudioConverterFillComplexBuffer(__pyx_v_converter, __pyx_f_9coremusic_4capi_audio_converter_input_callback, (&__pyx_v_callback_data), (&__pyx_v_output_data_packet_size), __pyx_v_output_buffer_list, NULL);

    /* "coremusic/capi.pyx":1274
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))
 * 
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":1275
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))             # <<<<<<<<<<<<<<
 * 
 *         # Return actual bytes written and packet count
*/
      __pyx_t_5 = NULL;
      __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioConverterFillComplexBuffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1275, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1275, __pyx_L5_error)

      /* "coremusic/capi.pyx":1274
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioConverterFillComplexBuffer"))
 * 
*/
    }

    /* "coremusic/capi.pyx":1278
 * 
 *         # Return actual bytes written and packet count
 *         actual_bytes = output_buffer_list.mBuffers[0].mDataByteSize             # <<<<<<<<<<<<<<
 *         return (actual_bytes, output_data_packet_size)
 * 
*/
    __pyx_t_3 = (__pyx_v_output_buffer_list->mBuffers[0]).mDataByteSize;
    __pyx_v_actual_bytes = __pyx_t_3;

    /* "coremusic/capi.pyx":1279
 *         # Return actual bytes written and packet count
 *         actual_bytes = output_buffer_list.mBuffers[0].mDataByteSize
 *         return (actual_bytes, output_data_packet_size)             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_actual_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyLong_From_UInt32(__pyx_v_output_data_packet_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1279, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1279, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1279, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1279, __pyx_L5_error);
    __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    __pyx_r = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":1282
 * 
 *     finally:
 *         free(output_buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        free(__pyx_v_output_buffer_list);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_output_buffer_list);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1188
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_fill_complex_buffer_into(
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_converter_fill_complex_buffer_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1286
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum input buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_65get_audio_converter_property_min_input_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_64get_audio_converter_property_min_input_buffer_size, "get_audio_converter_property_min_input_buffer_size() -> int\n\nGet the minimum input buffer size for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_65get_audio_converter_property_min_input_buffer_size = {"get_audio_converter_property_min_input_buffer_size", (PyCFunction)__pyx_pw_9coremusic_4capi_65get_audio_converter_property_min_input_buffer_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_64get_audio_converter_property_min_input_buffer_size};
static PyObject *__pyx_pw_9coremusic_4capi_65get_audio_converter_property_min_input_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_min_input_buffer_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_64get_audio_converter_property_min_input_buffer_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_64get_audio_converter_property_min_input_buffer_size(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_min_input_buffer_size", 0);

  /* "coremusic/capi.pyx":1288
 * def get_audio_converter_property_min_input_buffer_size() -> int:
 *     """Get the minimum input buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumInputBufferSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterPropertyMinimumInputBufferSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1286
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum input buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_min_input_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1290
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum output buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_67get_audio_converter_property_min_output_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_66get_audio_converter_property_min_output_buffer_size, "get_audio_converter_property_min_output_buffer_size() -> int\n\nGet the minimum output buffer size for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_67get_audio_converter_property_min_output_buffer_size = {"get_audio_converter_property_min_output_buffer_size", (PyCFunction)__pyx_pw_9coremusic_4capi_67get_audio_converter_property_min_output_buffer_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_66get_audio_converter_property_min_output_buffer_size};
static PyObject *__pyx_pw_9coremusic_4capi_67get_audio_converter_property_min_output_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_min_output_buffer_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_66get_audio_converter_property_min_output_buffer_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_66get_audio_converter_property_min_output_buffer_size(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_min_output_buffer_size", 0);

  /* "coremusic/capi.pyx":1292
 * def get_audio_converter_property_min_output_buffer_size() -> int:
 *     """Get the minimum output buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterPropertyMinimumOutputBufferSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1290
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum output buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_min_output_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1294
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum input packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_69get_audio_converter_property_max_input_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_68get_audio_converter_property_max_input_packet_size, "get_audio_converter_property_max_input_packet_size() -> int\n\nGet the maximum input packet size for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_69get_audio_converter_property_max_input_packet_size = {"get_audio_converter_property_max_input_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_69get_audio_converter_property_max_input_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_68get_audio_converter_property_max_input_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_69get_audio_converter_property_max_input_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_max_input_packet_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_68get_audio_converter_property_max_input_packet_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_68get_audio_converter_property_max_input_packet_size(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_max_input_packet_size", 0);

  /* "coremusic/capi.pyx":1296
 * def get_audio_converter_property_max_input_packet_size() -> int:
 *     """Get the maximum input packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumInputPacketSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterPropertyMaximumInputPacketSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1294
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum input packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_max_input_packet_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1298
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum output packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_71get_audio_converter_property_max_output_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_70get_audio_converter_property_max_output_packet_size, "get_audio_converter_property_max_output_packet_size() -> int\n\nGet the maximum output packet size for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_71get_audio_converter_property_max_output_packet_size = {"get_audio_converter_property_max_output_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_71get_audio_converter_property_max_output_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_70get_audio_converter_property_max_output_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_71get_audio_converter_property_max_output_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_max_output_packet_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_70get_audio_converter_property_max_output_packet_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_70get_audio_converter_property_max_output_packet_size(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_max_output_packet_size", 0);

  /* "coremusic/capi.pyx":1300
 * def get_audio_converter_property_max_output_packet_size() -> int:
 *     """Get the maximum output packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterPropertyMaximumOutputPacketSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1298
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum output packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_max_output_packet_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1302
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the sample rate converter quality for an audio converter"""
 *     return at.kAudioConverterSampleRateConverterQuality
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_73get_audio_converter_property_sample_rate_converter_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_72get_audio_converter_property_sample_rate_converter_quality, "get_audio_converter_property_sample_rate_converter_quality() -> int\n\nGet the sample rate converter quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_73get_audio_converter_property_sample_rate_converter_quality = {"get_audio_converter_property_sample_rate_converter_quality", (PyCFunction)__pyx_pw_9coremusic_4capi_73get_audio_converter_property_sample_rate_converter_quality, METH_NOARGS, __pyx_doc_9coremusic_4capi_72get_audio_converter_property_sample_rate_converter_quality};
static PyObject *__pyx_pw_9coremusic_4capi_73get_audio_converter_property_sample_rate_converter_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_sample_rate_converter_quality (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_72get_audio_converter_property_sample_rate_converter_quality(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_72get_audio_converter_property_sample_rate_converter_quality(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_sample_rate_converter_quality", 0);

  /* "coremusic/capi.pyx":1304
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:
 *     """Get the sample rate converter quality for an audio converter"""
 *     return at.kAudioConverterSampleRateConverterQuality             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_property_codec_quality() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterSampleRateConverterQuality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1302
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the sample rate converter quality for an audio converter"""
 *     return at.kAudioConverterSampleRateConverterQuality
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_sample_rate_converter_quality", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1306
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec quality for an audio converter"""
 *     return at.kAudioConverterCodecQuality
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_75get_audio_converter_property_codec_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_74get_audio_converter_property_codec_quality, "get_audio_converter_property_codec_quality() -> int\n\nGet the codec quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_75get_audio_converter_property_codec_quality = {"get_audio_converter_property_codec_quality", (PyCFunction)__pyx_pw_9coremusic_4capi_75get_audio_converter_property_codec_quality, METH_NOARGS, __pyx_doc_9coremusic_4capi_74get_audio_converter_property_codec_quality};
static PyObject *__pyx_pw_9coremusic_4capi_75get_audio_converter_property_codec_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_property_codec_quality (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_74get_audio_converter_property_codec_quality(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_74get_audio_converter_property_codec_quality(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_property_codec_quality", 0);

  /* "coremusic/capi.pyx":1308
 * def get_audio_converter_property_codec_quality() -> int:
 *     """Get the codec quality for an audio converter"""
 *     return at.kAudioConverterCodecQuality             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_quality_max() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterCodecQuality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1306
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec quality for an audio converter"""
 *     return at.kAudioConverterCodecQuality
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_property_codec_quality", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1310
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Max
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_77get_audio_converter_quality_max(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_76get_audio_converter_quality_max, "get_audio_converter_quality_max() -> int\n\nGet the maximum quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_77get_audio_converter_quality_max = {"get_audio_converter_quality_max", (PyCFunction)__pyx_pw_9coremusic_4capi_77get_audio_converter_quality_max, METH_NOARGS, __pyx_doc_9coremusic_4capi_76get_audio_converter_quality_max};
static PyObject *__pyx_pw_9coremusic_4capi_77get_audio_converter_quality_max(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_quality_max (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_76get_audio_converter_quality_max(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_76get_audio_converter_quality_max(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_quality_max", 0);

  /* "coremusic/capi.pyx":1312
 * def get_audio_converter_quality_max() -> int:
 *     """Get the maximum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Max             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_quality_high() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterQuality_Max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1310
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Max
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_quality_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1314
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     """Get the high quality for an audio converter"""
 *     return at.kAudioConverterQuality_High
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_79get_audio_converter_quality_high(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_78get_audio_converter_quality_high, "get_audio_converter_quality_high() -> int\n\nGet the high quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_79get_audio_converter_quality_high = {"get_audio_converter_quality_high", (PyCFunction)__pyx_pw_9coremusic_4capi_79get_audio_converter_quality_high, METH_NOARGS, __pyx_doc_9coremusic_4capi_78get_audio_converter_quality_high};
static PyObject *__pyx_pw_9coremusic_4capi_79get_audio_converter_quality_high(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_quality_high (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_78get_audio_converter_quality_high(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_78get_audio_converter_quality_high(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_quality_high", 0);

  /* "coremusic/capi.pyx":1316
 * def get_audio_converter_quality_high() -> int:
 *     """Get the high quality for an audio converter"""
 *     return at.kAudioConverterQuality_High             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_quality_medium() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterQuality_High); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1314
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     """Get the high quality for an audio converter"""
 *     return at.kAudioConverterQuality_High
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_quality_high", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1318
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     """Get the medium quality for an audio converter"""
 *     return at.kAudioConverterQuality_Medium
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_81get_audio_converter_quality_medium(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_80get_audio_converter_quality_medium, "get_audio_converter_quality_medium() -> int\n\nGet the medium quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_81get_audio_converter_quality_medium = {"get_audio_converter_quality_medium", (PyCFunction)__pyx_pw_9coremusic_4capi_81get_audio_converter_quality_medium, METH_NOARGS, __pyx_doc_9coremusic_4capi_80get_audio_converter_quality_medium};
static PyObject *__pyx_pw_9coremusic_4capi_81get_audio_converter_quality_medium(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_quality_medium (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_80get_audio_converter_quality_medium(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_80get_audio_converter_quality_medium(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_quality_medium", 0);

  /* "coremusic/capi.pyx":1320
 * def get_audio_converter_quality_medium() -> int:
 *     """Get the medium quality for an audio converter"""
 *     return at.kAudioConverterQuality_Medium             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_quality_low() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterQuality_Medium); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1320, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1318
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     """Get the medium quality for an audio converter"""
 *     return at.kAudioConverterQuality_Medium
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_quality_medium", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1322
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     """Get the low quality for an audio converter"""
 *     return at.kAudioConverterQuality_Low
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_83get_audio_converter_quality_low(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_82get_audio_converter_quality_low, "get_audio_converter_quality_low() -> int\n\nGet the low quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_83get_audio_converter_quality_low = {"get_audio_converter_quality_low", (PyCFunction)__pyx_pw_9coremusic_4capi_83get_audio_converter_quality_low, METH_NOARGS, __pyx_doc_9coremusic_4capi_82get_audio_converter_quality_low};
static PyObject *__pyx_pw_9coremusic_4capi_83get_audio_converter_quality_low(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_quality_low (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_82get_audio_converter_quality_low(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_82get_audio_converter_quality_low(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_quality_low", 0);

  /* "coremusic/capi.pyx":1324
 * def get_audio_converter_quality_low() -> int:
 *     """Get the low quality for an audio converter"""
 *     return at.kAudioConverterQuality_Low             # <<<<<<<<<<<<<<
 * 
 * def get_audio_converter_quality_min() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterQuality_Low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1322
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     """Get the low quality for an audio converter"""
 *     return at.kAudioConverterQuality_Low
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_quality_low", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1326
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Min
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_85get_audio_converter_quality_min(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_84get_audio_converter_quality_min, "get_audio_converter_quality_min() -> int\n\nGet the minimum quality for an audio converter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_85get_audio_converter_quality_min = {"get_audio_converter_quality_min", (PyCFunction)__pyx_pw_9coremusic_4capi_85get_audio_converter_quality_min, METH_NOARGS, __pyx_doc_9coremusic_4capi_84get_audio_converter_quality_min};
static PyObject *__pyx_pw_9coremusic_4capi_85get_audio_converter_quality_min(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_converter_quality_min (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_84get_audio_converter_quality_min(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_84get_audio_converter_quality_min(CYTHON_UNUSED PyObject *__pyx_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_audio_converter_quality_min", 0);

  /* "coremusic/capi.pyx":1328
 * def get_audio_converter_quality_min() -> int:
 *     """Get the minimum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Min             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioConverterQuality_Min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1326
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Min
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_converter_quality_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1335
 * # ============================================================================
 * 
 * def extended_audio_file_open_url(str file_path) -> int:             # <<<<<<<<<<<<<<
 *     """Open an audio file with ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_87extended_audio_file_open_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_86extended_audio_file_open_url, "extended_audio_file_open_url(str file_path) -> int\n\nOpen an audio file with ExtendedAudioFile\n\nArgs:\n    file_path: Path to audio file\n\nReturns:\n    ExtAudioFile ID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_87extended_audio_file_open_url = {"extended_audio_file_open_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_87extended_audio_file_open_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_86extended_audio_file_open_url};
static PyObject *__pyx_pw_9coremusic_4capi_87extended_audio_file_open_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_open_url (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1335, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1335, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_open_url", 0) < (0)) __PYX_ERR(0, 1335, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_open_url", 1, 1, 1, i); __PYX_ERR(0, 1335, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1335, __pyx_L3_error)
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_open_url", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1335, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_open_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 1335, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_86extended_audio_file_open_url(__pyx_self, __pyx_v_file_path);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_86extended_audio_file_open_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path) {
  CFStringRef __pyx_v_cf_path;
  CFURLRef __pyx_v_url;
  ExtAudioFileRef __pyx_v_ext_file;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_open_url", 0);

  /* "coremusic/capi.pyx":1344
 *         ExtAudioFile ID
 *     """
 *     cdef cf.CFStringRef cf_path = cf.CFStringCreateWithCString(NULL, file_path.encode('utf-8'), cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cf.CFURLRef url = cf.CFURLCreateWithFileSystemPath(NULL, cf_path, cf.kCFURLPOSIXPathStyle, False)
 *     cdef at.ExtAudioFileRef ext_file
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 1344, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error)
  __pyx_v_cf_path = CFStringCreateWithCString(NULL, __pyx_t_2, kCFStringEncodingUTF8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1345
 *     """
 *     cdef cf.CFStringRef cf_path = cf.CFStringCreateWithCString(NULL, file_path.encode('utf-8'), cf.kCFStringEncodingUTF8)
 *     cdef cf.CFURLRef url = cf.CFURLCreateWithFileSystemPath(NULL, cf_path, cf.kCFURLPOSIXPathStyle, False)             # <<<<<<<<<<<<<<
 *     cdef at.ExtAudioFileRef ext_file
 * 
*/
  __pyx_v_url = CFURLCreateWithFileSystemPath(NULL, __pyx_v_cf_path, kCFURLPOSIXPathStyle, 0);

  /* "coremusic/capi.pyx":1348
 *     cdef at.ExtAudioFileRef ext_file
 * 
 *     if url == NULL:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
*/
  __pyx_t_3 = (__pyx_v_url == NULL);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1349
 * 
 *     if url == NULL:
 *         cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
 * 
*/
    CFRelease(__pyx_v_cf_path);

    /* "coremusic/capi.pyx":1350
 *     if url == NULL:
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileOpenURL(url, &ext_file)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_create_URL_from_path, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __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_ERR(0, 1350, __pyx_L1_error)

    /* "coremusic/capi.pyx":1348
 *     cdef at.ExtAudioFileRef ext_file
 * 
 *     if url == NULL:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
*/
  }

  /* "coremusic/capi.pyx":1352
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileOpenURL(url, &ext_file)             # <<<<<<<<<<<<<<
 * 
 *     cf.CFRelease(url)
*/
  __pyx_v_status = ExtAudioFileOpenURL(__pyx_v_url, (&__pyx_v_ext_file));

  /* "coremusic/capi.pyx":1354
 *     cdef cf.OSStatus status = at.ExtAudioFileOpenURL(url, &ext_file)
 * 
 *     cf.CFRelease(url)             # <<<<<<<<<<<<<<
 *     cf.CFRelease(cf_path)
 * 
*/
  CFRelease(__pyx_v_url);

  /* "coremusic/capi.pyx":1355
 * 
 *     cf.CFRelease(url)
 *     cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_cf_path);

  /* "coremusic/capi.pyx":1357
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileOpenURL"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1358
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileOpenURL"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>ext_file
*/
    __pyx_t_6 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileOpenURL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __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_ERR(0, 1358, __pyx_L1_error)

    /* "coremusic/capi.pyx":1357
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileOpenURL"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1360
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileOpenURL"))
 * 
 *     return <long>ext_file             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_ext_file)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1335
 * # ============================================================================
 * 
 * def extended_audio_file_open_url(str file_path) -> int:             # <<<<<<<<<<<<<<
 *     """Open an audio file with ExtendedAudioFile
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_open_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1363
 * 
 * 
 * def extended_audio_file_create_with_url(str file_path, int file_type, source_format: dict,             # <<<<<<<<<<<<<<
 *                                          int codec_manufacturer=0) -> int:
 *     """Create a new audio file with ExtendedAudioFile
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_89extended_audio_file_create_with_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_88extended_audio_file_create_with_url, "extended_audio_file_create_with_url(str file_path, int file_type, dict source_format: dict, int codec_manufacturer=0) -> int\n\nCreate a new audio file with ExtendedAudioFile\n\nArgs:\n    file_path: Path for new audio file\n    file_type: Audio file type (e.g., kAudioFileWAVEType)\n    source_format: Audio format dictionary (AudioStreamBasicDescription)\n    codec_manufacturer: Codec manufacturer code (default: 0)\n\nReturns:\n    ExtAudioFile ID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_89extended_audio_file_create_with_url = {"extended_audio_file_create_with_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_89extended_audio_file_create_with_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_88extended_audio_file_create_with_url};
static PyObject *__pyx_pw_9coremusic_4capi_89extended_audio_file_create_with_url(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  int __pyx_v_file_type;
  PyObject *__pyx_v_source_format = 0;
  CYTHON_UNUSED int __pyx_v_codec_manufacturer;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_create_with_url (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,&__pyx_mstate_global->__pyx_n_u_file_type,&__pyx_mstate_global->__pyx_n_u_source_format,&__pyx_mstate_global->__pyx_n_u_codec_manufacturer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1363, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_create_with_url", 0) < (0)) __PYX_ERR(0, 1363, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_create_with_url", 0, 3, 4, i); __PYX_ERR(0, 1363, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1363, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1363, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1363, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
    __pyx_v_file_type = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_file_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1363, __pyx_L3_error)
    __pyx_v_source_format = ((PyObject*)values[2]);
    if (values[3]) {
      __pyx_v_codec_manufacturer = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_codec_manufacturer == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1364, __pyx_L3_error)
    } else {
      __pyx_v_codec_manufacturer = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_create_with_url", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1363, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_create_with_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 1363, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format), (&PyDict_Type), 0, "source_format", 2))) __PYX_ERR(0, 1363, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_88extended_audio_file_create_with_url(__pyx_self, __pyx_v_file_path, __pyx_v_file_type, __pyx_v_source_format, __pyx_v_codec_manufacturer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_88extended_audio_file_create_with_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path, int __pyx_v_file_type, PyObject *__pyx_v_source_format, CYTHON_UNUSED int __pyx_v_codec_manufacturer) {
  CFStringRef __pyx_v_cf_path;
  CFURLRef __pyx_v_url;
  AudioStreamBasicDescription __pyx_v_format;
  ExtAudioFileRef __pyx_v_ext_file;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CFStringRef __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_create_with_url", 0);

  /* "coremusic/capi.pyx":1376
 *         ExtAudioFile ID
 *     """
 *     cdef cf.CFStringRef cf_path = str_to_cfstring(file_path)             # <<<<<<<<<<<<<<
 *     cdef cf.CFURLRef url = cf.CFURLCreateWithFileSystemPath(NULL, cf_path, cf.kCFURLPOSIXPathStyle, False)
 *     cdef at.AudioStreamBasicDescription format
*/
  __pyx_t_1 = __pyx_f_9coremusic_4capi_str_to_cfstring(__pyx_v_file_path); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
  __pyx_v_cf_path = __pyx_t_1;

  /* "coremusic/capi.pyx":1377
 *     """
 *     cdef cf.CFStringRef cf_path = str_to_cfstring(file_path)
 *     cdef cf.CFURLRef url = cf.CFURLCreateWithFileSystemPath(NULL, cf_path, cf.kCFURLPOSIXPathStyle, False)             # <<<<<<<<<<<<<<
 *     cdef at.AudioStreamBasicDescription format
 *     cdef at.ExtAudioFileRef ext_file
*/
  __pyx_v_url = CFURLCreateWithFileSystemPath(NULL, __pyx_v_cf_path, kCFURLPOSIXPathStyle, 0);

  /* "coremusic/capi.pyx":1381
 *     cdef at.ExtAudioFileRef ext_file
 * 
 *     if url == NULL:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
*/
  __pyx_t_2 = (__pyx_v_url == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":1382
 * 
 *     if url == NULL:
 *         cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
 * 
*/
    CFRelease(__pyx_v_cf_path);

    /* "coremusic/capi.pyx":1383
 *     if url == NULL:
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *     # Set up audio format using helper
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_create_URL_from_path, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1383, __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_ERR(0, 1383, __pyx_L1_error)

    /* "coremusic/capi.pyx":1381
 *     cdef at.ExtAudioFileRef ext_file
 * 
 *     if url == NULL:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")
*/
  }

  /* "coremusic/capi.pyx":1386
 * 
 *     # Set up audio format using helper
 *     dict_to_asbd(source_format, &format)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileCreateWithURL(
*/
  __pyx_f_9coremusic_4capi_dict_to_asbd(__pyx_v_source_format, (&__pyx_v_format));

  /* "coremusic/capi.pyx":1388
 *     dict_to_asbd(source_format, &format)
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileCreateWithURL(             # <<<<<<<<<<<<<<
 *         url,
 *         file_type,
*/
  __pyx_v_status = ExtAudioFileCreateWithURL(__pyx_v_url, __pyx_v_file_type, (&__pyx_v_format), NULL, kAudioFileFlags_EraseFile, (&__pyx_v_ext_file));

  /* "coremusic/capi.pyx":1397
 *     )
 * 
 *     cf.CFRelease(url)             # <<<<<<<<<<<<<<
 *     cf.CFRelease(cf_path)
 * 
*/
  CFRelease(__pyx_v_url);

  /* "coremusic/capi.pyx":1398
 * 
 *     cf.CFRelease(url)
 *     cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_cf_path);

  /* "coremusic/capi.pyx":1400
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileCreateWithURL"))
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":1401
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileCreateWithURL"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>ext_file
*/
    __pyx_t_6 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileCreateWithURL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __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_ERR(0, 1401, __pyx_L1_error)

    /* "coremusic/capi.pyx":1400
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileCreateWithURL"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1403
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileCreateWithURL"))
 * 
 *     return <long>ext_file             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_ext_file)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1363
 * 
 * 
 * def extended_audio_file_create_with_url(str file_path, int file_type, source_format: dict,             # <<<<<<<<<<<<<<
 *                                          int codec_manufacturer=0) -> int:
 *     """Create a new audio file with ExtendedAudioFile
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_create_with_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1406
 * 
 * 
 * def extended_audio_file_dispose(long ext_file_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an ExtendedAudioFile"""
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_91extended_audio_file_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_90extended_audio_file_dispose, "extended_audio_file_dispose(long ext_file_id)\n\nDispose of an ExtendedAudioFile");
static PyMethodDef __pyx_mdef_9coremusic_4capi_91extended_audio_file_dispose = {"extended_audio_file_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_91extended_audio_file_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_90extended_audio_file_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_91extended_audio_file_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1406, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_dispose", 0) < (0)) __PYX_ERR(0, 1406, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_dispose", 1, 1, 1, i); __PYX_ERR(0, 1406, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1406, __pyx_L3_error)
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1406, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1406, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_90extended_audio_file_dispose(__pyx_self, __pyx_v_ext_file_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_90extended_audio_file_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id) {
  ExtAudioFileRef __pyx_v_ext_file;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_dispose", 0);

  /* "coremusic/capi.pyx":1408
 * def extended_audio_file_dispose(long ext_file_id):
 *     """Dispose of an ExtendedAudioFile"""
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1409
 *     """Dispose of an ExtendedAudioFile"""
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileDispose"))
*/
  __pyx_v_status = ExtAudioFileDispose(__pyx_v_ext_file);

  /* "coremusic/capi.pyx":1410
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1411
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileDispose"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __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_ERR(0, 1411, __pyx_L1_error)

    /* "coremusic/capi.pyx":1410
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1406
 * 
 * 
 * def extended_audio_file_dispose(long ext_file_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an ExtendedAudioFile"""
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1414
 * 
 * 
 * def extended_audio_file_read(long ext_file_id, int num_frames) -> tuple:             # <<<<<<<<<<<<<<
 *     """Read audio frames from ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_93extended_audio_file_read(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_92extended_audio_file_read, "extended_audio_file_read(long ext_file_id, int num_frames) -> tuple\n\nRead audio frames from ExtendedAudioFile\n\nArgs:\n    ext_file_id: ExtAudioFile ID\n    num_frames: Number of frames to read\n\nReturns:\n    Tuple of (audio_data_bytes, frames_read)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_93extended_audio_file_read = {"extended_audio_file_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_93extended_audio_file_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_92extended_audio_file_read};
static PyObject *__pyx_pw_9coremusic_4capi_93extended_audio_file_read(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  int __pyx_v_num_frames;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_read (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,&__pyx_mstate_global->__pyx_n_u_num_frames,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1414, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1414, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_read", 0) < (0)) __PYX_ERR(0, 1414, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_read", 1, 2, 2, i); __PYX_ERR(0, 1414, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1414, __pyx_L3_error)
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1414, __pyx_L3_error)
    __pyx_v_num_frames = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1414, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_read", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1414, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_92extended_audio_file_read(__pyx_self, __pyx_v_ext_file_id, __pyx_v_num_frames);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_92extended_audio_file_read(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames) {
  ExtAudioFileRef __pyx_v_ext_file;
  UInt32 __pyx_v_frames_to_read;
  UInt32 __pyx_v_buffer_size;
  char *__pyx_v_buffer;
  AudioBufferList __pyx_v_buffer_list;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_actual_size;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  UInt32 __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_read", 0);

  /* "coremusic/capi.pyx":1424
 *         Tuple of (audio_data_bytes, frames_read)
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 frames_to_read = num_frames
 *     cdef cf.UInt32 buffer_size = num_frames * 4 * 2  # Assume stereo 16-bit for now
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1425
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames_to_read = num_frames             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 buffer_size = num_frames * 4 * 2  # Assume stereo 16-bit for now
 *     cdef char* buffer = <char*>malloc(buffer_size)
*/
  __pyx_v_frames_to_read = __pyx_v_num_frames;

  /* "coremusic/capi.pyx":1426
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames_to_read = num_frames
 *     cdef cf.UInt32 buffer_size = num_frames * 4 * 2  # Assume stereo 16-bit for now             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     cdef at.AudioBufferList buffer_list
*/
  __pyx_v_buffer_size = ((__pyx_v_num_frames * 4) * 2);

  /* "coremusic/capi.pyx":1427
 *     cdef cf.UInt32 frames_to_read = num_frames
 *     cdef cf.UInt32 buffer_size = num_frames * 4 * 2  # Assume stereo 16-bit for now
 *     cdef char* buffer = <char*>malloc(buffer_size)             # <<<<<<<<<<<<<<
 *     cdef at.AudioBufferList buffer_list
 *     cdef cf.OSStatus status
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_buffer_size));

  /* "coremusic/capi.pyx":1431
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate read buffer")
 * 
*/
  __pyx_t_1 = (__pyx_v_buffer == ((char *)0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1432
 * 
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate read buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_read_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __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_ERR(0, 1432, __pyx_L1_error)

    /* "coremusic/capi.pyx":1431
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate read buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":1434
 *         raise MemoryError("Failed to allocate read buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = 2
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1435
 * 
 *     try:
 *         buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mNumberChannels = 2
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
*/
    __pyx_v_buffer_list.mNumberBuffers = 1;

    /* "coremusic/capi.pyx":1436
 *     try:
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = 2             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *         buffer_list.mBuffers[0].mData = buffer
*/
    (__pyx_v_buffer_list.mBuffers[0]).mNumberChannels = 2;

    /* "coremusic/capi.pyx":1437
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = 2
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mData = buffer
 * 
*/
    (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize = __pyx_v_buffer_size;

    /* "coremusic/capi.pyx":1438
 *         buffer_list.mBuffers[0].mNumberChannels = 2
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *         buffer_list.mBuffers[0].mData = buffer             # <<<<<<<<<<<<<<
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
*/
    (__pyx_v_buffer_list.mBuffers[0]).mData = __pyx_v_buffer;

    /* "coremusic/capi.pyx":1440
 *         buffer_list.mBuffers[0].mData = buffer
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
*/
    __pyx_v_status = ExtAudioFileRead(__pyx_v_ext_file, (&__pyx_v_frames_to_read), (&__pyx_v_buffer_list));

    /* "coremusic/capi.pyx":1441
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":1442
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))             # <<<<<<<<<<<<<<
 * 
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize
*/
      __pyx_t_3 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileRead); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1442, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1442, __pyx_L5_error)

      /* "coremusic/capi.pyx":1441
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
*/
    }

    /* "coremusic/capi.pyx":1444
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize             # <<<<<<<<<<<<<<
 *         result = buffer[:actual_size]
 *         return (result, frames_to_read)
*/
    __pyx_t_6 = (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize;
    __pyx_v_actual_size = __pyx_t_6;

    /* "coremusic/capi.pyx":1445
 * 
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize
 *         result = buffer[:actual_size]             # <<<<<<<<<<<<<<
 *         return (result, frames_to_read)
 *     finally:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_actual_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":1446
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize
 *         result = buffer[:actual_size]
 *         return (result, frames_to_read)             # <<<<<<<<<<<<<<
 *     finally:
 *         free(buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_frames_to_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1446, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 1446, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1446, __pyx_L5_error);
    __pyx_t_2 = 0;
    __pyx_r = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":1448
 *         return (result, frames_to_read)
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_16 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_16;
      __pyx_t_16 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1414
 * 
 * 
 * def extended_audio_file_read(long ext_file_id, int num_frames) -> tuple:             # <<<<<<<<<<<<<<
 *     """Read audio frames from ExtendedAudioFile
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1451
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def extended_audio_file_read_into(long ext_file_id, int num_frames,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_95extended_audio_file_read_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_94extended_audio_file_read_into, "extended_audio_file_read_into(long ext_file_id, int num_frames, unsigned char[::1] buffer, int num_channels=2) -> tuple\n\nRead audio frames from ExtendedAudioFile directly into a provided buffer (zero-copy).\n\nThis is a high-performance variant of extended_audio_file_read() that reads\ndirectly into a caller-provided buffer, avoiding memory allocation and copying.\n\nArgs:\n    ext_file_id: ExtAudioFile ID from extended_audio_file_open_url()\n    num_frames: Number of frames to read\n    buffer: Pre-allocated buffer (bytearray or numpy uint8 array) to read into.\n            Must be large enough: num_frames * num_channels * bytes_per_sample\n    num_channels: Number of audio channels (default 2 for stereo)\n\nReturns:\n    Tuple of (bytes_read, frames_read) indicating actual data read.\n    The data is written directly into the provided buffer.\n\nRaises:\n    RuntimeError: If the read operation fails\n    ValueError: If buffer is too small\n\nExample:\n    >>> ext_file = extended_audio_file_open_url(\"audio.wav\")\n    >>> # Pre-allocate buffer for 1024 stereo float32 frames\n    >>> buffer = bytearray(1024 * 2 * 4)  # frames * channels * sizeof(float32)\n    >>> bytes_read, frames_read = extended_audio_file_read_into(\n    ...     ext_file, 1024, buffer, num_channels=2)\n    >>> # Data is now in buffer[:bytes_read]\n    >>> extended_audio_file_dispose(ext_file)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_95extended_audio_file_read_into = {"extended_audio_file_read_into", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_95extended_audio_file_read_into, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_94extended_audio_file_read_into};
static PyObject *__pyx_pw_9coremusic_4capi_95extended_audio_file_read_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  int __pyx_v_num_frames;
  __Pyx_memviewslice __pyx_v_buffer = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_num_channels;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_read_into (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,&__pyx_mstate_global->__pyx_n_u_num_frames,&__pyx_mstate_global->__pyx_n_u_buffer,&__pyx_mstate_global->__pyx_n_u_num_channels,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1451, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_read_into", 0) < (0)) __PYX_ERR(0, 1451, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_read_into", 0, 3, 4, i); __PYX_ERR(0, 1451, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1451, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1451, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1451, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L3_error)
    __pyx_v_num_frames = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L3_error)
    __pyx_v_buffer = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_buffer.memview)) __PYX_ERR(0, 1454, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_num_channels = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_num_channels == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L3_error)
    } else {
      __pyx_v_num_channels = ((int)((int)2));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_read_into", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1451, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_buffer, 1);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_read_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_buffer.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buffer"); __PYX_ERR(0, 1454, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9coremusic_4capi_94extended_audio_file_read_into(__pyx_self, __pyx_v_ext_file_id, __pyx_v_num_frames, __pyx_v_buffer, __pyx_v_num_channels);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_buffer, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_94extended_audio_file_read_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames, __Pyx_memviewslice __pyx_v_buffer, int __pyx_v_num_channels) {
  ExtAudioFileRef __pyx_v_ext_file;
  UInt32 __pyx_v_frames_to_read;
  UInt32 __pyx_v_buffer_size;
  AudioBufferList __pyx_v_buffer_list;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_required_size;
  UInt32 __pyx_v_actual_size;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[9];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  UInt32 __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_read_into", 0);

  /* "coremusic/capi.pyx":1485
 *         >>> extended_audio_file_dispose(ext_file)
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 frames_to_read = num_frames
 *     cdef cf.UInt32 buffer_size = <cf.UInt32>buffer.shape[0]
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1486
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames_to_read = num_frames             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 buffer_size = <cf.UInt32>buffer.shape[0]
 *     cdef at.AudioBufferList buffer_list
*/
  __pyx_v_frames_to_read = __pyx_v_num_frames;

  /* "coremusic/capi.pyx":1487
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames_to_read = num_frames
 *     cdef cf.UInt32 buffer_size = <cf.UInt32>buffer.shape[0]             # <<<<<<<<<<<<<<
 *     cdef at.AudioBufferList buffer_list
 *     cdef cf.OSStatus status
*/
  __pyx_v_buffer_size = ((UInt32)(__pyx_v_buffer.shape[0]));

  /* "coremusic/capi.pyx":1492
 * 
 *     # Validate buffer size (assume float32 samples = 4 bytes per sample)
 *     cdef cf.UInt32 required_size = num_frames * num_channels * 4             # <<<<<<<<<<<<<<
 *     if buffer_size < required_size:
 *         raise ValueError(
*/
  __pyx_v_required_size = ((__pyx_v_num_frames * __pyx_v_num_channels) * 4);

  /* "coremusic/capi.pyx":1493
 *     # Validate buffer size (assume float32 samples = 4 bytes per sample)
 *     cdef cf.UInt32 required_size = num_frames * num_channels * 4
 *     if buffer_size < required_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Buffer too small: {buffer_size} bytes provided, "
*/
  __pyx_t_1 = (__pyx_v_buffer_size < __pyx_v_required_size);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1494
 *     cdef cf.UInt32 required_size = num_frames * num_channels * 4
 *     if buffer_size < required_size:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f"Buffer too small: {buffer_size} bytes provided, "
 *             f"but {required_size} bytes required for {num_frames} frames "
*/
    __pyx_t_3 = NULL;

    /* "coremusic/capi.pyx":1495
 *     if buffer_size < required_size:
 *         raise ValueError(
 *             f"Buffer too small: {buffer_size} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {required_size} bytes required for {num_frames} frames "
 *             f"({num_channels} channels, 4 bytes/sample)"
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_UInt32(__pyx_v_buffer_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "coremusic/capi.pyx":1496
 *         raise ValueError(
 *             f"Buffer too small: {buffer_size} bytes provided, "
 *             f"but {required_size} bytes required for {num_frames} frames "             # <<<<<<<<<<<<<<
 *             f"({num_channels} channels, 4 bytes/sample)"
 *         )
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_UInt32(__pyx_v_required_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_num_frames, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "coremusic/capi.pyx":1497
 *             f"Buffer too small: {buffer_size} bytes provided, "
 *             f"but {required_size} bytes required for {num_frames} frames "
 *             f"({num_channels} channels, 4 bytes/sample)"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_num_channels, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Buffer_too_small;
    __pyx_t_8[1] = __pyx_t_4;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_bytes_provided_but;
    __pyx_t_8[3] = __pyx_t_5;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_bytes_required_for;
    __pyx_t_8[5] = __pyx_t_6;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_frames;
    __pyx_t_8[7] = __pyx_t_7;
    __pyx_t_8[8] = __pyx_mstate_global->__pyx_kp_u_channels_4_bytes_sample;

    /* "coremusic/capi.pyx":1495
 *     if buffer_size < required_size:
 *         raise ValueError(
 *             f"Buffer too small: {buffer_size} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {required_size} bytes required for {num_frames} frames "
 *             f"({num_channels} channels, 4 bytes/sample)"
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 9, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 26, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __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_ERR(0, 1494, __pyx_L1_error)

    /* "coremusic/capi.pyx":1493
 *     # Validate buffer size (assume float32 samples = 4 bytes per sample)
 *     cdef cf.UInt32 required_size = num_frames * num_channels * 4
 *     if buffer_size < required_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Buffer too small: {buffer_size} bytes provided, "
*/
  }

  /* "coremusic/capi.pyx":1501
 * 
 *     # Setup buffer list to point directly to the provided buffer
 *     buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
*/
  __pyx_v_buffer_list.mNumberBuffers = 1;

  /* "coremusic/capi.pyx":1502
 *     # Setup buffer list to point directly to the provided buffer
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = &buffer[0]
*/
  (__pyx_v_buffer_list.mBuffers[0]).mNumberChannels = __pyx_v_num_channels;

  /* "coremusic/capi.pyx":1503
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mData = &buffer[0]
 * 
*/
  (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize = __pyx_v_buffer_size;

  /* "coremusic/capi.pyx":1504
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = &buffer[0]             # <<<<<<<<<<<<<<
 * 
 *     status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
*/
  __pyx_t_11 = 0;
  (__pyx_v_buffer_list.mBuffers[0]).mData = (&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_buffer.data) + __pyx_t_11)) ))));

  /* "coremusic/capi.pyx":1506
 *     buffer_list.mBuffers[0].mData = &buffer[0]
 * 
 *     status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
*/
  __pyx_v_status = ExtAudioFileRead(__pyx_v_ext_file, (&__pyx_v_frames_to_read), (&__pyx_v_buffer_list));

  /* "coremusic/capi.pyx":1507
 * 
 *     status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1508
 *     status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.UInt32 actual_size = buffer_list.mBuffers[0].mDataByteSize
*/
    __pyx_t_9 = NULL;
    __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileRead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __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_ERR(0, 1508, __pyx_L1_error)

    /* "coremusic/capi.pyx":1507
 * 
 *     status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1510
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileRead"))
 * 
 *     cdef cf.UInt32 actual_size = buffer_list.mBuffers[0].mDataByteSize             # <<<<<<<<<<<<<<
 *     return (actual_size, frames_to_read)
 * 
*/
  __pyx_t_12 = (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize;
  __pyx_v_actual_size = __pyx_t_12;

  /* "coremusic/capi.pyx":1511
 * 
 *     cdef cf.UInt32 actual_size = buffer_list.mBuffers[0].mDataByteSize
 *     return (actual_size, frames_to_read)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_actual_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_frames_to_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1511, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1511, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1451
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def extended_audio_file_read_into(long ext_file_id, int num_frames,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_read_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1514
 * 
 * 
 * def extended_audio_file_write(long ext_file_id, int num_frames, bytes audio_data):             # <<<<<<<<<<<<<<
 *     """Write audio frames to ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_97extended_audio_file_write(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_96extended_audio_file_write, "extended_audio_file_write(long ext_file_id, int num_frames, bytes audio_data)\n\nWrite audio frames to ExtendedAudioFile\n\nArgs:\n    ext_file_id: ExtAudioFile ID\n    num_frames: Number of frames to write\n    audio_data: Audio data bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_97extended_audio_file_write = {"extended_audio_file_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_97extended_audio_file_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_96extended_audio_file_write};
static PyObject *__pyx_pw_9coremusic_4capi_97extended_audio_file_write(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  int __pyx_v_num_frames;
  PyObject *__pyx_v_audio_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_write (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,&__pyx_mstate_global->__pyx_n_u_num_frames,&__pyx_mstate_global->__pyx_n_u_audio_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1514, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1514, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1514, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1514, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_write", 0) < (0)) __PYX_ERR(0, 1514, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_write", 1, 3, 3, i); __PYX_ERR(0, 1514, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1514, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1514, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1514, __pyx_L3_error)
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L3_error)
    __pyx_v_num_frames = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L3_error)
    __pyx_v_audio_data = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_write", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1514, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_audio_data), (&PyBytes_Type), 1, "audio_data", 1))) __PYX_ERR(0, 1514, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_96extended_audio_file_write(__pyx_self, __pyx_v_ext_file_id, __pyx_v_num_frames, __pyx_v_audio_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_96extended_audio_file_write(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_num_frames, PyObject *__pyx_v_audio_data) {
  ExtAudioFileRef __pyx_v_ext_file;
  UInt32 __pyx_v_frames;
  char *__pyx_v_buffer;
  UInt32 __pyx_v_buffer_size;
  AudioBufferList __pyx_v_buffer_list;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_write", 0);

  /* "coremusic/capi.pyx":1522
 *         audio_data: Audio data bytes
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 frames = num_frames
 *     cdef char* buffer = <char*><bytes>audio_data
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1523
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames = num_frames             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*><bytes>audio_data
 *     cdef cf.UInt32 buffer_size = len(audio_data)
*/
  __pyx_v_frames = __pyx_v_num_frames;

  /* "coremusic/capi.pyx":1524
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 frames = num_frames
 *     cdef char* buffer = <char*><bytes>audio_data             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 buffer_size = len(audio_data)
 * 
*/
  if (unlikely(__pyx_v_audio_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1524, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_audio_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":1525
 *     cdef cf.UInt32 frames = num_frames
 *     cdef char* buffer = <char*><bytes>audio_data
 *     cdef cf.UInt32 buffer_size = len(audio_data)             # <<<<<<<<<<<<<<
 * 
 *     cdef at.AudioBufferList buffer_list
*/
  if (unlikely(__pyx_v_audio_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1525, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_audio_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1525, __pyx_L1_error)
  __pyx_v_buffer_size = __pyx_t_2;

  /* "coremusic/capi.pyx":1528
 * 
 *     cdef at.AudioBufferList buffer_list
 *     buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mNumberChannels = 2
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
*/
  __pyx_v_buffer_list.mNumberBuffers = 1;

  /* "coremusic/capi.pyx":1529
 *     cdef at.AudioBufferList buffer_list
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = 2             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = buffer
*/
  (__pyx_v_buffer_list.mBuffers[0]).mNumberChannels = 2;

  /* "coremusic/capi.pyx":1530
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = 2
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mData = buffer
 * 
*/
  (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize = __pyx_v_buffer_size;

  /* "coremusic/capi.pyx":1531
 *     buffer_list.mBuffers[0].mNumberChannels = 2
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = buffer             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
*/
  (__pyx_v_buffer_list.mBuffers[0]).mData = __pyx_v_buffer;

  /* "coremusic/capi.pyx":1533
 *     buffer_list.mBuffers[0].mData = buffer
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileWrite"))
*/
  __pyx_v_status = ExtAudioFileWrite(__pyx_v_ext_file, __pyx_v_frames, (&__pyx_v_buffer_list));

  /* "coremusic/capi.pyx":1534
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileWrite"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1535
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileWrite"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileWrite); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __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_ERR(0, 1535, __pyx_L1_error)

    /* "coremusic/capi.pyx":1534
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileWrite"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1514
 * 
 * 
 * def extended_audio_file_write(long ext_file_id, int num_frames, bytes audio_data):             # <<<<<<<<<<<<<<
 *     """Write audio frames to ExtendedAudioFile
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1538
 * 
 * 
 * def extended_audio_file_get_property(long ext_file_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_99extended_audio_file_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_98extended_audio_file_get_property, "extended_audio_file_get_property(long ext_file_id, int property_id) -> bytes\n\nGet a property from an ExtendedAudioFile\n\nArgs:\n    ext_file_id: ExtAudioFile ID\n    property_id: Property ID\n\nReturns:\n    Property data as bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_99extended_audio_file_get_property = {"extended_audio_file_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_99extended_audio_file_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_98extended_audio_file_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_99extended_audio_file_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  int __pyx_v_property_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,&__pyx_mstate_global->__pyx_n_u_property_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1538, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_get_property", 0) < (0)) __PYX_ERR(0, 1538, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_get_property", 1, 2, 2, i); __PYX_ERR(0, 1538, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1538, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1538, __pyx_L3_error)
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_get_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1538, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_98extended_audio_file_get_property(__pyx_self, __pyx_v_ext_file_id, __pyx_v_property_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_98extended_audio_file_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_property_id) {
  ExtAudioFileRef __pyx_v_ext_file;
  UInt32 __pyx_v_data_size;
  char *__pyx_v_buffer;
  OSStatus __pyx_v_status;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("extended_audio_file_get_property", 0);

  /* "coremusic/capi.pyx":1548
 *         Property data as bytes
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = sizeof(at.AudioStreamBasicDescription)  # Start with a reasonable size
 *     cdef char* buffer = <char*>malloc(data_size)
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1549
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 data_size = sizeof(at.AudioStreamBasicDescription)  # Start with a reasonable size             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*>malloc(data_size)
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = (sizeof(AudioStreamBasicDescription));

  /* "coremusic/capi.pyx":1550
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 data_size = sizeof(at.AudioStreamBasicDescription)  # Start with a reasonable size
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":1553
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  __pyx_t_1 = (__pyx_v_buffer == ((char *)0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1554
 * 
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __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_ERR(0, 1554, __pyx_L1_error)

    /* "coremusic/capi.pyx":1553
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":1556
 *         raise MemoryError("Failed to allocate buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1557
 * 
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileGetProperty"))
*/
    __pyx_v_status = ExtAudioFileGetProperty(__pyx_v_ext_file, __pyx_v_property_id, (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":1558
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileGetProperty"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":1559
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         result = buffer[:data_size]
*/
      __pyx_t_3 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileGetProperty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1559, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1559, __pyx_L5_error)

      /* "coremusic/capi.pyx":1558
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":1561
 *             raise RuntimeError(format_osstatus_error(status, "ExtAudioFileGetProperty"))
 * 
 *         result = buffer[:data_size]             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_data_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":1562
 * 
 *         result = buffer[:data_size]
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         free(buffer)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":1564
 *         return result
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1538
 * 
 * 
 * def extended_audio_file_get_property(long ext_file_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an ExtendedAudioFile
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1567
 * 
 * 
 * def extended_audio_file_set_property(long ext_file_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_101extended_audio_file_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_100extended_audio_file_set_property, "extended_audio_file_set_property(long ext_file_id, int property_id, bytes data)\n\nSet a property on an ExtendedAudioFile\n\nArgs:\n    ext_file_id: ExtAudioFile ID\n    property_id: Property ID\n    data: Property data as bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_101extended_audio_file_set_property = {"extended_audio_file_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_101extended_audio_file_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_100extended_audio_file_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_101extended_audio_file_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_ext_file_id;
  int __pyx_v_property_id;
  PyObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extended_audio_file_set_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ext_file_id,&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1567, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extended_audio_file_set_property", 0) < (0)) __PYX_ERR(0, 1567, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extended_audio_file_set_property", 1, 3, 3, i); __PYX_ERR(0, 1567, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1567, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1567, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1567, __pyx_L3_error)
    }
    __pyx_v_ext_file_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_ext_file_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extended_audio_file_set_property", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1567, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 1567, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_100extended_audio_file_set_property(__pyx_self, __pyx_v_ext_file_id, __pyx_v_property_id, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_100extended_audio_file_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id, int __pyx_v_property_id, PyObject *__pyx_v_data) {
  ExtAudioFileRef __pyx_v_ext_file;
  UInt32 __pyx_v_data_size;
  char *__pyx_v_buffer;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_set_property", 0);

  /* "coremusic/capi.pyx":1575
 *         data: Property data as bytes
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = len(data)
 *     cdef char* buffer = <char*><bytes>data
*/
  __pyx_v_ext_file = ((ExtAudioFileRef)__pyx_v_ext_file_id);

  /* "coremusic/capi.pyx":1576
 *     """
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 data_size = len(data)             # <<<<<<<<<<<<<<
 *     cdef char* buffer = <char*><bytes>data
 * 
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1576, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1576, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":1577
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.UInt32 data_size = len(data)
 *     cdef char* buffer = <char*><bytes>data             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1577, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":1579
 *     cdef char* buffer = <char*><bytes>data
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileSetProperty"))
*/
  __pyx_v_status = ExtAudioFileSetProperty(__pyx_v_ext_file, __pyx_v_property_id, __pyx_v_data_size, __pyx_v_buffer);

  /* "coremusic/capi.pyx":1580
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileSetProperty"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1581
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileSetProperty"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_ExtAudioFileSetProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __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_ERR(0, 1581, __pyx_L1_error)

    /* "coremusic/capi.pyx":1580
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "ExtAudioFileSetProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1567
 * 
 * 
 * def extended_audio_file_set_property(long ext_file_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an ExtendedAudioFile
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.extended_audio_file_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1585
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileDataFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_103get_extended_audio_file_property_file_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_102get_extended_audio_file_property_file_data_format, "get_extended_audio_file_property_file_data_format() -> int\n\nGet the file data format for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_103get_extended_audio_file_property_file_data_format = {"get_extended_audio_file_property_file_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_103get_extended_audio_file_property_file_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_102get_extended_audio_file_property_file_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_103get_extended_audio_file_property_file_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_file_data_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_102get_extended_audio_file_property_file_data_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_102get_extended_audio_file_property_file_data_format(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_file_data_format", 0);

  /* "coremusic/capi.pyx":1587
 * def get_extended_audio_file_property_file_data_format() -> int:
 *     """Get the file data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileDataFormat             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_FileDataFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1585
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileDataFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_file_data_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1589
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientDataFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_105get_extended_audio_file_property_client_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_104get_extended_audio_file_property_client_data_format, "get_extended_audio_file_property_client_data_format() -> int\n\nGet the client data format for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_105get_extended_audio_file_property_client_data_format = {"get_extended_audio_file_property_client_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_105get_extended_audio_file_property_client_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_104get_extended_audio_file_property_client_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_105get_extended_audio_file_property_client_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_client_data_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_104get_extended_audio_file_property_client_data_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_104get_extended_audio_file_property_client_data_format(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_client_data_format", 0);

  /* "coremusic/capi.pyx":1591
 * def get_extended_audio_file_property_client_data_format() -> int:
 *     """Get the client data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientDataFormat             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_ClientDataFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1591, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1589
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientDataFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_client_data_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1593
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileChannelLayout
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_107get_extended_audio_file_property_file_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_106get_extended_audio_file_property_file_channel_layout, "get_extended_audio_file_property_file_channel_layout() -> int\n\nGet the file channel layout for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_107get_extended_audio_file_property_file_channel_layout = {"get_extended_audio_file_property_file_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_107get_extended_audio_file_property_file_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_106get_extended_audio_file_property_file_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_107get_extended_audio_file_property_file_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_file_channel_layout (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_106get_extended_audio_file_property_file_channel_layout(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_106get_extended_audio_file_property_file_channel_layout(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_file_channel_layout", 0);

  /* "coremusic/capi.pyx":1595
 * def get_extended_audio_file_property_file_channel_layout() -> int:
 *     """Get the file channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileChannelLayout             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_FileChannelLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1595, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1593
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileChannelLayout
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_file_channel_layout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1597
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientChannelLayout
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_109get_extended_audio_file_property_client_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_108get_extended_audio_file_property_client_channel_layout, "get_extended_audio_file_property_client_channel_layout() -> int\n\nGet the client channel layout for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_109get_extended_audio_file_property_client_channel_layout = {"get_extended_audio_file_property_client_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_109get_extended_audio_file_property_client_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_108get_extended_audio_file_property_client_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_109get_extended_audio_file_property_client_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_client_channel_layout (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_108get_extended_audio_file_property_client_channel_layout(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_108get_extended_audio_file_property_client_channel_layout(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_client_channel_layout", 0);

  /* "coremusic/capi.pyx":1599
 * def get_extended_audio_file_property_client_channel_layout() -> int:
 *     """Get the client channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientChannelLayout             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_ClientChannelLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1597
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientChannelLayout
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_client_channel_layout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1601
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec manufacturer for an extended audio file"""
 *     return at.kExtAudioFileProperty_CodecManufacturer
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_111get_extended_audio_file_property_codec_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_110get_extended_audio_file_property_codec_manufacturer, "get_extended_audio_file_property_codec_manufacturer() -> int\n\nGet the codec manufacturer for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_111get_extended_audio_file_property_codec_manufacturer = {"get_extended_audio_file_property_codec_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_111get_extended_audio_file_property_codec_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_110get_extended_audio_file_property_codec_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_111get_extended_audio_file_property_codec_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_codec_manufacturer (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_110get_extended_audio_file_property_codec_manufacturer(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_110get_extended_audio_file_property_codec_manufacturer(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_codec_manufacturer", 0);

  /* "coremusic/capi.pyx":1603
 * def get_extended_audio_file_property_codec_manufacturer() -> int:
 *     """Get the codec manufacturer for an extended audio file"""
 *     return at.kExtAudioFileProperty_CodecManufacturer             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_audio_file() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_CodecManufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1601
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec manufacturer for an extended audio file"""
 *     return at.kExtAudioFileProperty_CodecManufacturer
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_codec_manufacturer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1605
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     """Get the audio file for an extended audio file"""
 *     return at.kExtAudioFileProperty_AudioFile
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_113get_extended_audio_file_property_audio_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_112get_extended_audio_file_property_audio_file, "get_extended_audio_file_property_audio_file() -> int\n\nGet the audio file for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_113get_extended_audio_file_property_audio_file = {"get_extended_audio_file_property_audio_file", (PyCFunction)__pyx_pw_9coremusic_4capi_113get_extended_audio_file_property_audio_file, METH_NOARGS, __pyx_doc_9coremusic_4capi_112get_extended_audio_file_property_audio_file};
static PyObject *__pyx_pw_9coremusic_4capi_113get_extended_audio_file_property_audio_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_audio_file (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_112get_extended_audio_file_property_audio_file(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_112get_extended_audio_file_property_audio_file(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_audio_file", 0);

  /* "coremusic/capi.pyx":1607
 * def get_extended_audio_file_property_audio_file() -> int:
 *     """Get the audio file for an extended audio file"""
 *     return at.kExtAudioFileProperty_AudioFile             # <<<<<<<<<<<<<<
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_AudioFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1605
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     """Get the audio file for an extended audio file"""
 *     return at.kExtAudioFileProperty_AudioFile
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_audio_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1609
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file length frames for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileLengthFrames
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_115get_extended_audio_file_property_file_length_frames(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_114get_extended_audio_file_property_file_length_frames, "get_extended_audio_file_property_file_length_frames() -> int\n\nGet the file length frames for an extended audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_115get_extended_audio_file_property_file_length_frames = {"get_extended_audio_file_property_file_length_frames", (PyCFunction)__pyx_pw_9coremusic_4capi_115get_extended_audio_file_property_file_length_frames, METH_NOARGS, __pyx_doc_9coremusic_4capi_114get_extended_audio_file_property_file_length_frames};
static PyObject *__pyx_pw_9coremusic_4capi_115get_extended_audio_file_property_file_length_frames(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_extended_audio_file_property_file_length_frames (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_114get_extended_audio_file_property_file_length_frames(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_114get_extended_audio_file_property_file_length_frames(CYTHON_UNUSED PyObject *__pyx_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_extended_audio_file_property_file_length_frames", 0);

  /* "coremusic/capi.pyx":1611
 * def get_extended_audio_file_property_file_length_frames() -> int:
 *     """Get the file length frames for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileLengthFrames             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kExtAudioFileProperty_FileLengthFrames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1609
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file length frames for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileLengthFrames
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_extended_audio_file_property_file_length_frames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1615
 * 
 * # Audio Queue Functions
 * cdef void audio_queue_output_callback(void* user_data, at.AudioQueueRef queue, at.AudioQueueBufferRef buffer) noexcept:             # <<<<<<<<<<<<<<
 *     """C callback function for audio queue output"""
 *     # This will be called by CoreAudio when it needs more audio data
*/

static void __pyx_f_9coremusic_4capi_audio_queue_output_callback(CYTHON_UNUSED void *__pyx_v_user_data, AudioQueueRef __pyx_v_queue, AudioQueueBufferRef __pyx_v_buffer) {
  CYTHON_UNUSED OSStatus __pyx_v_status;

  /* "coremusic/capi.pyx":1619
 *     # This will be called by CoreAudio when it needs more audio data
 *     # For now, we'll just enqueue the buffer again to keep playing
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_status = AudioQueueEnqueueBuffer(__pyx_v_queue, __pyx_v_buffer, 0, NULL);

  /* "coremusic/capi.pyx":1615
 * 
 * # Audio Queue Functions
 * cdef void audio_queue_output_callback(void* user_data, at.AudioQueueRef queue, at.AudioQueueBufferRef buffer) noexcept:             # <<<<<<<<<<<<<<
 *     """C callback function for audio queue output"""
 *     # This will be called by CoreAudio when it needs more audio data
*/

  /* function exit code */
}

/* "coremusic/capi.pyx":1622
 * 
 * 
 * def audio_queue_new_output(audio_format):             # <<<<<<<<<<<<<<
 *     """Create a new audio output queue"""
 *     cdef at.AudioStreamBasicDescription format
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_117audio_queue_new_output(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_116audio_queue_new_output, "audio_queue_new_output(audio_format)\n\nCreate a new audio output queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_117audio_queue_new_output = {"audio_queue_new_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_117audio_queue_new_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_116audio_queue_new_output};
static PyObject *__pyx_pw_9coremusic_4capi_117audio_queue_new_output(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_audio_format = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_new_output (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_format,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1622, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1622, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_new_output", 0) < (0)) __PYX_ERR(0, 1622, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_new_output", 1, 1, 1, i); __PYX_ERR(0, 1622, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1622, __pyx_L3_error)
    }
    __pyx_v_audio_format = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_new_output", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1622, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_new_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_116audio_queue_new_output(__pyx_self, __pyx_v_audio_format);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_116audio_queue_new_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_format) {
  AudioStreamBasicDescription __pyx_v_format;
  AudioQueueRef __pyx_v_queue;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_new_output", 0);

  /* "coremusic/capi.pyx":1628
 * 
 *     # Set up the audio format using helper
 *     dict_to_asbd(audio_format, &format)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueNewOutput(
*/
  __pyx_t_1 = __pyx_v_audio_format;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 1628, __pyx_L1_error)
  __pyx_f_9coremusic_4capi_dict_to_asbd(((PyObject*)__pyx_t_1), (&__pyx_v_format));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1630
 *     dict_to_asbd(audio_format, &format)
 * 
 *     cdef cf.OSStatus status = at.AudioQueueNewOutput(             # <<<<<<<<<<<<<<
 *         &format,
 *         audio_queue_output_callback,
*/
  __pyx_v_status = AudioQueueNewOutput((&__pyx_v_format), __pyx_f_9coremusic_4capi_audio_queue_output_callback, NULL, NULL, NULL, 0, (&__pyx_v_queue));

  /* "coremusic/capi.pyx":1640
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueNewOutput"))
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":1641
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueNewOutput"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>queue
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueNewOutput); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __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_ERR(0, 1641, __pyx_L1_error)

    /* "coremusic/capi.pyx":1640
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueNewOutput"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1643
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueNewOutput"))
 * 
 *     return <long>queue             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_queue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1622
 * 
 * 
 * def audio_queue_new_output(audio_format):             # <<<<<<<<<<<<<<
 *     """Create a new audio output queue"""
 *     cdef at.AudioStreamBasicDescription format
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_new_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1646
 * 
 * 
 * def audio_queue_allocate_buffer(long queue_id, int buffer_size):             # <<<<<<<<<<<<<<
 *     """Allocate a buffer for an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_119audio_queue_allocate_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_118audio_queue_allocate_buffer, "audio_queue_allocate_buffer(long queue_id, int buffer_size)\n\nAllocate a buffer for an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_119audio_queue_allocate_buffer = {"audio_queue_allocate_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_119audio_queue_allocate_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_118audio_queue_allocate_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_119audio_queue_allocate_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_queue_id;
  int __pyx_v_buffer_size;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_allocate_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_id,&__pyx_mstate_global->__pyx_n_u_buffer_size,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1646, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1646, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1646, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_allocate_buffer", 0) < (0)) __PYX_ERR(0, 1646, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_allocate_buffer", 1, 2, 2, i); __PYX_ERR(0, 1646, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1646, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1646, __pyx_L3_error)
    }
    __pyx_v_queue_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_queue_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1646, __pyx_L3_error)
    __pyx_v_buffer_size = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_buffer_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1646, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_allocate_buffer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1646, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_118audio_queue_allocate_buffer(__pyx_self, __pyx_v_queue_id, __pyx_v_buffer_size);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_118audio_queue_allocate_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_buffer_size) {
  AudioQueueRef __pyx_v_queue;
  AudioQueueBufferRef __pyx_v_buffer;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_allocate_buffer", 0);

  /* "coremusic/capi.pyx":1648
 * def audio_queue_allocate_buffer(long queue_id, int buffer_size):
 *     """Allocate a buffer for an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioQueueBufferRef buffer
 * 
*/
  __pyx_v_queue = ((AudioQueueRef)__pyx_v_queue_id);

  /* "coremusic/capi.pyx":1651
 *     cdef at.AudioQueueBufferRef buffer
 * 
 *     cdef cf.OSStatus status = at.AudioQueueAllocateBuffer(             # <<<<<<<<<<<<<<
 *         queue,
 *         <cf.UInt32>buffer_size,
*/
  __pyx_v_status = AudioQueueAllocateBuffer(__pyx_v_queue, ((UInt32)__pyx_v_buffer_size), (&__pyx_v_buffer));

  /* "coremusic/capi.pyx":1657
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueAllocateBuffer"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1658
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueAllocateBuffer"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>buffer
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueAllocateBuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __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_ERR(0, 1658, __pyx_L1_error)

    /* "coremusic/capi.pyx":1657
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueAllocateBuffer"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1660
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueAllocateBuffer"))
 * 
 *     return <long>buffer             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_buffer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1646
 * 
 * 
 * def audio_queue_allocate_buffer(long queue_id, int buffer_size):             # <<<<<<<<<<<<<<
 *     """Allocate a buffer for an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1663
 * 
 * 
 * def audio_queue_enqueue_buffer(long queue_id, long buffer_id):             # <<<<<<<<<<<<<<
 *     """Enqueue a buffer to an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_121audio_queue_enqueue_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_120audio_queue_enqueue_buffer, "audio_queue_enqueue_buffer(long queue_id, long buffer_id)\n\nEnqueue a buffer to an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_121audio_queue_enqueue_buffer = {"audio_queue_enqueue_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_121audio_queue_enqueue_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_120audio_queue_enqueue_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_121audio_queue_enqueue_buffer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_queue_id;
  long __pyx_v_buffer_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_enqueue_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_id,&__pyx_mstate_global->__pyx_n_u_buffer_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1663, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1663, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1663, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_enqueue_buffer", 0) < (0)) __PYX_ERR(0, 1663, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_enqueue_buffer", 1, 2, 2, i); __PYX_ERR(0, 1663, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1663, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1663, __pyx_L3_error)
    }
    __pyx_v_queue_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_queue_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1663, __pyx_L3_error)
    __pyx_v_buffer_id = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_buffer_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1663, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_enqueue_buffer", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1663, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_enqueue_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_120audio_queue_enqueue_buffer(__pyx_self, __pyx_v_queue_id, __pyx_v_buffer_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_120audio_queue_enqueue_buffer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, long __pyx_v_buffer_id) {
  AudioQueueRef __pyx_v_queue;
  AudioQueueBufferRef __pyx_v_buffer;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_enqueue_buffer", 0);

  /* "coremusic/capi.pyx":1665
 * def audio_queue_enqueue_buffer(long queue_id, long buffer_id):
 *     """Enqueue a buffer to an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioQueueBufferRef buffer = <at.AudioQueueBufferRef>buffer_id
 * 
*/
  __pyx_v_queue = ((AudioQueueRef)__pyx_v_queue_id);

  /* "coremusic/capi.pyx":1666
 *     """Enqueue a buffer to an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
 *     cdef at.AudioQueueBufferRef buffer = <at.AudioQueueBufferRef>buffer_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
*/
  __pyx_v_buffer = ((AudioQueueBufferRef)__pyx_v_buffer_id);

  /* "coremusic/capi.pyx":1668
 *     cdef at.AudioQueueBufferRef buffer = <at.AudioQueueBufferRef>buffer_id
 * 
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = AudioQueueEnqueueBuffer(__pyx_v_queue, __pyx_v_buffer, 0, NULL);

  /* "coremusic/capi.pyx":1670
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueEnqueueBuffer"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1671
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueEnqueueBuffer"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueEnqueueBuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __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_ERR(0, 1671, __pyx_L1_error)

    /* "coremusic/capi.pyx":1670
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueEnqueueBuffer"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1673
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueEnqueueBuffer"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1663
 * 
 * 
 * def audio_queue_enqueue_buffer(long queue_id, long buffer_id):             # <<<<<<<<<<<<<<
 *     """Enqueue a buffer to an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_enqueue_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1676
 * 
 * 
 * def audio_queue_start(long queue_id):             # <<<<<<<<<<<<<<
 *     """Start an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_123audio_queue_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_122audio_queue_start, "audio_queue_start(long queue_id)\n\nStart an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_123audio_queue_start = {"audio_queue_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_123audio_queue_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_122audio_queue_start};
static PyObject *__pyx_pw_9coremusic_4capi_123audio_queue_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_queue_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1676, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1676, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_start", 0) < (0)) __PYX_ERR(0, 1676, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_start", 1, 1, 1, i); __PYX_ERR(0, 1676, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1676, __pyx_L3_error)
    }
    __pyx_v_queue_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_queue_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1676, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1676, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_122audio_queue_start(__pyx_self, __pyx_v_queue_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_122audio_queue_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id) {
  AudioQueueRef __pyx_v_queue;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_start", 0);

  /* "coremusic/capi.pyx":1678
 * def audio_queue_start(long queue_id):
 *     """Start an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)
*/
  __pyx_v_queue = ((AudioQueueRef)__pyx_v_queue_id);

  /* "coremusic/capi.pyx":1680
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
 * 
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = AudioQueueStart(__pyx_v_queue, NULL);

  /* "coremusic/capi.pyx":1682
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStart"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1683
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStart"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueStart); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __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_ERR(0, 1683, __pyx_L1_error)

    /* "coremusic/capi.pyx":1682
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStart"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1685
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStart"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1676
 * 
 * 
 * def audio_queue_start(long queue_id):             # <<<<<<<<<<<<<<
 *     """Start an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1688
 * 
 * 
 * def audio_queue_stop(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Stop an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_125audio_queue_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_124audio_queue_stop, "audio_queue_stop(long queue_id, bool immediate=True)\n\nStop an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_125audio_queue_stop = {"audio_queue_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_125audio_queue_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_124audio_queue_stop};
static PyObject *__pyx_pw_9coremusic_4capi_125audio_queue_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_queue_id;
  int __pyx_v_immediate;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_id,&__pyx_mstate_global->__pyx_n_u_immediate,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1688, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_stop", 0) < (0)) __PYX_ERR(0, 1688, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_stop", 0, 1, 2, i); __PYX_ERR(0, 1688, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1688, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1688, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_queue_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_queue_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_immediate = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_immediate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L3_error)
    } else {
      __pyx_v_immediate = ((int)((int)1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_stop", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1688, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_124audio_queue_stop(__pyx_self, __pyx_v_queue_id, __pyx_v_immediate);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_124audio_queue_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate) {
  AudioQueueRef __pyx_v_queue;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_stop", 0);

  /* "coremusic/capi.pyx":1690
 * def audio_queue_stop(long queue_id, bint immediate=True):
 *     """Stop an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)
*/
  __pyx_v_queue = ((AudioQueueRef)__pyx_v_queue_id);

  /* "coremusic/capi.pyx":1692
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
 * 
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = AudioQueueStop(__pyx_v_queue, __pyx_v_immediate);

  /* "coremusic/capi.pyx":1694
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStop"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1695
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStop"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueStop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1695, __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_ERR(0, 1695, __pyx_L1_error)

    /* "coremusic/capi.pyx":1694
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStop"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1697
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueStop"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1688
 * 
 * 
 * def audio_queue_stop(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Stop an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1700
 * 
 * 
 * def audio_queue_dispose(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_127audio_queue_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_126audio_queue_dispose, "audio_queue_dispose(long queue_id, bool immediate=True)\n\nDispose of an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_127audio_queue_dispose = {"audio_queue_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_127audio_queue_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_126audio_queue_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_127audio_queue_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_queue_id;
  int __pyx_v_immediate;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_queue_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_id,&__pyx_mstate_global->__pyx_n_u_immediate,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1700, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1700, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1700, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_queue_dispose", 0) < (0)) __PYX_ERR(0, 1700, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_queue_dispose", 0, 1, 2, i); __PYX_ERR(0, 1700, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1700, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1700, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_queue_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_queue_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1700, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_immediate = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_immediate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1700, __pyx_L3_error)
    } else {
      __pyx_v_immediate = ((int)((int)1));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_dispose", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1700, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_queue_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_126audio_queue_dispose(__pyx_self, __pyx_v_queue_id, __pyx_v_immediate);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_126audio_queue_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate) {
  AudioQueueRef __pyx_v_queue;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_queue_dispose", 0);

  /* "coremusic/capi.pyx":1702
 * def audio_queue_dispose(long queue_id, bint immediate=True):
 *     """Dispose of an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)
*/
  __pyx_v_queue = ((AudioQueueRef)__pyx_v_queue_id);

  /* "coremusic/capi.pyx":1704
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
 * 
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = AudioQueueDispose(__pyx_v_queue, __pyx_v_immediate);

  /* "coremusic/capi.pyx":1706
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1707
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueDispose"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioQueueDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __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_ERR(0, 1707, __pyx_L1_error)

    /* "coremusic/capi.pyx":1706
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1709
 *         raise RuntimeError(format_osstatus_error(status, "AudioQueueDispose"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1700
 * 
 * 
 * def audio_queue_dispose(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_queue_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1739
 * # ============================================================================
 * 
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     """Get the linear PCM format for an audio format.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_129get_audio_format_linear_pcm(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_128get_audio_format_linear_pcm, "get_audio_format_linear_pcm()\n\nGet the linear PCM format for an audio format.\n\n.. deprecated::\n    Use ``coremusic.constants.AudioFormatID.LINEAR_PCM`` instead.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_129get_audio_format_linear_pcm = {"get_audio_format_linear_pcm", (PyCFunction)__pyx_pw_9coremusic_4capi_129get_audio_format_linear_pcm, METH_NOARGS, __pyx_doc_9coremusic_4capi_128get_audio_format_linear_pcm};
static PyObject *__pyx_pw_9coremusic_4capi_129get_audio_format_linear_pcm(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_format_linear_pcm (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_128get_audio_format_linear_pcm(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_128get_audio_format_linear_pcm(CYTHON_UNUSED PyObject *__pyx_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_audio_format_linear_pcm", 0);

  /* "coremusic/capi.pyx":1745
 *         Use ``coremusic.constants.AudioFormatID.LINEAR_PCM`` instead.
 *     """
 *     return ca.kAudioFormatLinearPCM             # <<<<<<<<<<<<<<
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1739
 * # ============================================================================
 * 
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     """Get the linear PCM format for an audio format.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_format_linear_pcm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1747
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     """Get the signed integer flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_131get_linear_pcm_format_flag_is_signed_integer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_130get_linear_pcm_format_flag_is_signed_integer, "get_linear_pcm_format_flag_is_signed_integer()\n\nGet the signed integer flag for a linear PCM format");
static PyMethodDef __pyx_mdef_9coremusic_4capi_131get_linear_pcm_format_flag_is_signed_integer = {"get_linear_pcm_format_flag_is_signed_integer", (PyCFunction)__pyx_pw_9coremusic_4capi_131get_linear_pcm_format_flag_is_signed_integer, METH_NOARGS, __pyx_doc_9coremusic_4capi_130get_linear_pcm_format_flag_is_signed_integer};
static PyObject *__pyx_pw_9coremusic_4capi_131get_linear_pcm_format_flag_is_signed_integer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_linear_pcm_format_flag_is_signed_integer (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_130get_linear_pcm_format_flag_is_signed_integer(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_130get_linear_pcm_format_flag_is_signed_integer(CYTHON_UNUSED PyObject *__pyx_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_linear_pcm_format_flag_is_signed_integer", 0);

  /* "coremusic/capi.pyx":1749
 * def get_linear_pcm_format_flag_is_signed_integer():
 *     """Get the signed integer flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsSignedInteger             # <<<<<<<<<<<<<<
 * 
 * def get_linear_pcm_format_flag_is_packed():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kLinearPCMFormatFlagIsSignedInteger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1747
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     """Get the signed integer flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_linear_pcm_format_flag_is_signed_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1751
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     """Get the packed flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsPacked
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_133get_linear_pcm_format_flag_is_packed(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_132get_linear_pcm_format_flag_is_packed, "get_linear_pcm_format_flag_is_packed()\n\nGet the packed flag for a linear PCM format");
static PyMethodDef __pyx_mdef_9coremusic_4capi_133get_linear_pcm_format_flag_is_packed = {"get_linear_pcm_format_flag_is_packed", (PyCFunction)__pyx_pw_9coremusic_4capi_133get_linear_pcm_format_flag_is_packed, METH_NOARGS, __pyx_doc_9coremusic_4capi_132get_linear_pcm_format_flag_is_packed};
static PyObject *__pyx_pw_9coremusic_4capi_133get_linear_pcm_format_flag_is_packed(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_linear_pcm_format_flag_is_packed (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_132get_linear_pcm_format_flag_is_packed(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_132get_linear_pcm_format_flag_is_packed(CYTHON_UNUSED PyObject *__pyx_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_linear_pcm_format_flag_is_packed", 0);

  /* "coremusic/capi.pyx":1753
 * def get_linear_pcm_format_flag_is_packed():
 *     """Get the packed flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsPacked             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_wave_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kLinearPCMFormatFlagIsPacked); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1751
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     """Get the packed flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsPacked
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_linear_pcm_format_flag_is_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1755
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     """Get the wave type for an audio file"""
 *     return at.kAudioFileWAVEType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_135get_audio_file_wave_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_134get_audio_file_wave_type, "get_audio_file_wave_type()\n\nGet the wave type for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_135get_audio_file_wave_type = {"get_audio_file_wave_type", (PyCFunction)__pyx_pw_9coremusic_4capi_135get_audio_file_wave_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_134get_audio_file_wave_type};
static PyObject *__pyx_pw_9coremusic_4capi_135get_audio_file_wave_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_wave_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_134get_audio_file_wave_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_134get_audio_file_wave_type(CYTHON_UNUSED PyObject *__pyx_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_audio_file_wave_type", 0);

  /* "coremusic/capi.pyx":1757
 * def get_audio_file_wave_type():
 *     """Get the wave type for an audio file"""
 *     return at.kAudioFileWAVEType             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_read_permission():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileWAVEType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1755
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     """Get the wave type for an audio file"""
 *     return at.kAudioFileWAVEType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_wave_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1759
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     """Get the read permission for an audio file"""
 *     return at.kAudioFileReadPermission
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_137get_audio_file_read_permission(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_136get_audio_file_read_permission, "get_audio_file_read_permission()\n\nGet the read permission for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_137get_audio_file_read_permission = {"get_audio_file_read_permission", (PyCFunction)__pyx_pw_9coremusic_4capi_137get_audio_file_read_permission, METH_NOARGS, __pyx_doc_9coremusic_4capi_136get_audio_file_read_permission};
static PyObject *__pyx_pw_9coremusic_4capi_137get_audio_file_read_permission(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_read_permission (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_136get_audio_file_read_permission(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_136get_audio_file_read_permission(CYTHON_UNUSED PyObject *__pyx_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_audio_file_read_permission", 0);

  /* "coremusic/capi.pyx":1761
 * def get_audio_file_read_permission():
 *     """Get the read permission for an audio file"""
 *     return at.kAudioFileReadPermission             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_property_data_format():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileReadPermission); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1759
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     """Get the read permission for an audio file"""
 *     return at.kAudioFileReadPermission
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_read_permission", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1763
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file"""
 *     return at.kAudioFilePropertyDataFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_139get_audio_file_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_138get_audio_file_property_data_format, "get_audio_file_property_data_format()\n\nGet the data format for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_139get_audio_file_property_data_format = {"get_audio_file_property_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_139get_audio_file_property_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_138get_audio_file_property_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_139get_audio_file_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_property_data_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_138get_audio_file_property_data_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_138get_audio_file_property_data_format(CYTHON_UNUSED PyObject *__pyx_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_audio_file_property_data_format", 0);

  /* "coremusic/capi.pyx":1765
 * def get_audio_file_property_data_format():
 *     """Get the data format for an audio file"""
 *     return at.kAudioFilePropertyDataFormat             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_property_maximum_packet_size():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFilePropertyDataFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1763
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file"""
 *     return at.kAudioFilePropertyDataFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_property_data_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1767
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file"""
 *     return at.kAudioFilePropertyMaximumPacketSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_141get_audio_file_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_140get_audio_file_property_maximum_packet_size, "get_audio_file_property_maximum_packet_size()\n\nGet the maximum packet size for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_141get_audio_file_property_maximum_packet_size = {"get_audio_file_property_maximum_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_141get_audio_file_property_maximum_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_140get_audio_file_property_maximum_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_141get_audio_file_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_property_maximum_packet_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_140get_audio_file_property_maximum_packet_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_140get_audio_file_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_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_audio_file_property_maximum_packet_size", 0);

  /* "coremusic/capi.pyx":1769
 * def get_audio_file_property_maximum_packet_size():
 *     """Get the maximum packet size for an audio file"""
 *     return at.kAudioFilePropertyMaximumPacketSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_property_audio_data_packet_count():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFilePropertyMaximumPacketSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1767
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file"""
 *     return at.kAudioFilePropertyMaximumPacketSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_property_maximum_packet_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1771
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file"""
 *     return at.kAudioFilePropertyAudioDataPacketCount
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_143get_audio_file_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_142get_audio_file_property_audio_data_packet_count, "get_audio_file_property_audio_data_packet_count()\n\nGet the audio data packet count for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_143get_audio_file_property_audio_data_packet_count = {"get_audio_file_property_audio_data_packet_count", (PyCFunction)__pyx_pw_9coremusic_4capi_143get_audio_file_property_audio_data_packet_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_142get_audio_file_property_audio_data_packet_count};
static PyObject *__pyx_pw_9coremusic_4capi_143get_audio_file_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_property_audio_data_packet_count (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_142get_audio_file_property_audio_data_packet_count(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_142get_audio_file_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_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_audio_file_property_audio_data_packet_count", 0);

  /* "coremusic/capi.pyx":1773
 * def get_audio_file_property_audio_data_packet_count():
 *     """Get the audio data packet count for an audio file"""
 *     return at.kAudioFilePropertyAudioDataPacketCount             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_property_estimated_duration():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFilePropertyAudioDataPacketCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1771
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file"""
 *     return at.kAudioFilePropertyAudioDataPacketCount
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_property_audio_data_packet_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1775
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     """Get the estimated duration for an audio file"""
 *     return at.kAudioFilePropertyEstimatedDuration
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_145get_audio_file_property_estimated_duration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_144get_audio_file_property_estimated_duration, "get_audio_file_property_estimated_duration()\n\nGet the estimated duration for an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_145get_audio_file_property_estimated_duration = {"get_audio_file_property_estimated_duration", (PyCFunction)__pyx_pw_9coremusic_4capi_145get_audio_file_property_estimated_duration, METH_NOARGS, __pyx_doc_9coremusic_4capi_144get_audio_file_property_estimated_duration};
static PyObject *__pyx_pw_9coremusic_4capi_145get_audio_file_property_estimated_duration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_property_estimated_duration (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_144get_audio_file_property_estimated_duration(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_144get_audio_file_property_estimated_duration(CYTHON_UNUSED PyObject *__pyx_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_audio_file_property_estimated_duration", 0);

  /* "coremusic/capi.pyx":1777
 * def get_audio_file_property_estimated_duration():
 *     """Get the estimated duration for an audio file"""
 *     return at.kAudioFilePropertyEstimatedDuration             # <<<<<<<<<<<<<<
 * 
 * # AudioObject/Device property constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFilePropertyEstimatedDuration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1775
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     """Get the estimated duration for an audio file"""
 *     return at.kAudioFilePropertyEstimatedDuration
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_property_estimated_duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1780
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     """Get the name for an audio object"""
 *     return ca.kAudioObjectPropertyName
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_147get_audio_object_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_146get_audio_object_property_name, "get_audio_object_property_name()\n\nGet the name for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_147get_audio_object_property_name = {"get_audio_object_property_name", (PyCFunction)__pyx_pw_9coremusic_4capi_147get_audio_object_property_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_146get_audio_object_property_name};
static PyObject *__pyx_pw_9coremusic_4capi_147get_audio_object_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_name (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_146get_audio_object_property_name(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_146get_audio_object_property_name(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_name", 0);

  /* "coremusic/capi.pyx":1782
 * def get_audio_object_property_name():
 *     """Get the name for an audio object"""
 *     return ca.kAudioObjectPropertyName             # <<<<<<<<<<<<<<
 * 
 * def get_audio_object_property_manufacturer():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1780
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     """Get the name for an audio object"""
 *     return ca.kAudioObjectPropertyName
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1784
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the manufacturer for an audio object"""
 *     return ca.kAudioObjectPropertyManufacturer
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_149get_audio_object_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_148get_audio_object_property_manufacturer, "get_audio_object_property_manufacturer()\n\nGet the manufacturer for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_149get_audio_object_property_manufacturer = {"get_audio_object_property_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_149get_audio_object_property_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_148get_audio_object_property_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_149get_audio_object_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_manufacturer (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_148get_audio_object_property_manufacturer(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_148get_audio_object_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_manufacturer", 0);

  /* "coremusic/capi.pyx":1786
 * def get_audio_object_property_manufacturer():
 *     """Get the manufacturer for an audio object"""
 *     return ca.kAudioObjectPropertyManufacturer             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_device_uid():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyManufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1784
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the manufacturer for an audio object"""
 *     return ca.kAudioObjectPropertyManufacturer
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_manufacturer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1788
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     """Get the device UID for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceUID
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_151get_audio_device_property_device_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_150get_audio_device_property_device_uid, "get_audio_device_property_device_uid()\n\nGet the device UID for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_151get_audio_device_property_device_uid = {"get_audio_device_property_device_uid", (PyCFunction)__pyx_pw_9coremusic_4capi_151get_audio_device_property_device_uid, METH_NOARGS, __pyx_doc_9coremusic_4capi_150get_audio_device_property_device_uid};
static PyObject *__pyx_pw_9coremusic_4capi_151get_audio_device_property_device_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_device_uid (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_150get_audio_device_property_device_uid(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_150get_audio_device_property_device_uid(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_device_uid", 0);

  /* "coremusic/capi.pyx":1790
 * def get_audio_device_property_device_uid():
 *     """Get the device UID for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceUID             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_model_uid():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyDeviceUID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1788
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     """Get the device UID for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceUID
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_device_uid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1792
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     """Get the model UID for an audio device"""
 *     return ca.kAudioDevicePropertyModelUID
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_153get_audio_device_property_model_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_152get_audio_device_property_model_uid, "get_audio_device_property_model_uid()\n\nGet the model UID for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_153get_audio_device_property_model_uid = {"get_audio_device_property_model_uid", (PyCFunction)__pyx_pw_9coremusic_4capi_153get_audio_device_property_model_uid, METH_NOARGS, __pyx_doc_9coremusic_4capi_152get_audio_device_property_model_uid};
static PyObject *__pyx_pw_9coremusic_4capi_153get_audio_device_property_model_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_model_uid (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_152get_audio_device_property_model_uid(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_152get_audio_device_property_model_uid(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_model_uid", 0);

  /* "coremusic/capi.pyx":1794
 * def get_audio_device_property_model_uid():
 *     """Get the model UID for an audio device"""
 *     return ca.kAudioDevicePropertyModelUID             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_transport_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyModelUID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1792
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     """Get the model UID for an audio device"""
 *     return ca.kAudioDevicePropertyModelUID
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_model_uid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1796
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     """Get the transport type for an audio device"""
 *     return ca.kAudioDevicePropertyTransportType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_155get_audio_device_property_transport_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_154get_audio_device_property_transport_type, "get_audio_device_property_transport_type()\n\nGet the transport type for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_155get_audio_device_property_transport_type = {"get_audio_device_property_transport_type", (PyCFunction)__pyx_pw_9coremusic_4capi_155get_audio_device_property_transport_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_154get_audio_device_property_transport_type};
static PyObject *__pyx_pw_9coremusic_4capi_155get_audio_device_property_transport_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_transport_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_154get_audio_device_property_transport_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_154get_audio_device_property_transport_type(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_transport_type", 0);

  /* "coremusic/capi.pyx":1798
 * def get_audio_device_property_transport_type():
 *     """Get the transport type for an audio device"""
 *     return ca.kAudioDevicePropertyTransportType             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_device_is_alive():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyTransportType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1796
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     """Get the transport type for an audio device"""
 *     return ca.kAudioDevicePropertyTransportType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_transport_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1800
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     """Get the device is alive for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceIsAlive
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_157get_audio_device_property_device_is_alive(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_156get_audio_device_property_device_is_alive, "get_audio_device_property_device_is_alive()\n\nGet the device is alive for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_157get_audio_device_property_device_is_alive = {"get_audio_device_property_device_is_alive", (PyCFunction)__pyx_pw_9coremusic_4capi_157get_audio_device_property_device_is_alive, METH_NOARGS, __pyx_doc_9coremusic_4capi_156get_audio_device_property_device_is_alive};
static PyObject *__pyx_pw_9coremusic_4capi_157get_audio_device_property_device_is_alive(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_device_is_alive (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_156get_audio_device_property_device_is_alive(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_156get_audio_device_property_device_is_alive(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_device_is_alive", 0);

  /* "coremusic/capi.pyx":1802
 * def get_audio_device_property_device_is_alive():
 *     """Get the device is alive for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceIsAlive             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_nominal_sample_rate():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyDeviceIsAlive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1800
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     """Get the device is alive for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceIsAlive
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_device_is_alive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1804
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     """Get the nominal sample rate for an audio device"""
 *     return ca.kAudioDevicePropertyNominalSampleRate
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_159get_audio_device_property_nominal_sample_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_158get_audio_device_property_nominal_sample_rate, "get_audio_device_property_nominal_sample_rate()\n\nGet the nominal sample rate for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_159get_audio_device_property_nominal_sample_rate = {"get_audio_device_property_nominal_sample_rate", (PyCFunction)__pyx_pw_9coremusic_4capi_159get_audio_device_property_nominal_sample_rate, METH_NOARGS, __pyx_doc_9coremusic_4capi_158get_audio_device_property_nominal_sample_rate};
static PyObject *__pyx_pw_9coremusic_4capi_159get_audio_device_property_nominal_sample_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_nominal_sample_rate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_158get_audio_device_property_nominal_sample_rate(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_158get_audio_device_property_nominal_sample_rate(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_nominal_sample_rate", 0);

  /* "coremusic/capi.pyx":1806
 * def get_audio_device_property_nominal_sample_rate():
 *     """Get the nominal sample rate for an audio device"""
 *     return ca.kAudioDevicePropertyNominalSampleRate             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_available_nominal_sample_rates():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyNominalSampleRate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1804
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     """Get the nominal sample rate for an audio device"""
 *     return ca.kAudioDevicePropertyNominalSampleRate
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_nominal_sample_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1808
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     """Get the available nominal sample rates for an audio device"""
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_161get_audio_device_property_available_nominal_sample_rates(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_160get_audio_device_property_available_nominal_sample_rates, "get_audio_device_property_available_nominal_sample_rates()\n\nGet the available nominal sample rates for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_161get_audio_device_property_available_nominal_sample_rates = {"get_audio_device_property_available_nominal_sample_rates", (PyCFunction)__pyx_pw_9coremusic_4capi_161get_audio_device_property_available_nominal_sample_rates, METH_NOARGS, __pyx_doc_9coremusic_4capi_160get_audio_device_property_available_nominal_sample_rates};
static PyObject *__pyx_pw_9coremusic_4capi_161get_audio_device_property_available_nominal_sample_rates(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_available_nominal_sample_rates (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_160get_audio_device_property_available_nominal_sample_rates(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_160get_audio_device_property_available_nominal_sample_rates(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_available_nominal_sample_rates", 0);

  /* "coremusic/capi.pyx":1810
 * def get_audio_device_property_available_nominal_sample_rates():
 *     """Get the available nominal sample rates for an audio device"""
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_is_hidden():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyAvailableNominalSampleRates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1808
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     """Get the available nominal sample rates for an audio device"""
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_available_nominal_sample_rates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1812
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     """Get the is hidden for an audio device"""
 *     return ca.kAudioDevicePropertyIsHidden
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_163get_audio_device_property_is_hidden(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_162get_audio_device_property_is_hidden, "get_audio_device_property_is_hidden()\n\nGet the is hidden for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_163get_audio_device_property_is_hidden = {"get_audio_device_property_is_hidden", (PyCFunction)__pyx_pw_9coremusic_4capi_163get_audio_device_property_is_hidden, METH_NOARGS, __pyx_doc_9coremusic_4capi_162get_audio_device_property_is_hidden};
static PyObject *__pyx_pw_9coremusic_4capi_163get_audio_device_property_is_hidden(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_is_hidden (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_162get_audio_device_property_is_hidden(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_162get_audio_device_property_is_hidden(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_is_hidden", 0);

  /* "coremusic/capi.pyx":1814
 * def get_audio_device_property_is_hidden():
 *     """Get the is hidden for an audio device"""
 *     return ca.kAudioDevicePropertyIsHidden             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyIsHidden); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1812
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     """Get the is hidden for an audio device"""
 *     return ca.kAudioDevicePropertyIsHidden
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_is_hidden", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1816
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     """Get the preferred channels for stereo for an audio device"""
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_165get_audio_device_property_preferred_channels_for_stereo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_164get_audio_device_property_preferred_channels_for_stereo, "get_audio_device_property_preferred_channels_for_stereo()\n\nGet the preferred channels for stereo for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_165get_audio_device_property_preferred_channels_for_stereo = {"get_audio_device_property_preferred_channels_for_stereo", (PyCFunction)__pyx_pw_9coremusic_4capi_165get_audio_device_property_preferred_channels_for_stereo, METH_NOARGS, __pyx_doc_9coremusic_4capi_164get_audio_device_property_preferred_channels_for_stereo};
static PyObject *__pyx_pw_9coremusic_4capi_165get_audio_device_property_preferred_channels_for_stereo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_preferred_channels_for_stereo (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_164get_audio_device_property_preferred_channels_for_stereo(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_164get_audio_device_property_preferred_channels_for_stereo(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_preferred_channels_for_stereo", 0);

  /* "coremusic/capi.pyx":1818
 * def get_audio_device_property_preferred_channels_for_stereo():
 *     """Get the preferred channels for stereo for an audio device"""
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_stream_configuration():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyPreferredChannelsForStereo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1816
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     """Get the preferred channels for stereo for an audio device"""
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_preferred_channels_for_stereo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1820
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     """Get the stream configuration for an audio device"""
 *     return ca.kAudioDevicePropertyStreamConfiguration
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_167get_audio_device_property_stream_configuration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_166get_audio_device_property_stream_configuration, "get_audio_device_property_stream_configuration()\n\nGet the stream configuration for an audio device");
static PyMethodDef __pyx_mdef_9coremusic_4capi_167get_audio_device_property_stream_configuration = {"get_audio_device_property_stream_configuration", (PyCFunction)__pyx_pw_9coremusic_4capi_167get_audio_device_property_stream_configuration, METH_NOARGS, __pyx_doc_9coremusic_4capi_166get_audio_device_property_stream_configuration};
static PyObject *__pyx_pw_9coremusic_4capi_167get_audio_device_property_stream_configuration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_stream_configuration (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_166get_audio_device_property_stream_configuration(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_166get_audio_device_property_stream_configuration(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_stream_configuration", 0);

  /* "coremusic/capi.pyx":1822
 * def get_audio_device_property_stream_configuration():
 *     """Get the stream configuration for an audio device"""
 *     return ca.kAudioDevicePropertyStreamConfiguration             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_volume_scalar():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyStreamConfiguration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1820
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     """Get the stream configuration for an audio device"""
 *     return ca.kAudioDevicePropertyStreamConfiguration
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_stream_configuration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1824
 *     return ca.kAudioDevicePropertyStreamConfiguration
 * 
 * def get_audio_device_property_volume_scalar():             # <<<<<<<<<<<<<<
 *     """Get the volume scalar property selector (0.0-1.0)"""
 *     return ca.kAudioDevicePropertyVolumeScalar
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_169get_audio_device_property_volume_scalar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_168get_audio_device_property_volume_scalar, "get_audio_device_property_volume_scalar()\n\nGet the volume scalar property selector (0.0-1.0)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_169get_audio_device_property_volume_scalar = {"get_audio_device_property_volume_scalar", (PyCFunction)__pyx_pw_9coremusic_4capi_169get_audio_device_property_volume_scalar, METH_NOARGS, __pyx_doc_9coremusic_4capi_168get_audio_device_property_volume_scalar};
static PyObject *__pyx_pw_9coremusic_4capi_169get_audio_device_property_volume_scalar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_volume_scalar (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_168get_audio_device_property_volume_scalar(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_168get_audio_device_property_volume_scalar(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_volume_scalar", 0);

  /* "coremusic/capi.pyx":1826
 * def get_audio_device_property_volume_scalar():
 *     """Get the volume scalar property selector (0.0-1.0)"""
 *     return ca.kAudioDevicePropertyVolumeScalar             # <<<<<<<<<<<<<<
 * 
 * def get_audio_device_property_mute():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyVolumeScalar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1824
 *     return ca.kAudioDevicePropertyStreamConfiguration
 * 
 * def get_audio_device_property_volume_scalar():             # <<<<<<<<<<<<<<
 *     """Get the volume scalar property selector (0.0-1.0)"""
 *     return ca.kAudioDevicePropertyVolumeScalar
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_volume_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1828
 *     return ca.kAudioDevicePropertyVolumeScalar
 * 
 * def get_audio_device_property_mute():             # <<<<<<<<<<<<<<
 *     """Get the mute property selector"""
 *     return ca.kAudioDevicePropertyMute
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_171get_audio_device_property_mute(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_170get_audio_device_property_mute, "get_audio_device_property_mute()\n\nGet the mute property selector");
static PyMethodDef __pyx_mdef_9coremusic_4capi_171get_audio_device_property_mute = {"get_audio_device_property_mute", (PyCFunction)__pyx_pw_9coremusic_4capi_171get_audio_device_property_mute, METH_NOARGS, __pyx_doc_9coremusic_4capi_170get_audio_device_property_mute};
static PyObject *__pyx_pw_9coremusic_4capi_171get_audio_device_property_mute(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_device_property_mute (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_170get_audio_device_property_mute(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_170get_audio_device_property_mute(CYTHON_UNUSED PyObject *__pyx_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_audio_device_property_mute", 0);

  /* "coremusic/capi.pyx":1830
 * def get_audio_device_property_mute():
 *     """Get the mute property selector"""
 *     return ca.kAudioDevicePropertyMute             # <<<<<<<<<<<<<<
 * 
 * def get_audio_hardware_property_default_output_device():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyMute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1828
 *     return ca.kAudioDevicePropertyVolumeScalar
 * 
 * def get_audio_device_property_mute():             # <<<<<<<<<<<<<<
 *     """Get the mute property selector"""
 *     return ca.kAudioDevicePropertyMute
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_device_property_mute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1832
 *     return ca.kAudioDevicePropertyMute
 * 
 * def get_audio_hardware_property_default_output_device():             # <<<<<<<<<<<<<<
 *     """Get the default output device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_173get_audio_hardware_property_default_output_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_172get_audio_hardware_property_default_output_device, "get_audio_hardware_property_default_output_device()\n\nGet the default output device property selector");
static PyMethodDef __pyx_mdef_9coremusic_4capi_173get_audio_hardware_property_default_output_device = {"get_audio_hardware_property_default_output_device", (PyCFunction)__pyx_pw_9coremusic_4capi_173get_audio_hardware_property_default_output_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_172get_audio_hardware_property_default_output_device};
static PyObject *__pyx_pw_9coremusic_4capi_173get_audio_hardware_property_default_output_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_hardware_property_default_output_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_172get_audio_hardware_property_default_output_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_172get_audio_hardware_property_default_output_device(CYTHON_UNUSED PyObject *__pyx_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_audio_hardware_property_default_output_device", 0);

  /* "coremusic/capi.pyx":1834
 * def get_audio_hardware_property_default_output_device():
 *     """Get the default output device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice             # <<<<<<<<<<<<<<
 * 
 * def get_audio_hardware_property_default_input_device():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioHardwarePropertyDefaultOutputDevice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1832
 *     return ca.kAudioDevicePropertyMute
 * 
 * def get_audio_hardware_property_default_output_device():             # <<<<<<<<<<<<<<
 *     """Get the default output device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_hardware_property_default_output_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1836
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
 * 
 * def get_audio_hardware_property_default_input_device():             # <<<<<<<<<<<<<<
 *     """Get the default input device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultInputDevice
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_175get_audio_hardware_property_default_input_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_174get_audio_hardware_property_default_input_device, "get_audio_hardware_property_default_input_device()\n\nGet the default input device property selector");
static PyMethodDef __pyx_mdef_9coremusic_4capi_175get_audio_hardware_property_default_input_device = {"get_audio_hardware_property_default_input_device", (PyCFunction)__pyx_pw_9coremusic_4capi_175get_audio_hardware_property_default_input_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_174get_audio_hardware_property_default_input_device};
static PyObject *__pyx_pw_9coremusic_4capi_175get_audio_hardware_property_default_input_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_hardware_property_default_input_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_174get_audio_hardware_property_default_input_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_174get_audio_hardware_property_default_input_device(CYTHON_UNUSED PyObject *__pyx_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_audio_hardware_property_default_input_device", 0);

  /* "coremusic/capi.pyx":1838
 * def get_audio_hardware_property_default_input_device():
 *     """Get the default input device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultInputDevice             # <<<<<<<<<<<<<<
 * 
 * # AudioObject scope constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioHardwarePropertyDefaultInputDevice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1836
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
 * 
 * def get_audio_hardware_property_default_input_device():             # <<<<<<<<<<<<<<
 *     """Get the default input device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultInputDevice
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_hardware_property_default_input_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1841
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeGlobal
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_177get_audio_object_property_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_176get_audio_object_property_scope_global, "get_audio_object_property_scope_global()\n\nGet the global scope for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_177get_audio_object_property_scope_global = {"get_audio_object_property_scope_global", (PyCFunction)__pyx_pw_9coremusic_4capi_177get_audio_object_property_scope_global, METH_NOARGS, __pyx_doc_9coremusic_4capi_176get_audio_object_property_scope_global};
static PyObject *__pyx_pw_9coremusic_4capi_177get_audio_object_property_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_scope_global (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_176get_audio_object_property_scope_global(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_176get_audio_object_property_scope_global(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_scope_global", 0);

  /* "coremusic/capi.pyx":1843
 * def get_audio_object_property_scope_global():
 *     """Get the global scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeGlobal             # <<<<<<<<<<<<<<
 * 
 * def get_audio_object_property_scope_input():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyScopeGlobal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1841
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeGlobal
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_scope_global", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1845
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeInput
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_179get_audio_object_property_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_178get_audio_object_property_scope_input, "get_audio_object_property_scope_input()\n\nGet the input scope for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_179get_audio_object_property_scope_input = {"get_audio_object_property_scope_input", (PyCFunction)__pyx_pw_9coremusic_4capi_179get_audio_object_property_scope_input, METH_NOARGS, __pyx_doc_9coremusic_4capi_178get_audio_object_property_scope_input};
static PyObject *__pyx_pw_9coremusic_4capi_179get_audio_object_property_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_scope_input (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_178get_audio_object_property_scope_input(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_178get_audio_object_property_scope_input(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_scope_input", 0);

  /* "coremusic/capi.pyx":1847
 * def get_audio_object_property_scope_input():
 *     """Get the input scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeInput             # <<<<<<<<<<<<<<
 * 
 * def get_audio_object_property_scope_output():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyScopeInput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1845
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeInput
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_scope_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1849
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeOutput
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_181get_audio_object_property_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_180get_audio_object_property_scope_output, "get_audio_object_property_scope_output()\n\nGet the output scope for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_181get_audio_object_property_scope_output = {"get_audio_object_property_scope_output", (PyCFunction)__pyx_pw_9coremusic_4capi_181get_audio_object_property_scope_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_180get_audio_object_property_scope_output};
static PyObject *__pyx_pw_9coremusic_4capi_181get_audio_object_property_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_scope_output (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_180get_audio_object_property_scope_output(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_180get_audio_object_property_scope_output(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_scope_output", 0);

  /* "coremusic/capi.pyx":1851
 * def get_audio_object_property_scope_output():
 *     """Get the output scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeOutput             # <<<<<<<<<<<<<<
 * 
 * def get_audio_object_property_element_main():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyScopeOutput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1849
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeOutput
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_scope_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1853
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     """Get the main element for an audio object"""
 *     return ca.kAudioObjectPropertyElementMain
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_183get_audio_object_property_element_main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_182get_audio_object_property_element_main, "get_audio_object_property_element_main()\n\nGet the main element for an audio object");
static PyMethodDef __pyx_mdef_9coremusic_4capi_183get_audio_object_property_element_main = {"get_audio_object_property_element_main", (PyCFunction)__pyx_pw_9coremusic_4capi_183get_audio_object_property_element_main, METH_NOARGS, __pyx_doc_9coremusic_4capi_182get_audio_object_property_element_main};
static PyObject *__pyx_pw_9coremusic_4capi_183get_audio_object_property_element_main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_object_property_element_main (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_182get_audio_object_property_element_main(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_182get_audio_object_property_element_main(CYTHON_UNUSED PyObject *__pyx_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_audio_object_property_element_main", 0);

  /* "coremusic/capi.pyx":1855
 * def get_audio_object_property_element_main():
 *     """Get the main element for an audio object"""
 *     return ca.kAudioObjectPropertyElementMain             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioObjectPropertyElementMain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1853
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     """Get the main element for an audio object"""
 *     return ca.kAudioObjectPropertyElementMain
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_object_property_element_main", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1859
 * 
 * # AudioComponent Functions
 * def audio_component_find_next(description_dict, long previous_component_id=0):             # <<<<<<<<<<<<<<
 *     """Find an audio component matching the description
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_185audio_component_find_next(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_184audio_component_find_next, "audio_component_find_next(description_dict, long previous_component_id=0)\n\nFind an audio component matching the description\n\nArgs:\n    description_dict: Dictionary with keys 'type', 'subtype', 'manufacturer', 'flags', 'flags_mask'\n    previous_component_id: Optional component ID to continue searching from (for iteration)\n\nReturns:\n    Component ID (long) or None if no more components found");
static PyMethodDef __pyx_mdef_9coremusic_4capi_185audio_component_find_next = {"audio_component_find_next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_185audio_component_find_next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_184audio_component_find_next};
static PyObject *__pyx_pw_9coremusic_4capi_185audio_component_find_next(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_description_dict = 0;
  long __pyx_v_previous_component_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_component_find_next (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_description_dict,&__pyx_mstate_global->__pyx_n_u_previous_component_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1859, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1859, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1859, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_component_find_next", 0) < (0)) __PYX_ERR(0, 1859, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_component_find_next", 0, 1, 2, i); __PYX_ERR(0, 1859, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1859, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1859, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_description_dict = values[0];
    if (values[1]) {
      __pyx_v_previous_component_id = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_previous_component_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1859, __pyx_L3_error)
    } else {
      __pyx_v_previous_component_id = ((long)((long)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_component_find_next", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1859, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_component_find_next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_184audio_component_find_next(__pyx_self, __pyx_v_description_dict, __pyx_v_previous_component_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_184audio_component_find_next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_description_dict, long __pyx_v_previous_component_id) {
  AudioComponentDescription __pyx_v_desc;
  AudioComponent __pyx_v_component;
  AudioComponent __pyx_v_previous;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  UInt32 __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_find_next", 0);

  /* "coremusic/capi.pyx":1871
 *     cdef at.AudioComponentDescription desc
 *     cdef at.AudioComponent component
 *     cdef at.AudioComponent previous = NULL             # <<<<<<<<<<<<<<
 * 
 *     if previous_component_id != 0:
*/
  __pyx_v_previous = NULL;

  /* "coremusic/capi.pyx":1873
 *     cdef at.AudioComponent previous = NULL
 * 
 *     if previous_component_id != 0:             # <<<<<<<<<<<<<<
 *         previous = <at.AudioComponent>previous_component_id
 * 
*/
  __pyx_t_1 = (__pyx_v_previous_component_id != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1874
 * 
 *     if previous_component_id != 0:
 *         previous = <at.AudioComponent>previous_component_id             # <<<<<<<<<<<<<<
 * 
 *     desc.componentType = description_dict.get('type', 0)
*/
    __pyx_v_previous = ((AudioComponent)__pyx_v_previous_component_id);

    /* "coremusic/capi.pyx":1873
 *     cdef at.AudioComponent previous = NULL
 * 
 *     if previous_component_id != 0:             # <<<<<<<<<<<<<<
 *         previous = <at.AudioComponent>previous_component_id
 * 
*/
  }

  /* "coremusic/capi.pyx":1876
 *         previous = <at.AudioComponent>previous_component_id
 * 
 *     desc.componentType = description_dict.get('type', 0)             # <<<<<<<<<<<<<<
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_description_dict, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentType = __pyx_t_4;

  /* "coremusic/capi.pyx":1877
 * 
 *     desc.componentType = description_dict.get('type', 0)
 *     desc.componentSubType = description_dict.get('subtype', 0)             # <<<<<<<<<<<<<<
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_description_dict, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_desc.componentSubType = __pyx_t_4;

  /* "coremusic/capi.pyx":1878
 *     desc.componentType = description_dict.get('type', 0)
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)             # <<<<<<<<<<<<<<
 *     desc.componentFlags = description_dict.get('flags', 0)
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_description_dict, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentManufacturer = __pyx_t_4;

  /* "coremusic/capi.pyx":1879
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)             # <<<<<<<<<<<<<<
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_description_dict, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[5], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_desc.componentFlags = __pyx_t_4;

  /* "coremusic/capi.pyx":1880
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)             # <<<<<<<<<<<<<<
 * 
 *     component = at.AudioComponentFindNext(previous, &desc)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_description_dict, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[6], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentFlagsMask = __pyx_t_4;

  /* "coremusic/capi.pyx":1882
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)
 * 
 *     component = at.AudioComponentFindNext(previous, &desc)             # <<<<<<<<<<<<<<
 * 
 *     if component == NULL:
*/
  __pyx_v_component = AudioComponentFindNext(__pyx_v_previous, (&__pyx_v_desc));

  /* "coremusic/capi.pyx":1884
 *     component = at.AudioComponentFindNext(previous, &desc)
 * 
 *     if component == NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <long>component
*/
  __pyx_t_1 = (__pyx_v_component == NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1885
 * 
 *     if component == NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <long>component
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "coremusic/capi.pyx":1884
 *     component = at.AudioComponentFindNext(previous, &desc)
 * 
 *     if component == NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <long>component
*/
  }

  /* "coremusic/capi.pyx":1886
 *     if component == NULL:
 *         return None
 *     return <long>component             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_component)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1859
 * 
 * # AudioComponent Functions
 * def audio_component_find_next(description_dict, long previous_component_id=0):             # <<<<<<<<<<<<<<
 *     """Find an audio component matching the description
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.audio_component_find_next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1889
 * 
 * 
 * def audio_component_instance_new(long component_id):             # <<<<<<<<<<<<<<
 *     """Create a new instance of an audio component"""
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_187audio_component_instance_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_186audio_component_instance_new, "audio_component_instance_new(long component_id)\n\nCreate a new instance of an audio component");
static PyMethodDef __pyx_mdef_9coremusic_4capi_187audio_component_instance_new = {"audio_component_instance_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_187audio_component_instance_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_186audio_component_instance_new};
static PyObject *__pyx_pw_9coremusic_4capi_187audio_component_instance_new(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_component_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_component_instance_new (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_component_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1889, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1889, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_component_instance_new", 0) < (0)) __PYX_ERR(0, 1889, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_component_instance_new", 1, 1, 1, i); __PYX_ERR(0, 1889, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1889, __pyx_L3_error)
    }
    __pyx_v_component_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_component_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1889, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_component_instance_new", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1889, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_component_instance_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_186audio_component_instance_new(__pyx_self, __pyx_v_component_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_186audio_component_instance_new(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id) {
  AudioComponent __pyx_v_component;
  AudioComponentInstance __pyx_v_instance;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_instance_new", 0);

  /* "coremusic/capi.pyx":1891
 * def audio_component_instance_new(long component_id):
 *     """Create a new instance of an audio component"""
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioComponentInstance instance
 * 
*/
  __pyx_v_component = ((AudioComponent)__pyx_v_component_id);

  /* "coremusic/capi.pyx":1894
 *     cdef at.AudioComponentInstance instance
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceNew"))
*/
  __pyx_v_status = AudioComponentInstanceNew(__pyx_v_component, (&__pyx_v_instance));

  /* "coremusic/capi.pyx":1895
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceNew"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1896
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceNew"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>instance
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioComponentInstanceNew); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __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_ERR(0, 1896, __pyx_L1_error)

    /* "coremusic/capi.pyx":1895
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceNew"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1898
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceNew"))
 * 
 *     return <long>instance             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_instance)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1889
 * 
 * 
 * def audio_component_instance_new(long component_id):             # <<<<<<<<<<<<<<
 *     """Create a new instance of an audio component"""
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_component_instance_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1901
 * 
 * 
 * def audio_component_instance_dispose(long instance_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio component instance"""
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_189audio_component_instance_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_188audio_component_instance_dispose, "audio_component_instance_dispose(long instance_id)\n\nDispose of an audio component instance");
static PyMethodDef __pyx_mdef_9coremusic_4capi_189audio_component_instance_dispose = {"audio_component_instance_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_189audio_component_instance_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_188audio_component_instance_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_189audio_component_instance_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_instance_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_component_instance_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_instance_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1901, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1901, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_component_instance_dispose", 0) < (0)) __PYX_ERR(0, 1901, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_component_instance_dispose", 1, 1, 1, i); __PYX_ERR(0, 1901, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1901, __pyx_L3_error)
    }
    __pyx_v_instance_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_instance_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1901, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_component_instance_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1901, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_component_instance_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_188audio_component_instance_dispose(__pyx_self, __pyx_v_instance_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_188audio_component_instance_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_instance_id) {
  AudioComponentInstance __pyx_v_instance;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_instance_dispose", 0);

  /* "coremusic/capi.pyx":1903
 * def audio_component_instance_dispose(long instance_id):
 *     """Dispose of an audio component instance"""
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
*/
  __pyx_v_instance = ((AudioComponentInstance)__pyx_v_instance_id);

  /* "coremusic/capi.pyx":1905
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceDispose"))
*/
  __pyx_v_status = AudioComponentInstanceDispose(__pyx_v_instance);

  /* "coremusic/capi.pyx":1906
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1907
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceDispose"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioComponentInstanceDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __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_ERR(0, 1907, __pyx_L1_error)

    /* "coremusic/capi.pyx":1906
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1909
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentInstanceDispose"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1901
 * 
 * 
 * def audio_component_instance_dispose(long instance_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio component instance"""
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_component_instance_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1912
 * 
 * 
 * def audio_component_copy_name(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the name of an audio component
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_191audio_component_copy_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_190audio_component_copy_name, "audio_component_copy_name(long component_id)\n\nGet the name of an audio component\n\nArgs:\n    component_id: AudioComponent ID\n\nReturns:\n    str: The name of the audio component, or None if failed");
static PyMethodDef __pyx_mdef_9coremusic_4capi_191audio_component_copy_name = {"audio_component_copy_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_191audio_component_copy_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_190audio_component_copy_name};
static PyObject *__pyx_pw_9coremusic_4capi_191audio_component_copy_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_component_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_component_copy_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_component_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1912, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1912, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_component_copy_name", 0) < (0)) __PYX_ERR(0, 1912, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_component_copy_name", 1, 1, 1, i); __PYX_ERR(0, 1912, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1912, __pyx_L3_error)
    }
    __pyx_v_component_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_component_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1912, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_component_copy_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1912, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_component_copy_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_190audio_component_copy_name(__pyx_self, __pyx_v_component_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_190audio_component_copy_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id) {
  AudioComponent __pyx_v_component;
  CFStringRef __pyx_v_name_ref;
  OSStatus __pyx_v_status;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_copy_name", 0);

  /* "coremusic/capi.pyx":1921
 *         str: The name of the audio component, or None if failed
 *     """
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef name_ref = NULL
 * 
*/
  __pyx_v_component = ((AudioComponent)__pyx_v_component_id);

  /* "coremusic/capi.pyx":1922
 *     """
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id
 *     cdef cf.CFStringRef name_ref = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
*/
  __pyx_v_name_ref = NULL;

  /* "coremusic/capi.pyx":1924
 *     cdef cf.CFStringRef name_ref = NULL
 * 
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)             # <<<<<<<<<<<<<<
 *     if status != 0 or name_ref == NULL:
 *         return None
*/
  __pyx_v_status = AudioComponentCopyName(__pyx_v_component, (&__pyx_v_name_ref));

  /* "coremusic/capi.pyx":1925
 * 
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0 or name_ref == NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_name_ref == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1926
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0 or name_ref == NULL:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     # Convert CFString to Python string using helper
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "coremusic/capi.pyx":1925
 * 
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0 or name_ref == NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  }

  /* "coremusic/capi.pyx":1929
 * 
 *     # Convert CFString to Python string using helper
 *     cdef str name = cfstring_to_str(name_ref)             # <<<<<<<<<<<<<<
 *     cf.CFRelease(name_ref)
 *     return name if name else None
*/
  __pyx_t_3 = __pyx_f_9coremusic_4capi_cfstring_to_str(__pyx_v_name_ref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_name = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1930
 *     # Convert CFString to Python string using helper
 *     cdef str name = cfstring_to_str(name_ref)
 *     cf.CFRelease(name_ref)             # <<<<<<<<<<<<<<
 *     return name if name else None
 * 
*/
  CFRelease(__pyx_v_name_ref);

  /* "coremusic/capi.pyx":1931
 *     cdef str name = cfstring_to_str(name_ref)
 *     cf.CFRelease(name_ref)
 *     return name if name else None             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (__pyx_v_name == Py_None) __pyx_t_1 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_name);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1931, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_v_name);
    __pyx_t_3 = __pyx_v_name;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_3 = Py_None;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1912
 * 
 * 
 * def audio_component_copy_name(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the name of an audio component
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.audio_component_copy_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1934
 * 
 * 
 * def audio_component_get_description(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the description of an audio component
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_193audio_component_get_description(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_192audio_component_get_description, "audio_component_get_description(long component_id)\n\nGet the description of an audio component\n\nArgs:\n    component_id: AudioComponent ID\n\nReturns:\n    dict: AudioComponentDescription as a dictionary with keys:\n          'type', 'subtype', 'manufacturer', 'flags', 'flags_mask'");
static PyMethodDef __pyx_mdef_9coremusic_4capi_193audio_component_get_description = {"audio_component_get_description", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_193audio_component_get_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_192audio_component_get_description};
static PyObject *__pyx_pw_9coremusic_4capi_193audio_component_get_description(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_component_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_component_get_description (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_component_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1934, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1934, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_component_get_description", 0) < (0)) __PYX_ERR(0, 1934, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_component_get_description", 1, 1, 1, i); __PYX_ERR(0, 1934, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1934, __pyx_L3_error)
    }
    __pyx_v_component_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_component_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_component_get_description", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1934, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_component_get_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_192audio_component_get_description(__pyx_self, __pyx_v_component_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_192audio_component_get_description(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id) {
  AudioComponent __pyx_v_component;
  AudioComponentDescription __pyx_v_desc;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_get_description", 0);

  /* "coremusic/capi.pyx":1944
 *               'type', 'subtype', 'manufacturer', 'flags', 'flags_mask'
 *     """
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioComponentDescription desc
 * 
*/
  __pyx_v_component = ((AudioComponent)__pyx_v_component_id);

  /* "coremusic/capi.pyx":1947
 *     cdef at.AudioComponentDescription desc
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
*/
  __pyx_v_status = AudioComponentGetDescription(__pyx_v_component, (&__pyx_v_desc));

  /* "coremusic/capi.pyx":1948
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1949
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioComponentGetDescription); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __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_ERR(0, 1949, __pyx_L1_error)

    /* "coremusic/capi.pyx":1948
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1951
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":1952
 * 
 *     return {
 *         'type': desc.componentType,             # <<<<<<<<<<<<<<
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_4) < (0)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1953
 *     return {
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,             # <<<<<<<<<<<<<<
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentSubType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_subtype, __pyx_t_4) < (0)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1954
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,             # <<<<<<<<<<<<<<
 *         'flags': desc.componentFlags,
 *         'flags_mask': desc.componentFlagsMask
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentManufacturer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_manufacturer, __pyx_t_4) < (0)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1955
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,             # <<<<<<<<<<<<<<
 *         'flags_mask': desc.componentFlagsMask
 *     }
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1956
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,
 *         'flags_mask': desc.componentFlagsMask             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentFlagsMask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags_mask, __pyx_t_4) < (0)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1934
 * 
 * 
 * def audio_component_get_description(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the description of an audio component
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_component_get_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1961
 * 
 * # AudioUnit Functions
 * def audio_unit_initialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Initialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_195audio_unit_initialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_194audio_unit_initialize, "audio_unit_initialize(long audio_unit_id)\n\nInitialize an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_195audio_unit_initialize = {"audio_unit_initialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_195audio_unit_initialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_194audio_unit_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_195audio_unit_initialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_initialize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1961, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1961, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_initialize", 0) < (0)) __PYX_ERR(0, 1961, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_initialize", 1, 1, 1, i); __PYX_ERR(0, 1961, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1961, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1961, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_initialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1961, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_194audio_unit_initialize(__pyx_self, __pyx_v_audio_unit_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_194audio_unit_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_initialize", 0);

  /* "coremusic/capi.pyx":1963
 * def audio_unit_initialize(long audio_unit_id):
 *     """Initialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":1965
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitInitialize"))
*/
  __pyx_v_status = AudioUnitInitialize(__pyx_v_unit);

  /* "coremusic/capi.pyx":1966
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitInitialize"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1967
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitInitialize"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitInitialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __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_ERR(0, 1967, __pyx_L1_error)

    /* "coremusic/capi.pyx":1966
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitInitialize"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1969
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitInitialize"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1961
 * 
 * # AudioUnit Functions
 * def audio_unit_initialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Initialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1972
 * 
 * 
 * def audio_unit_uninitialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_197audio_unit_uninitialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_196audio_unit_uninitialize, "audio_unit_uninitialize(long audio_unit_id)\n\nUninitialize an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_197audio_unit_uninitialize = {"audio_unit_uninitialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_197audio_unit_uninitialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_196audio_unit_uninitialize};
static PyObject *__pyx_pw_9coremusic_4capi_197audio_unit_uninitialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_uninitialize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1972, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1972, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_uninitialize", 0) < (0)) __PYX_ERR(0, 1972, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_uninitialize", 1, 1, 1, i); __PYX_ERR(0, 1972, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1972, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1972, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_uninitialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1972, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_uninitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_196audio_unit_uninitialize(__pyx_self, __pyx_v_audio_unit_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_196audio_unit_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_uninitialize", 0);

  /* "coremusic/capi.pyx":1974
 * def audio_unit_uninitialize(long audio_unit_id):
 *     """Uninitialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":1976
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitUninitialize"))
*/
  __pyx_v_status = AudioUnitUninitialize(__pyx_v_unit);

  /* "coremusic/capi.pyx":1977
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitUninitialize"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1978
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitUninitialize"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitUninitialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __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_ERR(0, 1978, __pyx_L1_error)

    /* "coremusic/capi.pyx":1977
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitUninitialize"))
 * 
*/
  }

  /* "coremusic/capi.pyx":1980
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitUninitialize"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1972
 * 
 * 
 * def audio_unit_uninitialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_uninitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1983
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_199audio_unit_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_198audio_unit_set_property, "audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, bytes data)\n\nSet a property on an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_199audio_unit_set_property = {"audio_unit_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_199audio_unit_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_198audio_unit_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_199audio_unit_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  int __pyx_v_property_id;
  int __pyx_v_scope;
  int __pyx_v_element;
  PyObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_set_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1983, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_set_property", 0) < (0)) __PYX_ERR(0, 1983, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_set_property", 1, 5, 5, i); __PYX_ERR(0, 1983, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1983, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1983, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1983, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1983, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1983, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[4]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_set_property", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1983, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 1983, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_198audio_unit_set_property(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_property_id, __pyx_v_scope, __pyx_v_element, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_198audio_unit_set_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, int __pyx_v_property_id, int __pyx_v_scope, int __pyx_v_element, PyObject *__pyx_v_data) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_set_property", 0);

  /* "coremusic/capi.pyx":1985
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, bytes data):
 *     """Set a property on an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":1988
 *     cdef cf.OSStatus status
 * 
 *     if isinstance(data, bytes):             # <<<<<<<<<<<<<<
 *         # Handle raw bytes data
 *         status = at.AudioUnitSetProperty(unit,
*/
  __pyx_t_1 = PyBytes_Check(__pyx_v_data); 
  if (likely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1994
 *                                          <at.AudioUnitScope>scope,
 *                                          <at.AudioUnitElement>element,
 *                                          <const char*>data,             # <<<<<<<<<<<<<<
 *                                          <cf.UInt32>len(data))
 *     else:
*/
    if (unlikely(__pyx_v_data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 1994, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1994, __pyx_L1_error)

    /* "coremusic/capi.pyx":1995
 *                                          <at.AudioUnitElement>element,
 *                                          <const char*>data,
 *                                          <cf.UInt32>len(data))             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("data must be bytes")
*/
    if (unlikely(__pyx_v_data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1995, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1995, __pyx_L1_error)

    /* "coremusic/capi.pyx":1990
 *     if isinstance(data, bytes):
 *         # Handle raw bytes data
 *         status = at.AudioUnitSetProperty(unit,             # <<<<<<<<<<<<<<
 *                                          <at.AudioUnitPropertyID>property_id,
 *                                          <at.AudioUnitScope>scope,
*/
    __pyx_v_status = AudioUnitSetProperty(__pyx_v_unit, ((AudioUnitPropertyID)__pyx_v_property_id), ((AudioUnitScope)__pyx_v_scope), ((AudioUnitElement)__pyx_v_element), ((char const *)__pyx_t_2), ((UInt32)__pyx_t_3));

    /* "coremusic/capi.pyx":1988
 *     cdef cf.OSStatus status
 * 
 *     if isinstance(data, bytes):             # <<<<<<<<<<<<<<
 *         # Handle raw bytes data
 *         status = at.AudioUnitSetProperty(unit,
*/
    goto __pyx_L3;
  }

  /* "coremusic/capi.pyx":1997
 *                                          <cf.UInt32>len(data))
 *     else:
 *         raise ValueError("data must be bytes")             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  /*else*/ {
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_data_must_be_bytes};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1997, __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_ERR(0, 1997, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "coremusic/capi.pyx":1999
 *         raise ValueError("data must be bytes")
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetProperty"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2000
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetProperty"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_5 = NULL;
    __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitSetProperty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2000, __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_ERR(0, 2000, __pyx_L1_error)

    /* "coremusic/capi.pyx":1999
 *         raise ValueError("data must be bytes")
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2002
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetProperty"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1983
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2005
 * 
 * 
 * def audio_unit_get_property(long audio_unit_id, int property_id, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_201audio_unit_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_200audio_unit_get_property, "audio_unit_get_property(long audio_unit_id, int property_id, int scope, int element)\n\nGet a property from an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_201audio_unit_get_property = {"audio_unit_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_201audio_unit_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_200audio_unit_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_201audio_unit_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  int __pyx_v_property_id;
  int __pyx_v_scope;
  int __pyx_v_element;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2005, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_property", 0) < (0)) __PYX_ERR(0, 2005, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_property", 1, 4, 4, i); __PYX_ERR(0, 2005, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2005, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2005, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2005, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2005, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2005, __pyx_L3_error)
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2005, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2005, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2005, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_property", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 2005, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_200audio_unit_get_property(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_property_id, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_200audio_unit_get_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, int __pyx_v_property_id, int __pyx_v_scope, int __pyx_v_element) {
  AudioUnit __pyx_v_unit;
  UInt32 __pyx_v_data_size;
  Boolean __pyx_v_writable;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_property", 0);

  /* "coremusic/capi.pyx":2007
 * def audio_unit_get_property(long audio_unit_id, int property_id, int scope, int element):
 *     """Get a property from an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2008
 *     """Get a property from an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.Boolean writable = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":2009
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":2013
 * 
 *     # Get the size of the property
 *     status = at.AudioUnitGetPropertyInfo(unit,             # <<<<<<<<<<<<<<
 *                                          <at.AudioUnitPropertyID>property_id,
 *                                          <at.AudioUnitScope>scope,
*/
  __pyx_v_status = AudioUnitGetPropertyInfo(__pyx_v_unit, ((AudioUnitPropertyID)__pyx_v_property_id), ((AudioUnitScope)__pyx_v_scope), ((AudioUnitElement)__pyx_v_element), (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":2019
 *                                          &data_size,
 *                                          &writable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetPropertyInfo"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2020
 *                                          &writable)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetPropertyInfo"))             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitGetPropertyInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2020, __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_ERR(0, 2020, __pyx_L1_error)

    /* "coremusic/capi.pyx":2019
 *                                          &data_size,
 *                                          &writable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetPropertyInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2023
 * 
 *     # Allocate buffer and get the property
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for property data")
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":2024
 *     # Allocate buffer and get the property
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
*/
  __pyx_t_1 = (!(__pyx_v_buffer != 0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2025
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for property data")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_pr};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __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_ERR(0, 2025, __pyx_L1_error)

    /* "coremusic/capi.pyx":2024
 *     # Allocate buffer and get the property
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
*/
  }

  /* "coremusic/capi.pyx":2027
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioUnitGetProperty(unit,
 *                                          <at.AudioUnitPropertyID>property_id,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2028
 * 
 *     try:
 *         status = at.AudioUnitGetProperty(unit,             # <<<<<<<<<<<<<<
 *                                          <at.AudioUnitPropertyID>property_id,
 *                                          <at.AudioUnitScope>scope,
*/
    __pyx_v_status = AudioUnitGetProperty(__pyx_v_unit, ((AudioUnitPropertyID)__pyx_v_property_id), ((AudioUnitScope)__pyx_v_scope), ((AudioUnitElement)__pyx_v_element), __pyx_v_buffer, (&__pyx_v_data_size));

    /* "coremusic/capi.pyx":2035
 *                                          &data_size)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":2036
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         return buffer[:data_size]
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitGetProperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2036, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2036, __pyx_L6_error)

      /* "coremusic/capi.pyx":2035
 *                                          &data_size)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":2038
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))
 * 
 *         return buffer[:data_size]             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_data_size - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":2041
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_14 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_14;
      __pyx_t_14 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2005
 * 
 * 
 * def audio_unit_get_property(long audio_unit_id, int property_id, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2044
 * 
 * 
 * def audio_output_unit_start(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Start an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_203audio_output_unit_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_202audio_output_unit_start, "audio_output_unit_start(long audio_unit_id)\n\nStart an output audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_203audio_output_unit_start = {"audio_output_unit_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_203audio_output_unit_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_202audio_output_unit_start};
static PyObject *__pyx_pw_9coremusic_4capi_203audio_output_unit_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_output_unit_start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2044, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2044, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_output_unit_start", 0) < (0)) __PYX_ERR(0, 2044, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_output_unit_start", 1, 1, 1, i); __PYX_ERR(0, 2044, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2044, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2044, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_output_unit_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2044, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_output_unit_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_202audio_output_unit_start(__pyx_self, __pyx_v_audio_unit_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_202audio_output_unit_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_output_unit_start", 0);

  /* "coremusic/capi.pyx":2046
 * def audio_output_unit_start(long audio_unit_id):
 *     """Start an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2048
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStart"))
*/
  __pyx_v_status = AudioOutputUnitStart(__pyx_v_unit);

  /* "coremusic/capi.pyx":2049
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStart"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2050
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStart"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioOutputUnitStart); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2050, __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_ERR(0, 2050, __pyx_L1_error)

    /* "coremusic/capi.pyx":2049
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStart"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2052
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStart"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2044
 * 
 * 
 * def audio_output_unit_start(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Start an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_output_unit_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2055
 * 
 * 
 * def audio_output_unit_stop(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Stop an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_205audio_output_unit_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_204audio_output_unit_stop, "audio_output_unit_stop(long audio_unit_id)\n\nStop an output audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_205audio_output_unit_stop = {"audio_output_unit_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_205audio_output_unit_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_204audio_output_unit_stop};
static PyObject *__pyx_pw_9coremusic_4capi_205audio_output_unit_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_output_unit_stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2055, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_output_unit_stop", 0) < (0)) __PYX_ERR(0, 2055, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_output_unit_stop", 1, 1, 1, i); __PYX_ERR(0, 2055, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2055, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2055, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_output_unit_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2055, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_output_unit_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_204audio_output_unit_stop(__pyx_self, __pyx_v_audio_unit_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_204audio_output_unit_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_output_unit_stop", 0);

  /* "coremusic/capi.pyx":2057
 * def audio_output_unit_stop(long audio_unit_id):
 *     """Stop an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2059
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStop"))
*/
  __pyx_v_status = AudioOutputUnitStop(__pyx_v_unit);

  /* "coremusic/capi.pyx":2060
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStop"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2061
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStop"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioOutputUnitStop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2061, __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_ERR(0, 2061, __pyx_L1_error)

    /* "coremusic/capi.pyx":2060
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStop"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2063
 *         raise RuntimeError(format_osstatus_error(status, "AudioOutputUnitStop"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2055
 * 
 * 
 * def audio_output_unit_stop(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Stop an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_output_unit_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2068
 * # AudioUnit Plugin Discovery and Management Functions
 * 
 * def audio_unit_find_all_components(component_type=None, component_subtype=None, manufacturer=None):             # <<<<<<<<<<<<<<
 *     """Find all AudioUnit components matching the criteria
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_207audio_unit_find_all_components(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_206audio_unit_find_all_components, "audio_unit_find_all_components(component_type=None, component_subtype=None, manufacturer=None)\n\nFind all AudioUnit components matching the criteria\n\nArgs:\n    component_type: AudioUnit type (e.g., 'aufx' for effects, 'aumu' for instruments)\n    component_subtype: AudioUnit subtype (specific effect/instrument type)\n    manufacturer: Manufacturer code (e.g., 'appl' for Apple)\n\nReturns:\n    List of component IDs");
static PyMethodDef __pyx_mdef_9coremusic_4capi_207audio_unit_find_all_components = {"audio_unit_find_all_components", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_207audio_unit_find_all_components, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_206audio_unit_find_all_components};
static PyObject *__pyx_pw_9coremusic_4capi_207audio_unit_find_all_components(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_component_type = 0;
  PyObject *__pyx_v_component_subtype = 0;
  PyObject *__pyx_v_manufacturer = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_find_all_components (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_component_type,&__pyx_mstate_global->__pyx_n_u_component_subtype,&__pyx_mstate_global->__pyx_n_u_manufacturer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2068, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_find_all_components", 0) < (0)) __PYX_ERR(0, 2068, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2068, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_component_type = values[0];
    __pyx_v_component_subtype = values[1];
    __pyx_v_manufacturer = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_find_all_components", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2068, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_find_all_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_206audio_unit_find_all_components(__pyx_self, __pyx_v_component_type, __pyx_v_component_subtype, __pyx_v_manufacturer);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_206audio_unit_find_all_components(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_component_type, PyObject *__pyx_v_component_subtype, PyObject *__pyx_v_manufacturer) {
  AudioComponentDescription __pyx_v_desc;
  AudioComponent __pyx_v_component;
  PyObject *__pyx_v_components = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt32 __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  UInt32 __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_find_all_components", 0);

  /* "coremusic/capi.pyx":2080
 *     """
 *     cdef at.AudioComponentDescription desc
 *     cdef at.AudioComponent component = NULL             # <<<<<<<<<<<<<<
 *     cdef list components = []
 * 
*/
  __pyx_v_component = NULL;

  /* "coremusic/capi.pyx":2081
 *     cdef at.AudioComponentDescription desc
 *     cdef at.AudioComponent component = NULL
 *     cdef list components = []             # <<<<<<<<<<<<<<
 * 
 *     # Set up description for search
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2084
 * 
 *     # Set up description for search
 *     desc.componentType = fourchar_to_int(component_type) if component_type else 0             # <<<<<<<<<<<<<<
 *     desc.componentSubType = fourchar_to_int(component_subtype) if component_subtype else 0
 *     desc.componentManufacturer = fourchar_to_int(manufacturer) if manufacturer else 0
*/
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_component_type); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2084, __pyx_L1_error)
  if (__pyx_t_3) {
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_fourchar_to_int); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_component_type};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_7 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2084, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_7;
  } else {
    __pyx_t_2 = 0;
  }
  __pyx_v_desc.componentType = __pyx_t_2;

  /* "coremusic/capi.pyx":2085
 *     # Set up description for search
 *     desc.componentType = fourchar_to_int(component_type) if component_type else 0
 *     desc.componentSubType = fourchar_to_int(component_subtype) if component_subtype else 0             # <<<<<<<<<<<<<<
 *     desc.componentManufacturer = fourchar_to_int(manufacturer) if manufacturer else 0
 *     desc.componentFlags = 0
*/
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_component_subtype); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2085, __pyx_L1_error)
  if (__pyx_t_3) {
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fourchar_to_int); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_component_subtype};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_7 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2085, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_7;
  } else {
    __pyx_t_2 = 0;
  }
  __pyx_v_desc.componentSubType = __pyx_t_2;

  /* "coremusic/capi.pyx":2086
 *     desc.componentType = fourchar_to_int(component_type) if component_type else 0
 *     desc.componentSubType = fourchar_to_int(component_subtype) if component_subtype else 0
 *     desc.componentManufacturer = fourchar_to_int(manufacturer) if manufacturer else 0             # <<<<<<<<<<<<<<
 *     desc.componentFlags = 0
 *     desc.componentFlagsMask = 0
*/
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_manufacturer); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2086, __pyx_L1_error)
  if (__pyx_t_3) {
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_fourchar_to_int); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_manufacturer};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_7 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2086, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_7;
  } else {
    __pyx_t_2 = 0;
  }
  __pyx_v_desc.componentManufacturer = __pyx_t_2;

  /* "coremusic/capi.pyx":2087
 *     desc.componentSubType = fourchar_to_int(component_subtype) if component_subtype else 0
 *     desc.componentManufacturer = fourchar_to_int(manufacturer) if manufacturer else 0
 *     desc.componentFlags = 0             # <<<<<<<<<<<<<<
 *     desc.componentFlagsMask = 0
 * 
*/
  __pyx_v_desc.componentFlags = 0;

  /* "coremusic/capi.pyx":2088
 *     desc.componentManufacturer = fourchar_to_int(manufacturer) if manufacturer else 0
 *     desc.componentFlags = 0
 *     desc.componentFlagsMask = 0             # <<<<<<<<<<<<<<
 * 
 *     # Find all matching components
*/
  __pyx_v_desc.componentFlagsMask = 0;

  /* "coremusic/capi.pyx":2091
 * 
 *     # Find all matching components
 *     while True:             # <<<<<<<<<<<<<<
 *         component = at.AudioComponentFindNext(component, &desc)
 *         if component == NULL:
*/
  while (1) {

    /* "coremusic/capi.pyx":2092
 *     # Find all matching components
 *     while True:
 *         component = at.AudioComponentFindNext(component, &desc)             # <<<<<<<<<<<<<<
 *         if component == NULL:
 *             break
*/
    __pyx_v_component = AudioComponentFindNext(__pyx_v_component, (&__pyx_v_desc));

    /* "coremusic/capi.pyx":2093
 *     while True:
 *         component = at.AudioComponentFindNext(component, &desc)
 *         if component == NULL:             # <<<<<<<<<<<<<<
 *             break
 *         components.append(<long>component)
*/
    __pyx_t_3 = (__pyx_v_component == NULL);
    if (__pyx_t_3) {

      /* "coremusic/capi.pyx":2094
 *         component = at.AudioComponentFindNext(component, &desc)
 *         if component == NULL:
 *             break             # <<<<<<<<<<<<<<
 *         components.append(<long>component)
 * 
*/
      goto __pyx_L4_break;

      /* "coremusic/capi.pyx":2093
 *     while True:
 *         component = at.AudioComponentFindNext(component, &desc)
 *         if component == NULL:             # <<<<<<<<<<<<<<
 *             break
 *         components.append(<long>component)
*/
    }

    /* "coremusic/capi.pyx":2095
 *         if component == NULL:
 *             break
 *         components.append(<long>component)             # <<<<<<<<<<<<<<
 * 
 *     return components
*/
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_component)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_components, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 2095, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4_break:;

  /* "coremusic/capi.pyx":2097
 *         components.append(<long>component)
 * 
 *     return components             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_components);
  __pyx_r = __pyx_v_components;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2068
 * # AudioUnit Plugin Discovery and Management Functions
 * 
 * def audio_unit_find_all_components(component_type=None, component_subtype=None, manufacturer=None):             # <<<<<<<<<<<<<<
 *     """Find all AudioUnit components matching the criteria
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_find_all_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_components);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2100
 * 
 * 
 * def audio_unit_get_component_info(long component_id):             # <<<<<<<<<<<<<<
 *     """Get detailed information about an AudioUnit component
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_209audio_unit_get_component_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_208audio_unit_get_component_info, "audio_unit_get_component_info(long component_id)\n\nGet detailed information about an AudioUnit component\n\nArgs:\n    component_id: Component ID from audio_unit_find_all_components\n\nReturns:\n    Dictionary with keys: name, type, subtype, manufacturer, version");
static PyMethodDef __pyx_mdef_9coremusic_4capi_209audio_unit_get_component_info = {"audio_unit_get_component_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_209audio_unit_get_component_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_208audio_unit_get_component_info};
static PyObject *__pyx_pw_9coremusic_4capi_209audio_unit_get_component_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_component_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_component_info (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_component_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2100, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2100, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_component_info", 0) < (0)) __PYX_ERR(0, 2100, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_component_info", 1, 1, 1, i); __PYX_ERR(0, 2100, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2100, __pyx_L3_error)
    }
    __pyx_v_component_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_component_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2100, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_component_info", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2100, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_component_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_208audio_unit_get_component_info(__pyx_self, __pyx_v_component_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_208audio_unit_get_component_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id) {
  AudioComponent __pyx_v_component;
  AudioComponentDescription __pyx_v_desc;
  CFStringRef __pyx_v_name_ref;
  UInt32 __pyx_v_version;
  OSStatus __pyx_v_status;
  char __pyx_v_buffer[256];
  PyObject *__pyx_v_name = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_component_info", 0);

  /* "coremusic/capi.pyx":2109
 *         Dictionary with keys: name, type, subtype, manufacturer, version
 *     """
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioComponentDescription desc
 *     cdef cf.CFStringRef name_ref = NULL
*/
  __pyx_v_component = ((AudioComponent)__pyx_v_component_id);

  /* "coremusic/capi.pyx":2111
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id
 *     cdef at.AudioComponentDescription desc
 *     cdef cf.CFStringRef name_ref = NULL             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 version = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_name_ref = NULL;

  /* "coremusic/capi.pyx":2112
 *     cdef at.AudioComponentDescription desc
 *     cdef cf.CFStringRef name_ref = NULL
 *     cdef cf.UInt32 version = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef char buffer[STRING_BUFFER_SIZE]
*/
  __pyx_v_version = 0;

  /* "coremusic/capi.pyx":2117
 * 
 *     # Get component description
 *     status = at.AudioComponentGetDescription(component, &desc)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
*/
  __pyx_v_status = AudioComponentGetDescription(__pyx_v_component, (&__pyx_v_desc));

  /* "coremusic/capi.pyx":2118
 *     # Get component description
 *     status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2119
 *     status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))             # <<<<<<<<<<<<<<
 * 
 *     # Get component name
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioComponentGetDescription); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2119, __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_ERR(0, 2119, __pyx_L1_error)

    /* "coremusic/capi.pyx":2118
 *     # Get component description
 *     status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentGetDescription"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2122
 * 
 *     # Get component name
 *     status = at.AudioComponentCopyName(component, &name_ref)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentCopyName"))
*/
  __pyx_v_status = AudioComponentCopyName(__pyx_v_component, (&__pyx_v_name_ref));

  /* "coremusic/capi.pyx":2123
 *     # Get component name
 *     status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentCopyName"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2124
 *     status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentCopyName"))             # <<<<<<<<<<<<<<
 * 
 *     # Convert CFString to Python string
*/
    __pyx_t_4 = NULL;
    __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioComponentCopyName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2124, __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_ERR(0, 2124, __pyx_L1_error)

    /* "coremusic/capi.pyx":2123
 *     # Get component name
 *     status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioComponentCopyName"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2127
 * 
 *     # Convert CFString to Python string
 *     name = ""             # <<<<<<<<<<<<<<
 *     if name_ref != NULL:
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
  __pyx_v_name = __pyx_mstate_global->__pyx_kp_u__7;

  /* "coremusic/capi.pyx":2128
 *     # Convert CFString to Python string
 *     name = ""
 *     if name_ref != NULL:             # <<<<<<<<<<<<<<
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *             name = buffer.decode('utf-8')
*/
  __pyx_t_1 = (__pyx_v_name_ref != NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":2129
 *     name = ""
 *     if name_ref != NULL:
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             name = buffer.decode('utf-8')
 *         cf.CFRelease(name_ref)
*/
    __pyx_t_1 = (CFStringGetCString(__pyx_v_name_ref, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), kCFStringEncodingUTF8) != 0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":2130
 *     if name_ref != NULL:
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *             name = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *         cf.CFRelease(name_ref)
 * 
*/
      __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2130, __pyx_L1_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":2129
 *     name = ""
 *     if name_ref != NULL:
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             name = buffer.decode('utf-8')
 *         cf.CFRelease(name_ref)
*/
    }

    /* "coremusic/capi.pyx":2131
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *             name = buffer.decode('utf-8')
 *         cf.CFRelease(name_ref)             # <<<<<<<<<<<<<<
 * 
 *     # Get component version
*/
    CFRelease(__pyx_v_name_ref);

    /* "coremusic/capi.pyx":2128
 *     # Convert CFString to Python string
 *     name = ""
 *     if name_ref != NULL:             # <<<<<<<<<<<<<<
 *         if cf.CFStringGetCString(name_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *             name = buffer.decode('utf-8')
*/
  }

  /* "coremusic/capi.pyx":2134
 * 
 *     # Get component version
 *     status = at.AudioComponentGetVersion(component, &version)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         version = 0  # Non-critical, just set to 0
*/
  __pyx_v_status = AudioComponentGetVersion(__pyx_v_component, (&__pyx_v_version));

  /* "coremusic/capi.pyx":2135
 *     # Get component version
 *     status = at.AudioComponentGetVersion(component, &version)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         version = 0  # Non-critical, just set to 0
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":2136
 *     status = at.AudioComponentGetVersion(component, &version)
 *     if status != 0:
 *         version = 0  # Non-critical, just set to 0             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
    __pyx_v_version = 0;

    /* "coremusic/capi.pyx":2135
 *     # Get component version
 *     status = at.AudioComponentGetVersion(component, &version)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         version = 0  # Non-critical, just set to 0
 * 
*/
  }

  /* "coremusic/capi.pyx":2138
 *         version = 0  # Non-critical, just set to 0
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'name': name,
 *         'type': int_to_fourchar(desc.componentType),
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2139
 * 
 *     return {
 *         'name': name,             # <<<<<<<<<<<<<<
 *         'type': int_to_fourchar(desc.componentType),
 *         'subtype': int_to_fourchar(desc.componentSubType),
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name, __pyx_v_name) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)

  /* "coremusic/capi.pyx":2140
 *     return {
 *         'name': name,
 *         'type': int_to_fourchar(desc.componentType),             # <<<<<<<<<<<<<<
 *         'subtype': int_to_fourchar(desc.componentSubType),
 *         'manufacturer': int_to_fourchar(desc.componentManufacturer),
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int_to_fourchar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_3) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2141
 *         'name': name,
 *         'type': int_to_fourchar(desc.componentType),
 *         'subtype': int_to_fourchar(desc.componentSubType),             # <<<<<<<<<<<<<<
 *         'manufacturer': int_to_fourchar(desc.componentManufacturer),
 *         'version': version,
*/
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int_to_fourchar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentSubType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_7);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_subtype, __pyx_t_3) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2142
 *         'type': int_to_fourchar(desc.componentType),
 *         'subtype': int_to_fourchar(desc.componentSubType),
 *         'manufacturer': int_to_fourchar(desc.componentManufacturer),             # <<<<<<<<<<<<<<
 *         'version': version,
 *         'component_id': component_id
*/
  __pyx_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int_to_fourchar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentManufacturer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_manufacturer, __pyx_t_3) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2143
 *         'subtype': int_to_fourchar(desc.componentSubType),
 *         'manufacturer': int_to_fourchar(desc.componentManufacturer),
 *         'version': version,             # <<<<<<<<<<<<<<
 *         'component_id': component_id
 *     }
*/
  __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_3) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2144
 *         'manufacturer': int_to_fourchar(desc.componentManufacturer),
 *         'version': version,
 *         'component_id': component_id             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_component_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_component_id, __pyx_t_3) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2100
 * 
 * 
 * def audio_unit_get_component_info(long component_id):             # <<<<<<<<<<<<<<
 *     """Get detailed information about an AudioUnit component
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("coremusic.capi.audio_unit_get_component_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2148
 * 
 * 
 * def audio_unit_get_parameter_list(long audio_unit_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get list of parameter IDs for an AudioUnit
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_211audio_unit_get_parameter_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_210audio_unit_get_parameter_list, "audio_unit_get_parameter_list(long audio_unit_id, scope=0, element=0)\n\nGet list of parameter IDs for an AudioUnit\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    scope: Parameter scope (0=global, 1=input, 2=output)\n    element: Element number (usually 0)\n\nReturns:\n    List of parameter IDs");
static PyMethodDef __pyx_mdef_9coremusic_4capi_211audio_unit_get_parameter_list = {"audio_unit_get_parameter_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_211audio_unit_get_parameter_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_210audio_unit_get_parameter_list};
static PyObject *__pyx_pw_9coremusic_4capi_211audio_unit_get_parameter_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_scope = 0;
  PyObject *__pyx_v_element = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_parameter_list (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2148, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_parameter_list", 0) < (0)) __PYX_ERR(0, 2148, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter_list", 0, 1, 3, i); __PYX_ERR(0, 2148, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2148, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L3_error)
    __pyx_v_scope = values[1];
    __pyx_v_element = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter_list", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2148, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_210audio_unit_get_parameter_list(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_210audio_unit_get_parameter_list(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_scope, PyObject *__pyx_v_element) {
  AudioUnit __pyx_v_unit;
  UInt32 __pyx_v_data_size;
  Boolean __pyx_v_writable;
  OSStatus __pyx_v_status;
  AudioUnitParameterID *__pyx_v_param_list;
  UInt32 __pyx_v_num_params;
  PyObject *__pyx_v_result = 0;
  UInt32 __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  AudioUnitScope __pyx_t_2;
  AudioUnitElement __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  UInt32 __pyx_t_9;
  UInt32 __pyx_t_10;
  UInt32 __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_parameter_list", 0);

  /* "coremusic/capi.pyx":2159
 *         List of parameter IDs
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2160
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.Boolean writable = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":2161
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitParameterID* param_list = NULL
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":2163
 *     cdef cf.Boolean writable = 0
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitParameterID* param_list = NULL             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 num_params
 *     cdef list result = []
*/
  __pyx_v_param_list = NULL;

  /* "coremusic/capi.pyx":2165
 *     cdef at.AudioUnitParameterID* param_list = NULL
 *     cdef cf.UInt32 num_params
 *     cdef list result = []             # <<<<<<<<<<<<<<
 * 
 *     # Get size of parameter list
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2171
 *         unit,
 *         at.kAudioUnitProperty_ParameterList,
 *         <at.AudioUnitScope>scope,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitElement>element,
 *         &data_size,
*/
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_scope); if (unlikely((__pyx_t_2 == ((AudioUnitScope)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2171, __pyx_L1_error)

  /* "coremusic/capi.pyx":2172
 *         at.kAudioUnitProperty_ParameterList,
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,             # <<<<<<<<<<<<<<
 *         &data_size,
 *         &writable
*/
  __pyx_t_3 = __Pyx_PyLong_As_UInt32(__pyx_v_element); if (unlikely((__pyx_t_3 == ((AudioUnitElement)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2172, __pyx_L1_error)

  /* "coremusic/capi.pyx":2168
 * 
 *     # Get size of parameter list
 *     status = at.AudioUnitGetPropertyInfo(             # <<<<<<<<<<<<<<
 *         unit,
 *         at.kAudioUnitProperty_ParameterList,
*/
  __pyx_v_status = AudioUnitGetPropertyInfo(__pyx_v_unit, kAudioUnitProperty_ParameterList, ((AudioUnitScope)__pyx_t_2), ((AudioUnitElement)__pyx_t_3), (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":2177
 *     )
 * 
 *     if status != 0 or data_size == 0:             # <<<<<<<<<<<<<<
 *         return []  # No parameters
 * 
*/
  __pyx_t_5 = (__pyx_v_status != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_data_size == 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "coremusic/capi.pyx":2178
 * 
 *     if status != 0 or data_size == 0:
 *         return []  # No parameters             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer for parameter list
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2177
 *     )
 * 
 *     if status != 0 or data_size == 0:             # <<<<<<<<<<<<<<
 *         return []  # No parameters
 * 
*/
  }

  /* "coremusic/capi.pyx":2181
 * 
 *     # Allocate buffer for parameter list
 *     num_params = data_size // sizeof(at.AudioUnitParameterID)             # <<<<<<<<<<<<<<
 *     param_list = <at.AudioUnitParameterID*>malloc(data_size)
 *     if param_list == NULL:
*/
  __pyx_t_6 = (sizeof(AudioUnitParameterID));
  if (unlikely(__pyx_t_6 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 2181, __pyx_L1_error)
  }
  __pyx_v_num_params = (__pyx_v_data_size / __pyx_t_6);

  /* "coremusic/capi.pyx":2182
 *     # Allocate buffer for parameter list
 *     num_params = data_size // sizeof(at.AudioUnitParameterID)
 *     param_list = <at.AudioUnitParameterID*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     if param_list == NULL:
 *         raise MemoryError("Could not allocate parameter list buffer")
*/
  __pyx_v_param_list = ((AudioUnitParameterID *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":2183
 *     num_params = data_size // sizeof(at.AudioUnitParameterID)
 *     param_list = <at.AudioUnitParameterID*>malloc(data_size)
 *     if param_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate parameter list buffer")
 * 
*/
  __pyx_t_4 = (__pyx_v_param_list == NULL);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":2184
 *     param_list = <at.AudioUnitParameterID*>malloc(data_size)
 *     if param_list == NULL:
 *         raise MemoryError("Could not allocate parameter list buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_7 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_parameter_lis};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __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_ERR(0, 2184, __pyx_L1_error)

    /* "coremusic/capi.pyx":2183
 *     num_params = data_size // sizeof(at.AudioUnitParameterID)
 *     param_list = <at.AudioUnitParameterID*>malloc(data_size)
 *     if param_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate parameter list buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":2186
 *         raise MemoryError("Could not allocate parameter list buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Get parameter list
 *         status = at.AudioUnitGetProperty(
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2191
 *             unit,
 *             at.kAudioUnitProperty_ParameterList,
 *             <at.AudioUnitScope>scope,             # <<<<<<<<<<<<<<
 *             <at.AudioUnitElement>element,
 *             param_list,
*/
    __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_scope); if (unlikely((__pyx_t_2 == ((AudioUnitScope)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2191, __pyx_L8_error)

    /* "coremusic/capi.pyx":2192
 *             at.kAudioUnitProperty_ParameterList,
 *             <at.AudioUnitScope>scope,
 *             <at.AudioUnitElement>element,             # <<<<<<<<<<<<<<
 *             param_list,
 *             &data_size
*/
    __pyx_t_3 = __Pyx_PyLong_As_UInt32(__pyx_v_element); if (unlikely((__pyx_t_3 == ((AudioUnitElement)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2192, __pyx_L8_error)

    /* "coremusic/capi.pyx":2188
 *     try:
 *         # Get parameter list
 *         status = at.AudioUnitGetProperty(             # <<<<<<<<<<<<<<
 *             unit,
 *             at.kAudioUnitProperty_ParameterList,
*/
    __pyx_v_status = AudioUnitGetProperty(__pyx_v_unit, kAudioUnitProperty_ParameterList, ((AudioUnitScope)__pyx_t_2), ((AudioUnitElement)__pyx_t_3), __pyx_v_param_list, (&__pyx_v_data_size));

    /* "coremusic/capi.pyx":2197
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))
 * 
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2198
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         # Convert to Python list
*/
      __pyx_t_7 = NULL;
      __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitGetProperty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2198, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2198, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2198, __pyx_L8_error)

      /* "coremusic/capi.pyx":2197
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":2201
 * 
 *         # Convert to Python list
 *         for i in range(num_params):             # <<<<<<<<<<<<<<
 *             result.append(param_list[i])
 * 
*/
    __pyx_t_9 = __pyx_v_num_params;
    __pyx_t_10 = __pyx_t_9;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "coremusic/capi.pyx":2202
 *         # Convert to Python list
 *         for i in range(num_params):
 *             result.append(param_list[i])             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      __pyx_t_1 = __Pyx_PyLong_From_UInt32((__pyx_v_param_list[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2202, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "coremusic/capi.pyx":2204
 *             result.append(param_list[i])
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L7_return;
  }

  /* "coremusic/capi.pyx":2207
 * 
 *     finally:
 *         free(param_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L8_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        free(__pyx_v_param_list);
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L7_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_param_list);
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2148
 * 
 * 
 * def audio_unit_get_parameter_list(long audio_unit_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get list of parameter IDs for an AudioUnit
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2210
 * 
 * 
 * def audio_unit_get_parameter_info(long audio_unit_id, param_id, scope=0):             # <<<<<<<<<<<<<<
 *     """Get detailed information about a parameter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_213audio_unit_get_parameter_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_212audio_unit_get_parameter_info, "audio_unit_get_parameter_info(long audio_unit_id, param_id, scope=0)\n\nGet detailed information about a parameter\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    param_id: Parameter ID\n    scope: Parameter scope (0=global, 1=input, 2=output)\n\nReturns:\n    Dictionary with parameter metadata");
static PyMethodDef __pyx_mdef_9coremusic_4capi_213audio_unit_get_parameter_info = {"audio_unit_get_parameter_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_213audio_unit_get_parameter_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_212audio_unit_get_parameter_info};
static PyObject *__pyx_pw_9coremusic_4capi_213audio_unit_get_parameter_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_param_id = 0;
  PyObject *__pyx_v_scope = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_parameter_info (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_param_id,&__pyx_mstate_global->__pyx_n_u_scope,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2210, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2210, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2210, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2210, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_parameter_info", 0) < (0)) __PYX_ERR(0, 2210, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter_info", 0, 2, 3, i); __PYX_ERR(0, 2210, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2210, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2210, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2210, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2210, __pyx_L3_error)
    __pyx_v_param_id = values[1];
    __pyx_v_scope = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter_info", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2210, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_212audio_unit_get_parameter_info(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_param_id, __pyx_v_scope);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_212audio_unit_get_parameter_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_scope) {
  AudioUnit __pyx_v_unit;
  AudioUnitParameterInfo __pyx_v_param_info;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  char __pyx_v_buffer[256];
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_unit_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  AudioUnitScope __pyx_t_1;
  AudioUnitElement __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_parameter_info", 0);

  /* "coremusic/capi.pyx":2221
 *         Dictionary with parameter metadata
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioUnitParameterInfo param_info
 *     cdef cf.UInt32 data_size = sizeof(at.AudioUnitParameterInfo)
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2223
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef at.AudioUnitParameterInfo param_info
 *     cdef cf.UInt32 data_size = sizeof(at.AudioUnitParameterInfo)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef char buffer[STRING_BUFFER_SIZE]
*/
  __pyx_v_data_size = (sizeof(AudioUnitParameterInfo));

  /* "coremusic/capi.pyx":2232
 *         unit,
 *         at.kAudioUnitProperty_ParameterInfo,
 *         <at.AudioUnitScope>scope,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitElement>param_id,  # Use param_id as element
 *         &param_info,
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_scope); if (unlikely((__pyx_t_1 == ((AudioUnitScope)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2232, __pyx_L1_error)

  /* "coremusic/capi.pyx":2233
 *         at.kAudioUnitProperty_ParameterInfo,
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>param_id,  # Use param_id as element             # <<<<<<<<<<<<<<
 *         &param_info,
 *         &data_size
*/
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_param_id); if (unlikely((__pyx_t_2 == ((AudioUnitElement)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2233, __pyx_L1_error)

  /* "coremusic/capi.pyx":2229
 *     # Get parameter info
 *     # NOTE: For kAudioUnitProperty_ParameterInfo, the element argument should be the parameter ID
 *     status = at.AudioUnitGetProperty(             # <<<<<<<<<<<<<<
 *         unit,
 *         at.kAudioUnitProperty_ParameterInfo,
*/
  __pyx_v_status = AudioUnitGetProperty(__pyx_v_unit, kAudioUnitProperty_ParameterInfo, ((AudioUnitScope)__pyx_t_1), ((AudioUnitElement)__pyx_t_2), (&__pyx_v_param_info), (&__pyx_v_data_size));

  /* "coremusic/capi.pyx":2238
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitGetProperty (ParameterInfo) failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":2239
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitGetProperty (ParameterInfo) failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Extract name (prefer CFString if available)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitGetProperty_ParameterIn, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __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_ERR(0, 2239, __pyx_L1_error)

    /* "coremusic/capi.pyx":2238
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitGetProperty (ParameterInfo) failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2242
 * 
 *     # Extract name (prefer CFString if available)
 *     name = ""             # <<<<<<<<<<<<<<
 *     if param_info.cfNameString != NULL:
 *         # Verify it's actually a CFString before trying to use it
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
  __pyx_v_name = __pyx_mstate_global->__pyx_kp_u__7;

  /* "coremusic/capi.pyx":2243
 *     # Extract name (prefer CFString if available)
 *     name = ""
 *     if param_info.cfNameString != NULL:             # <<<<<<<<<<<<<<
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():
*/
  __pyx_t_3 = (__pyx_v_param_info.cfNameString != NULL);
  if (__pyx_t_3) {

    /* "coremusic/capi.pyx":2245
 *     if param_info.cfNameString != NULL:
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():             # <<<<<<<<<<<<<<
 *             if cf.CFStringGetCString(param_info.cfNameString, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 name = buffer.decode('utf-8')
*/
    __pyx_t_3 = (CFGetTypeID(((CFTypeRef)__pyx_v_param_info.cfNameString)) == CFStringGetTypeID());
    if (__pyx_t_3) {

      /* "coremusic/capi.pyx":2246
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.cfNameString, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                 name = buffer.decode('utf-8')
 * 
*/
      __pyx_t_3 = (CFStringGetCString(__pyx_v_param_info.cfNameString, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), kCFStringEncodingUTF8) != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":2247
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.cfNameString, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 name = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     # If we still don't have a name, use the C string name
*/
        __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2247, __pyx_L1_error)
        __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "coremusic/capi.pyx":2246
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.cfNameString, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                 name = buffer.decode('utf-8')
 * 
*/
      }

      /* "coremusic/capi.pyx":2245
 *     if param_info.cfNameString != NULL:
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():             # <<<<<<<<<<<<<<
 *             if cf.CFStringGetCString(param_info.cfNameString, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 name = buffer.decode('utf-8')
*/
    }

    /* "coremusic/capi.pyx":2243
 *     # Extract name (prefer CFString if available)
 *     name = ""
 *     if param_info.cfNameString != NULL:             # <<<<<<<<<<<<<<
 *         # Verify it's actually a CFString before trying to use it
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.cfNameString) == cf.CFStringGetTypeID():
*/
  }

  /* "coremusic/capi.pyx":2250
 * 
 *     # If we still don't have a name, use the C string name
 *     if not name:             # <<<<<<<<<<<<<<
 *         name = param_info.name[:52].decode('utf-8', errors='ignore').rstrip('\x00')
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2250, __pyx_L1_error)
  __pyx_t_10 = (!__pyx_t_3);
  if (__pyx_t_10) {

    /* "coremusic/capi.pyx":2251
 *     # If we still don't have a name, use the C string name
 *     if not name:
 *         name = param_info.name[:52].decode('utf-8', errors='ignore').rstrip('\x00')             # <<<<<<<<<<<<<<
 * 
 *     # Extract unit name
*/
    __pyx_t_11 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_param_info.name + 0, 52 - 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __pyx_t_11;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_errors, __pyx_mstate_global->__pyx_n_u_ignore, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_7 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u__8};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_rstrip, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":2250
 * 
 *     # If we still don't have a name, use the C string name
 *     if not name:             # <<<<<<<<<<<<<<
 *         name = param_info.name[:52].decode('utf-8', errors='ignore').rstrip('\x00')
 * 
*/
  }

  /* "coremusic/capi.pyx":2254
 * 
 *     # Extract unit name
 *     unit_name = ""             # <<<<<<<<<<<<<<
 *     if param_info.unitName != NULL:
 *         # Verify it's actually a CFString
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
  __pyx_v_unit_name = __pyx_mstate_global->__pyx_kp_u__7;

  /* "coremusic/capi.pyx":2255
 *     # Extract unit name
 *     unit_name = ""
 *     if param_info.unitName != NULL:             # <<<<<<<<<<<<<<
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():
*/
  __pyx_t_10 = (__pyx_v_param_info.unitName != NULL);
  if (__pyx_t_10) {

    /* "coremusic/capi.pyx":2257
 *     if param_info.unitName != NULL:
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():             # <<<<<<<<<<<<<<
 *             if cf.CFStringGetCString(param_info.unitName, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 unit_name = buffer.decode('utf-8')
*/
    __pyx_t_10 = (CFGetTypeID(((CFTypeRef)__pyx_v_param_info.unitName)) == CFStringGetTypeID());
    if (__pyx_t_10) {

      /* "coremusic/capi.pyx":2258
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.unitName, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                 unit_name = buffer.decode('utf-8')
 * 
*/
      __pyx_t_10 = (CFStringGetCString(__pyx_v_param_info.unitName, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), kCFStringEncodingUTF8) != 0);
      if (__pyx_t_10) {

        /* "coremusic/capi.pyx":2259
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.unitName, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 unit_name = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
        __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2259, __pyx_L1_error)
        __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_unit_name, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "coremusic/capi.pyx":2258
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():
 *             if cf.CFStringGetCString(param_info.unitName, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                 unit_name = buffer.decode('utf-8')
 * 
*/
      }

      /* "coremusic/capi.pyx":2257
 *     if param_info.unitName != NULL:
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():             # <<<<<<<<<<<<<<
 *             if cf.CFStringGetCString(param_info.unitName, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *                 unit_name = buffer.decode('utf-8')
*/
    }

    /* "coremusic/capi.pyx":2255
 *     # Extract unit name
 *     unit_name = ""
 *     if param_info.unitName != NULL:             # <<<<<<<<<<<<<<
 *         # Verify it's actually a CFString
 *         if cf.CFGetTypeID(<cf.CFTypeRef>param_info.unitName) == cf.CFStringGetTypeID():
*/
  }

  /* "coremusic/capi.pyx":2261
 *                 unit_name = buffer.decode('utf-8')
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'param_id': param_id,
 *         'name': name,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2262
 * 
 *     return {
 *         'param_id': param_id,             # <<<<<<<<<<<<<<
 *         'name': name,
 *         'unit_name': unit_name,
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_id, __pyx_v_param_id) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)

  /* "coremusic/capi.pyx":2263
 *     return {
 *         'param_id': param_id,
 *         'name': name,             # <<<<<<<<<<<<<<
 *         'unit_name': unit_name,
 *         'unit': param_info.unit,
*/
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name, __pyx_v_name) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)

  /* "coremusic/capi.pyx":2264
 *         'param_id': param_id,
 *         'name': name,
 *         'unit_name': unit_name,             # <<<<<<<<<<<<<<
 *         'unit': param_info.unit,
 *         'min_value': param_info.minValue,
*/
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_unit_name, __pyx_v_unit_name) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)

  /* "coremusic/capi.pyx":2265
 *         'name': name,
 *         'unit_name': unit_name,
 *         'unit': param_info.unit,             # <<<<<<<<<<<<<<
 *         'min_value': param_info.minValue,
 *         'max_value': param_info.maxValue,
*/
  __pyx_t_5 = __Pyx_PyLong_From_UInt32(__pyx_v_param_info.unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_unit, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":2266
 *         'unit_name': unit_name,
 *         'unit': param_info.unit,
 *         'min_value': param_info.minValue,             # <<<<<<<<<<<<<<
 *         'max_value': param_info.maxValue,
 *         'default_value': param_info.defaultValue,
*/
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_param_info.minValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_min_value, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":2267
 *         'unit': param_info.unit,
 *         'min_value': param_info.minValue,
 *         'max_value': param_info.maxValue,             # <<<<<<<<<<<<<<
 *         'default_value': param_info.defaultValue,
 *         'flags': param_info.flags,
*/
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_param_info.maxValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_max_value, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":2268
 *         'min_value': param_info.minValue,
 *         'max_value': param_info.maxValue,
 *         'default_value': param_info.defaultValue,             # <<<<<<<<<<<<<<
 *         'flags': param_info.flags,
 *         'clump_id': param_info.clumpID
*/
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_param_info.defaultValue); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_default_value, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":2269
 *         'max_value': param_info.maxValue,
 *         'default_value': param_info.defaultValue,
 *         'flags': param_info.flags,             # <<<<<<<<<<<<<<
 *         'clump_id': param_info.clumpID
 *     }
*/
  __pyx_t_5 = __Pyx_PyLong_From_UInt32(__pyx_v_param_info.flags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":2270
 *         'default_value': param_info.defaultValue,
 *         'flags': param_info.flags,
 *         'clump_id': param_info.clumpID             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_5 = __Pyx_PyLong_From_UInt32(__pyx_v_param_info.clumpID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_clump_id, __pyx_t_5) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2210
 * 
 * 
 * def audio_unit_get_parameter_info(long audio_unit_id, param_id, scope=0):             # <<<<<<<<<<<<<<
 *     """Get detailed information about a parameter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_unit_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2274
 * 
 * 
 * def audio_unit_get_parameter(long audio_unit_id, param_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get current value of a parameter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_215audio_unit_get_parameter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_214audio_unit_get_parameter, "audio_unit_get_parameter(long audio_unit_id, param_id, scope=0, element=0)\n\nGet current value of a parameter\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    param_id: Parameter ID\n    scope: Parameter scope (0=global, 1=input, 2=output)\n    element: Element number (usually 0)\n\nReturns:\n    Current parameter value (float)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_215audio_unit_get_parameter = {"audio_unit_get_parameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_215audio_unit_get_parameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_214audio_unit_get_parameter};
static PyObject *__pyx_pw_9coremusic_4capi_215audio_unit_get_parameter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_param_id = 0;
  PyObject *__pyx_v_scope = 0;
  PyObject *__pyx_v_element = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_parameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_param_id,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2274, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_parameter", 0) < (0)) __PYX_ERR(0, 2274, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter", 0, 2, 4, i); __PYX_ERR(0, 2274, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2274, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2274, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2274, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2274, __pyx_L3_error)
    __pyx_v_param_id = values[1];
    __pyx_v_scope = values[2];
    __pyx_v_element = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_parameter", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2274, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_214audio_unit_get_parameter(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_param_id, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_214audio_unit_get_parameter(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_scope, PyObject *__pyx_v_element) {
  AudioUnit __pyx_v_unit;
  AudioUnitParameterValue __pyx_v_value;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  AudioUnitParameterID __pyx_t_1;
  AudioUnitScope __pyx_t_2;
  AudioUnitElement __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_parameter", 0);

  /* "coremusic/capi.pyx":2286
 *         Current parameter value (float)
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef at.AudioUnitParameterValue value = 0.0
 *     cdef cf.OSStatus status
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2287
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef at.AudioUnitParameterValue value = 0.0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_value = 0.0;

  /* "coremusic/capi.pyx":2292
 *     status = at.AudioUnitGetParameter(
 *         unit,
 *         <at.AudioUnitParameterID>param_id,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_param_id); if (unlikely((__pyx_t_1 == ((AudioUnitParameterID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2292, __pyx_L1_error)

  /* "coremusic/capi.pyx":2293
 *         unit,
 *         <at.AudioUnitParameterID>param_id,
 *         <at.AudioUnitScope>scope,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitElement>element,
 *         &value
*/
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_scope); if (unlikely((__pyx_t_2 == ((AudioUnitScope)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2293, __pyx_L1_error)

  /* "coremusic/capi.pyx":2294
 *         <at.AudioUnitParameterID>param_id,
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,             # <<<<<<<<<<<<<<
 *         &value
 *     )
*/
  __pyx_t_3 = __Pyx_PyLong_As_UInt32(__pyx_v_element); if (unlikely((__pyx_t_3 == ((AudioUnitElement)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L1_error)

  /* "coremusic/capi.pyx":2290
 *     cdef cf.OSStatus status
 * 
 *     status = at.AudioUnitGetParameter(             # <<<<<<<<<<<<<<
 *         unit,
 *         <at.AudioUnitParameterID>param_id,
*/
  __pyx_v_status = AudioUnitGetParameter(__pyx_v_unit, ((AudioUnitParameterID)__pyx_t_1), ((AudioUnitScope)__pyx_t_2), ((AudioUnitElement)__pyx_t_3), (&__pyx_v_value));

  /* "coremusic/capi.pyx":2298
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetParameter"))
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":2299
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetParameter"))             # <<<<<<<<<<<<<<
 * 
 *     return value
*/
    __pyx_t_6 = NULL;
    __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitGetParameter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __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_ERR(0, 2299, __pyx_L1_error)

    /* "coremusic/capi.pyx":2298
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetParameter"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2301
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitGetParameter"))
 * 
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2274
 * 
 * 
 * def audio_unit_get_parameter(long audio_unit_id, param_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get current value of a parameter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2304
 * 
 * 
 * def audio_unit_set_parameter(long audio_unit_id, param_id, value, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Set value of a parameter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_217audio_unit_set_parameter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_216audio_unit_set_parameter, "audio_unit_set_parameter(long audio_unit_id, param_id, value, scope=0, element=0)\n\nSet value of a parameter\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    param_id: Parameter ID\n    value: New parameter value (float)\n    scope: Parameter scope (0=global, 1=input, 2=output)\n    element: Element number (usually 0)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_217audio_unit_set_parameter = {"audio_unit_set_parameter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_217audio_unit_set_parameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_216audio_unit_set_parameter};
static PyObject *__pyx_pw_9coremusic_4capi_217audio_unit_set_parameter(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_param_id = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_scope = 0;
  PyObject *__pyx_v_element = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_set_parameter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_param_id,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_scope,&__pyx_mstate_global->__pyx_n_u_element,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2304, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_set_parameter", 0) < (0)) __PYX_ERR(0, 2304, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_set_parameter", 0, 3, 5, i); __PYX_ERR(0, 2304, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2304, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2304, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2304, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2304, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2304, __pyx_L3_error)
    __pyx_v_param_id = values[1];
    __pyx_v_value = values[2];
    __pyx_v_scope = values[3];
    __pyx_v_element = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_set_parameter", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 2304, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_216audio_unit_set_parameter(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_param_id, __pyx_v_value, __pyx_v_scope, __pyx_v_element);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_216audio_unit_set_parameter(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_param_id, PyObject *__pyx_v_value, PyObject *__pyx_v_scope, PyObject *__pyx_v_element) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  AudioUnitParameterID __pyx_t_1;
  AudioUnitScope __pyx_t_2;
  AudioUnitElement __pyx_t_3;
  AudioUnitParameterValue __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_set_parameter", 0);

  /* "coremusic/capi.pyx":2314
 *         element: Element number (usually 0)
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2319
 *     status = at.AudioUnitSetParameter(
 *         unit,
 *         <at.AudioUnitParameterID>param_id,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_param_id); if (unlikely((__pyx_t_1 == ((AudioUnitParameterID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2319, __pyx_L1_error)

  /* "coremusic/capi.pyx":2320
 *         unit,
 *         <at.AudioUnitParameterID>param_id,
 *         <at.AudioUnitScope>scope,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitElement>element,
 *         <at.AudioUnitParameterValue>value,
*/
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_scope); if (unlikely((__pyx_t_2 == ((AudioUnitScope)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2320, __pyx_L1_error)

  /* "coremusic/capi.pyx":2321
 *         <at.AudioUnitParameterID>param_id,
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,             # <<<<<<<<<<<<<<
 *         <at.AudioUnitParameterValue>value,
 *         0  # buffer offset in frames
*/
  __pyx_t_3 = __Pyx_PyLong_As_UInt32(__pyx_v_element); if (unlikely((__pyx_t_3 == ((AudioUnitElement)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2321, __pyx_L1_error)

  /* "coremusic/capi.pyx":2322
 *         <at.AudioUnitScope>scope,
 *         <at.AudioUnitElement>element,
 *         <at.AudioUnitParameterValue>value,             # <<<<<<<<<<<<<<
 *         0  # buffer offset in frames
 *     )
*/
  __pyx_t_4 = __Pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_4 == ((AudioUnitParameterValue)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2322, __pyx_L1_error)

  /* "coremusic/capi.pyx":2317
 *     cdef cf.OSStatus status
 * 
 *     status = at.AudioUnitSetParameter(             # <<<<<<<<<<<<<<
 *         unit,
 *         <at.AudioUnitParameterID>param_id,
*/
  __pyx_v_status = AudioUnitSetParameter(__pyx_v_unit, ((AudioUnitParameterID)__pyx_t_1), ((AudioUnitScope)__pyx_t_2), ((AudioUnitElement)__pyx_t_3), ((AudioUnitParameterValue)__pyx_t_4), 0);

  /* "coremusic/capi.pyx":2326
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetParameter"))
 * 
*/
  __pyx_t_5 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_5)) {

    /* "coremusic/capi.pyx":2327
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetParameter"))             # <<<<<<<<<<<<<<
 * 
 *     return 0
*/
    __pyx_t_7 = NULL;
    __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitSetParameter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 2327, __pyx_L1_error)

    /* "coremusic/capi.pyx":2326
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetParameter"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2329
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitSetParameter"))
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2304
 * 
 * 
 * def audio_unit_set_parameter(long audio_unit_id, param_id, value, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Set value of a parameter
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2332
 * 
 * 
 * def audio_unit_get_factory_presets(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Get list of factory presets for an AudioUnit
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_219audio_unit_get_factory_presets(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_218audio_unit_get_factory_presets, "audio_unit_get_factory_presets(long audio_unit_id)\n\nGet list of factory presets for an AudioUnit\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n\nReturns:\n    List of dictionaries with keys: number, name");
static PyMethodDef __pyx_mdef_9coremusic_4capi_219audio_unit_get_factory_presets = {"audio_unit_get_factory_presets", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_219audio_unit_get_factory_presets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_218audio_unit_get_factory_presets};
static PyObject *__pyx_pw_9coremusic_4capi_219audio_unit_get_factory_presets(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_get_factory_presets (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2332, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2332, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_get_factory_presets", 0) < (0)) __PYX_ERR(0, 2332, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_get_factory_presets", 1, 1, 1, i); __PYX_ERR(0, 2332, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2332, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2332, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_get_factory_presets", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2332, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_factory_presets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_218audio_unit_get_factory_presets(__pyx_self, __pyx_v_audio_unit_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_218audio_unit_get_factory_presets(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id) {
  AudioUnit __pyx_v_unit;
  UInt32 __pyx_v_data_size;
  Boolean __pyx_v_writable;
  OSStatus __pyx_v_status;
  CFArrayRef __pyx_v_presets_array;
  CFIndex __pyx_v_num_presets;
  AUPreset *__pyx_v_preset;
  char __pyx_v_buffer[256];
  SInt32 __pyx_v_preset_number;
  PyObject *__pyx_v_preset_name = 0;
  PyObject *__pyx_v_result = 0;
  CFIndex __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  CFIndex __pyx_t_4;
  CFIndex __pyx_t_5;
  CFIndex __pyx_t_6;
  SInt32 __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_factory_presets", 0);

  /* "coremusic/capi.pyx":2342
 *     """
 *     # Declare C variables
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2343
 *     # Declare C variables
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.Boolean writable = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":2344
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef cf.CFArrayRef presets_array = NULL
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":2346
 *     cdef cf.Boolean writable = 0
 *     cdef cf.OSStatus status
 *     cdef cf.CFArrayRef presets_array = NULL             # <<<<<<<<<<<<<<
 *     cdef cf.CFIndex num_presets
 *     cdef at.AUPreset* preset
*/
  __pyx_v_presets_array = NULL;

  /* "coremusic/capi.pyx":2352
 *     cdef cf.SInt32 preset_number
 *     cdef str preset_name
 *     cdef list result = []             # <<<<<<<<<<<<<<
 * 
 *     # Get factory presets property
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2355
 * 
 *     # Get factory presets property
 *     status = at.AudioUnitGetPropertyInfo(             # <<<<<<<<<<<<<<
 *         unit,
 *         at.kAudioUnitProperty_FactoryPresets,
*/
  __pyx_v_status = AudioUnitGetPropertyInfo(__pyx_v_unit, kAudioUnitProperty_FactoryPresets, kAudioUnitScope_Global, 0, (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":2364
 *     )
 * 
 *     if status != 0 or data_size == 0:             # <<<<<<<<<<<<<<
 *         return []  # No factory presets
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_data_size == 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":2365
 * 
 *     if status != 0 or data_size == 0:
 *         return []  # No factory presets             # <<<<<<<<<<<<<<
 * 
 *     # Get the presets array
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2364
 *     )
 * 
 *     if status != 0 or data_size == 0:             # <<<<<<<<<<<<<<
 *         return []  # No factory presets
 * 
*/
  }

  /* "coremusic/capi.pyx":2368
 * 
 *     # Get the presets array
 *     data_size = sizeof(cf.CFArrayRef)             # <<<<<<<<<<<<<<
 *     status = at.AudioUnitGetProperty(
 *         unit,
*/
  __pyx_v_data_size = (sizeof(CFArrayRef));

  /* "coremusic/capi.pyx":2369
 *     # Get the presets array
 *     data_size = sizeof(cf.CFArrayRef)
 *     status = at.AudioUnitGetProperty(             # <<<<<<<<<<<<<<
 *         unit,
 *         at.kAudioUnitProperty_FactoryPresets,
*/
  __pyx_v_status = AudioUnitGetProperty(__pyx_v_unit, kAudioUnitProperty_FactoryPresets, kAudioUnitScope_Global, 0, (&__pyx_v_presets_array), (&__pyx_v_data_size));

  /* "coremusic/capi.pyx":2378
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":2379
 * 
 *     if status != 0:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     if presets_array == NULL:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2378
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":2381
 *         return []
 * 
 *     if presets_array == NULL:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_2 = (__pyx_v_presets_array == NULL);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":2382
 * 
 *     if presets_array == NULL:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     # Get preset count
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2381
 *         return []
 * 
 *     if presets_array == NULL:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":2385
 * 
 *     # Get preset count
 *     num_presets = cf.CFArrayGetCount(presets_array)             # <<<<<<<<<<<<<<
 * 
 *     # If no presets, clean up and return empty list
*/
  __pyx_v_num_presets = CFArrayGetCount(__pyx_v_presets_array);

  /* "coremusic/capi.pyx":2388
 * 
 *     # If no presets, clean up and return empty list
 *     if num_presets == 0:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(<cf.CFTypeRef>presets_array)
 *         return []
*/
  __pyx_t_2 = (__pyx_v_num_presets == 0);
  if (__pyx_t_2) {

    /* "coremusic/capi.pyx":2389
 *     # If no presets, clean up and return empty list
 *     if num_presets == 0:
 *         cf.CFRelease(<cf.CFTypeRef>presets_array)             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
    CFRelease(((CFTypeRef)__pyx_v_presets_array));

    /* "coremusic/capi.pyx":2390
 *     if num_presets == 0:
 *         cf.CFRelease(<cf.CFTypeRef>presets_array)
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     # Extract presets from CFArray
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2388
 * 
 *     # If no presets, clean up and return empty list
 *     if num_presets == 0:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(<cf.CFTypeRef>presets_array)
 *         return []
*/
  }

  /* "coremusic/capi.pyx":2395
 *     # NOTE: According to Apple TechNote TN2157, kAudioUnitProperty_FactoryPresets
 *     # returns a CFArray of AUPreset structs (not CFDictionaries!)
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(num_presets):
 *             # Get pointer to AUPreset struct from the array
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2396
 *     # returns a CFArray of AUPreset structs (not CFDictionaries!)
 *     try:
 *         for i in range(num_presets):             # <<<<<<<<<<<<<<
 *             # Get pointer to AUPreset struct from the array
 *             preset = <at.AUPreset*>cf.CFArrayGetValueAtIndex(presets_array, i)
*/
    __pyx_t_4 = __pyx_v_num_presets;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "coremusic/capi.pyx":2398
 *         for i in range(num_presets):
 *             # Get pointer to AUPreset struct from the array
 *             preset = <at.AUPreset*>cf.CFArrayGetValueAtIndex(presets_array, i)             # <<<<<<<<<<<<<<
 *             if preset != NULL:
 *                 preset_number = preset.presetNumber
*/
      __pyx_v_preset = ((AUPreset *)CFArrayGetValueAtIndex(__pyx_v_presets_array, __pyx_v_i));

      /* "coremusic/capi.pyx":2399
 *             # Get pointer to AUPreset struct from the array
 *             preset = <at.AUPreset*>cf.CFArrayGetValueAtIndex(presets_array, i)
 *             if preset != NULL:             # <<<<<<<<<<<<<<
 *                 preset_number = preset.presetNumber
 *                 preset_name = ""
*/
      __pyx_t_2 = (__pyx_v_preset != NULL);
      if (__pyx_t_2) {

        /* "coremusic/capi.pyx":2400
 *             preset = <at.AUPreset*>cf.CFArrayGetValueAtIndex(presets_array, i)
 *             if preset != NULL:
 *                 preset_number = preset.presetNumber             # <<<<<<<<<<<<<<
 *                 preset_name = ""
 * 
*/
        __pyx_t_7 = __pyx_v_preset->presetNumber;
        __pyx_v_preset_number = __pyx_t_7;

        /* "coremusic/capi.pyx":2401
 *             if preset != NULL:
 *                 preset_number = preset.presetNumber
 *                 preset_name = ""             # <<<<<<<<<<<<<<
 * 
 *                 # Get preset name from the CFStringRef in the struct
*/
        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7);
        __Pyx_XDECREF_SET(__pyx_v_preset_name, __pyx_mstate_global->__pyx_kp_u__7);

        /* "coremusic/capi.pyx":2404
 * 
 *                 # Get preset name from the CFStringRef in the struct
 *                 if preset.presetName != NULL:             # <<<<<<<<<<<<<<
 *                     if cf.CFStringGetCString(preset.presetName, buffer, sizeof(buffer), 0x08000100):
 *                         preset_name = buffer.decode('utf-8')
*/
        __pyx_t_2 = (__pyx_v_preset->presetName != NULL);
        if (__pyx_t_2) {

          /* "coremusic/capi.pyx":2405
 *                 # Get preset name from the CFStringRef in the struct
 *                 if preset.presetName != NULL:
 *                     if cf.CFStringGetCString(preset.presetName, buffer, sizeof(buffer), 0x08000100):             # <<<<<<<<<<<<<<
 *                         preset_name = buffer.decode('utf-8')
 * 
*/
          __pyx_t_2 = (CFStringGetCString(__pyx_v_preset->presetName, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), 0x08000100) != 0);
          if (__pyx_t_2) {

            /* "coremusic/capi.pyx":2406
 *                 if preset.presetName != NULL:
 *                     if cf.CFStringGetCString(preset.presetName, buffer, sizeof(buffer), 0x08000100):
 *                         preset_name = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *                 result.append({
*/
            __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2406, __pyx_L10_error)
            __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF_SET(__pyx_v_preset_name, ((PyObject*)__pyx_t_1));
            __pyx_t_1 = 0;

            /* "coremusic/capi.pyx":2405
 *                 # Get preset name from the CFStringRef in the struct
 *                 if preset.presetName != NULL:
 *                     if cf.CFStringGetCString(preset.presetName, buffer, sizeof(buffer), 0x08000100):             # <<<<<<<<<<<<<<
 *                         preset_name = buffer.decode('utf-8')
 * 
*/
          }

          /* "coremusic/capi.pyx":2404
 * 
 *                 # Get preset name from the CFStringRef in the struct
 *                 if preset.presetName != NULL:             # <<<<<<<<<<<<<<
 *                     if cf.CFStringGetCString(preset.presetName, buffer, sizeof(buffer), 0x08000100):
 *                         preset_name = buffer.decode('utf-8')
*/
        }

        /* "coremusic/capi.pyx":2409
 * 
 *                 result.append({
 *                     'number': preset_number,             # <<<<<<<<<<<<<<
 *                     'name': preset_name
 *                 })
*/
        __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyLong_From_SInt32(__pyx_v_preset_number); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2409, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_number, __pyx_t_9) < (0)) __PYX_ERR(0, 2409, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "coremusic/capi.pyx":2410
 *                 result.append({
 *                     'number': preset_number,
 *                     'name': preset_name             # <<<<<<<<<<<<<<
 *                 })
 *     finally:
*/
        if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name, __pyx_v_preset_name) < (0)) __PYX_ERR(0, 2409, __pyx_L10_error)

        /* "coremusic/capi.pyx":2408
 *                         preset_name = buffer.decode('utf-8')
 * 
 *                 result.append({             # <<<<<<<<<<<<<<
 *                     'number': preset_number,
 *                     'name': preset_name
*/
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2408, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "coremusic/capi.pyx":2399
 *             # Get pointer to AUPreset struct from the array
 *             preset = <at.AUPreset*>cf.CFArrayGetValueAtIndex(presets_array, i)
 *             if preset != NULL:             # <<<<<<<<<<<<<<
 *                 preset_number = preset.presetNumber
 *                 preset_name = ""
*/
      }
    }
  }

  /* "coremusic/capi.pyx":2414
 *     finally:
 *         # Release the presets array
 *         if presets_array != NULL:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)
 * 
*/
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_2 = (__pyx_v_presets_array != NULL);
      if (__pyx_t_2) {

        /* "coremusic/capi.pyx":2415
 *         # Release the presets array
 *         if presets_array != NULL:
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
        CFRelease(((CFTypeRef)__pyx_v_presets_array));

        /* "coremusic/capi.pyx":2414
 *     finally:
 *         # Release the presets array
 *         if presets_array != NULL:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)
 * 
*/
      }
      goto __pyx_L11;
    }
    __pyx_L10_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
      {
        __pyx_t_2 = (__pyx_v_presets_array != NULL);
        if (__pyx_t_2) {

          /* "coremusic/capi.pyx":2415
 *         # Release the presets array
 *         if presets_array != NULL:
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
          CFRelease(((CFTypeRef)__pyx_v_presets_array));

          /* "coremusic/capi.pyx":2414
 *     finally:
 *         # Release the presets array
 *         if presets_array != NULL:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
      goto __pyx_L1_error;
    }
    __pyx_L11:;
  }

  /* "coremusic/capi.pyx":2417
 *             cf.CFRelease(<cf.CFTypeRef>presets_array)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2332
 * 
 * 
 * def audio_unit_get_factory_presets(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Get list of factory presets for an AudioUnit
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_get_factory_presets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_preset_name);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2420
 * 
 * 
 * def audio_unit_set_current_preset(long audio_unit_id, preset_number):             # <<<<<<<<<<<<<<
 *     """Set the current preset for an AudioUnit
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_221audio_unit_set_current_preset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_220audio_unit_set_current_preset, "audio_unit_set_current_preset(long audio_unit_id, preset_number)\n\nSet the current preset for an AudioUnit\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    preset_number: Preset number from factory presets list");
static PyMethodDef __pyx_mdef_9coremusic_4capi_221audio_unit_set_current_preset = {"audio_unit_set_current_preset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_221audio_unit_set_current_preset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_220audio_unit_set_current_preset};
static PyObject *__pyx_pw_9coremusic_4capi_221audio_unit_set_current_preset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_preset_number = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_set_current_preset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_preset_number,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2420, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2420, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2420, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_set_current_preset", 0) < (0)) __PYX_ERR(0, 2420, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_set_current_preset", 1, 2, 2, i); __PYX_ERR(0, 2420, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2420, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2420, __pyx_L3_error)
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L3_error)
    __pyx_v_preset_number = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_set_current_preset", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2420, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_current_preset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_220audio_unit_set_current_preset(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_preset_number);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_220audio_unit_set_current_preset(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_preset_number) {
  AudioUnit __pyx_v_unit;
  AUPreset __pyx_v_preset;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SInt32 __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_set_current_preset", 0);

  /* "coremusic/capi.pyx":2427
 *         preset_number: Preset number from factory presets list
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef at.AUPreset preset
 *     cdef cf.OSStatus status
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2433
 *     # Note: We can't easily create CFString here, so we just set the number
 *     # The AudioUnit will look up the preset by number
 *     preset.presetNumber = preset_number             # <<<<<<<<<<<<<<
 *     preset.presetName = NULL
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_SInt32(__pyx_v_preset_number); if (unlikely((__pyx_t_1 == ((SInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2433, __pyx_L1_error)
  __pyx_v_preset.presetNumber = __pyx_t_1;

  /* "coremusic/capi.pyx":2434
 *     # The AudioUnit will look up the preset by number
 *     preset.presetNumber = preset_number
 *     preset.presetName = NULL             # <<<<<<<<<<<<<<
 * 
 *     status = at.AudioUnitSetProperty(
*/
  __pyx_v_preset.presetName = NULL;

  /* "coremusic/capi.pyx":2436
 *     preset.presetName = NULL
 * 
 *     status = at.AudioUnitSetProperty(             # <<<<<<<<<<<<<<
 *         unit,
 *         at.kAudioUnitProperty_PresentPreset,
*/
  __pyx_v_status = AudioUnitSetProperty(__pyx_v_unit, kAudioUnitProperty_PresentPreset, kAudioUnitScope_Global, 0, (&__pyx_v_preset), (sizeof(AUPreset)));

  /* "coremusic/capi.pyx":2445
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitSetProperty (PresentPreset) failed with status: {status}")
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":2446
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitSetProperty (PresentPreset) failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return 0
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitSetProperty_PresentPres, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2446, __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_ERR(0, 2446, __pyx_L1_error)

    /* "coremusic/capi.pyx":2445
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitSetProperty (PresentPreset) failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2448
 *         raise RuntimeError(f"AudioUnitSetProperty (PresentPreset) failed with status: {status}")
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2420
 * 
 * 
 * def audio_unit_set_current_preset(long audio_unit_id, preset_number):             # <<<<<<<<<<<<<<
 *     """Set the current preset for an AudioUnit
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_set_current_preset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2451
 * 
 * 
 * def audio_unit_render(long audio_unit_id, input_data, num_frames, sample_rate=44100.0, num_channels=2):             # <<<<<<<<<<<<<<
 *     """Process audio through an AudioUnit
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_223audio_unit_render(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_222audio_unit_render, "audio_unit_render(long audio_unit_id, input_data, num_frames, sample_rate=44100.0, num_channels=2)\n\nProcess audio through an AudioUnit\n\nArgs:\n    audio_unit_id: AudioUnit instance ID\n    input_data: Input audio data as bytes (interleaved float32)\n    num_frames: Number of frames to process\n    sample_rate: Sample rate (default 44100.0)\n    num_channels: Number of channels (default 2)\n\nReturns:\n    Processed audio data as bytes");
static PyMethodDef __pyx_mdef_9coremusic_4capi_223audio_unit_render = {"audio_unit_render", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_223audio_unit_render, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_222audio_unit_render};
static PyObject *__pyx_pw_9coremusic_4capi_223audio_unit_render(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  PyObject *__pyx_v_input_data = 0;
  PyObject *__pyx_v_num_frames = 0;
  CYTHON_UNUSED PyObject *__pyx_v_sample_rate = 0;
  PyObject *__pyx_v_num_channels = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_render (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_input_data,&__pyx_mstate_global->__pyx_n_u_num_frames,&__pyx_mstate_global->__pyx_n_u_sample_rate,&__pyx_mstate_global->__pyx_n_u_num_channels,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2451, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_render", 0) < (0)) __PYX_ERR(0, 2451, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_44100_0)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2)));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_render", 0, 3, 5, i); __PYX_ERR(0, 2451, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2451, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2451, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2451, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2451, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_44100_0)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2)));
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2451, __pyx_L3_error)
    __pyx_v_input_data = values[1];
    __pyx_v_num_frames = values[2];
    __pyx_v_sample_rate = values[3];
    __pyx_v_num_channels = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_render", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 2451, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_unit_render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_222audio_unit_render(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_input_data, __pyx_v_num_frames, __pyx_v_sample_rate, __pyx_v_num_channels);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_222audio_unit_render(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, PyObject *__pyx_v_input_data, PyObject *__pyx_v_num_frames, CYTHON_UNUSED PyObject *__pyx_v_sample_rate, PyObject *__pyx_v_num_channels) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  AudioUnitRenderActionFlags __pyx_v_flags;
  AudioTimeStamp __pyx_v_timestamp;
  AudioBufferList *__pyx_v_buffer_list;
  UInt32 __pyx_v_buffer_size;
  PyObject *__pyx_v_output_data = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  UInt32 __pyx_t_4;
  int __pyx_t_5;
  size_t __pyx_t_6;
  char const *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_render", 0);

  /* "coremusic/capi.pyx":2464
 *         Processed audio data as bytes
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitRenderActionFlags flags = 0
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2466
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitRenderActionFlags flags = 0             # <<<<<<<<<<<<<<
 *     cdef ca.AudioTimeStamp timestamp
 *     cdef ca.AudioBufferList* buffer_list = NULL
*/
  __pyx_v_flags = 0;

  /* "coremusic/capi.pyx":2468
 *     cdef at.AudioUnitRenderActionFlags flags = 0
 *     cdef ca.AudioTimeStamp timestamp
 *     cdef ca.AudioBufferList* buffer_list = NULL             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 buffer_size = num_frames * num_channels * sizeof(cf.Float32)
 *     cdef bytes output_data
*/
  __pyx_v_buffer_list = NULL;

  /* "coremusic/capi.pyx":2469
 *     cdef ca.AudioTimeStamp timestamp
 *     cdef ca.AudioBufferList* buffer_list = NULL
 *     cdef cf.UInt32 buffer_size = num_frames * num_channels * sizeof(cf.Float32)             # <<<<<<<<<<<<<<
 *     cdef bytes output_data
 * 
*/
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_num_frames, __pyx_v_num_channels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t((sizeof(Float32))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2469, __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_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_buffer_size = __pyx_t_4;

  /* "coremusic/capi.pyx":2473
 * 
 *     # Allocate AudioBufferList
 *     buffer_list = <ca.AudioBufferList*>malloc(             # <<<<<<<<<<<<<<
 *         sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)
 *     )
*/
  __pyx_v_buffer_list = ((AudioBufferList *)malloc(((sizeof(AudioBufferList)) + (0 * (sizeof(AudioBuffer))))));

  /* "coremusic/capi.pyx":2476
 *         sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)
 *     )
 *     if buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate AudioBufferList")
 * 
*/
  __pyx_t_5 = (__pyx_v_buffer_list == NULL);
  if (unlikely(__pyx_t_5)) {

    /* "coremusic/capi.pyx":2477
 *     )
 *     if buffer_list == NULL:
 *         raise MemoryError("Could not allocate AudioBufferList")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_2 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_AudioBufferLi};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2477, __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_ERR(0, 2477, __pyx_L1_error)

    /* "coremusic/capi.pyx":2476
 *         sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)
 *     )
 *     if buffer_list == NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate AudioBufferList")
 * 
*/
  }

  /* "coremusic/capi.pyx":2479
 *         raise MemoryError("Could not allocate AudioBufferList")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Setup buffer list
 *         buffer_list.mNumberBuffers = 1
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2481
 *     try:
 *         # Setup buffer list
 *         buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mNumberChannels = num_channels
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
*/
    __pyx_v_buffer_list->mNumberBuffers = 1;

    /* "coremusic/capi.pyx":2482
 *         # Setup buffer list
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = num_channels             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *         buffer_list.mBuffers[0].mData = malloc(buffer_size)
*/
    __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_v_num_channels); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2482, __pyx_L5_error)
    (__pyx_v_buffer_list->mBuffers[0]).mNumberChannels = __pyx_t_4;

    /* "coremusic/capi.pyx":2483
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = num_channels
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mData = malloc(buffer_size)
 * 
*/
    (__pyx_v_buffer_list->mBuffers[0]).mDataByteSize = __pyx_v_buffer_size;

    /* "coremusic/capi.pyx":2484
 *         buffer_list.mBuffers[0].mNumberChannels = num_channels
 *         buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *         buffer_list.mBuffers[0].mData = malloc(buffer_size)             # <<<<<<<<<<<<<<
 * 
 *         if buffer_list.mBuffers[0].mData == NULL:
*/
    (__pyx_v_buffer_list->mBuffers[0]).mData = malloc(__pyx_v_buffer_size);

    /* "coremusic/capi.pyx":2486
 *         buffer_list.mBuffers[0].mData = malloc(buffer_size)
 * 
 *         if buffer_list.mBuffers[0].mData == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("Could not allocate audio buffer")
 * 
*/
    __pyx_t_5 = ((__pyx_v_buffer_list->mBuffers[0]).mData == NULL);
    if (unlikely(__pyx_t_5)) {

      /* "coremusic/capi.pyx":2487
 * 
 *         if buffer_list.mBuffers[0].mData == NULL:
 *             raise MemoryError("Could not allocate audio buffer")             # <<<<<<<<<<<<<<
 * 
 *         # Copy input data to buffer
*/
      __pyx_t_2 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_audio_buffer};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2487, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 2487, __pyx_L5_error)

      /* "coremusic/capi.pyx":2486
 *         buffer_list.mBuffers[0].mData = malloc(buffer_size)
 * 
 *         if buffer_list.mBuffers[0].mData == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("Could not allocate audio buffer")
 * 
*/
    }

    /* "coremusic/capi.pyx":2490
 * 
 *         # Copy input data to buffer
 *         memcpy(buffer_list.mBuffers[0].mData, <const char*>input_data, min(buffer_size, len(input_data)))             # <<<<<<<<<<<<<<
 * 
 *         # Setup timestamp
*/
    __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_input_data); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L5_error)
    __pyx_t_8 = PyObject_Length(__pyx_v_input_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2490, __pyx_L5_error)
    __pyx_t_4 = __pyx_v_buffer_size;
    __pyx_t_5 = (__pyx_t_8 < __pyx_t_4);
    if (__pyx_t_5) {
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_4;
    }
    (void)(memcpy((__pyx_v_buffer_list->mBuffers[0]).mData, ((char const *)__pyx_t_7), __pyx_t_9));

    /* "coremusic/capi.pyx":2493
 * 
 *         # Setup timestamp
 *         memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))             # <<<<<<<<<<<<<<
 *         timestamp.mSampleTime = 0
 *         timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid
*/
    (void)(memset((&__pyx_v_timestamp), 0, (sizeof(AudioTimeStamp))));

    /* "coremusic/capi.pyx":2494
 *         # Setup timestamp
 *         memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))
 *         timestamp.mSampleTime = 0             # <<<<<<<<<<<<<<
 *         timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid
 * 
*/
    __pyx_v_timestamp.mSampleTime = 0.0;

    /* "coremusic/capi.pyx":2495
 *         memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))
 *         timestamp.mSampleTime = 0
 *         timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid             # <<<<<<<<<<<<<<
 * 
 *         # Render audio
*/
    __pyx_v_timestamp.mFlags = kAudioTimeStampSampleTimeValid;

    /* "coremusic/capi.pyx":2503
 *             &timestamp,
 *             0,  # output bus
 *             <cf.UInt32>num_frames,             # <<<<<<<<<<<<<<
 *             buffer_list
 *         )
*/
    __pyx_t_4 = __Pyx_PyLong_As_UInt32(__pyx_v_num_frames); if (unlikely((__pyx_t_4 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L5_error)

    /* "coremusic/capi.pyx":2498
 * 
 *         # Render audio
 *         status = at.AudioUnitRender(             # <<<<<<<<<<<<<<
 *             unit,
 *             &flags,
*/
    __pyx_v_status = AudioUnitRender(__pyx_v_unit, (&__pyx_v_flags), (&__pyx_v_timestamp), 0, ((UInt32)__pyx_t_4), __pyx_v_buffer_list);

    /* "coremusic/capi.pyx":2507
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))
 * 
*/
    __pyx_t_5 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_5)) {

      /* "coremusic/capi.pyx":2508
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))             # <<<<<<<<<<<<<<
 * 
 *         # Copy output data
*/
      __pyx_t_2 = NULL;
      __pyx_t_1 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitRender); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2508, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 2508, __pyx_L5_error)

      /* "coremusic/capi.pyx":2507
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))
 * 
*/
    }

    /* "coremusic/capi.pyx":2511
 * 
 *         # Copy output data
 *         output_data = (<char*>buffer_list.mBuffers[0].mData)[:buffer_size]             # <<<<<<<<<<<<<<
 * 
 *         return output_data
*/
    __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char *)(__pyx_v_buffer_list->mBuffers[0]).mData) + 0, __pyx_v_buffer_size - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2511, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_output_data = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":2513
 *         output_data = (<char*>buffer_list.mBuffers[0].mData)[:buffer_size]
 * 
 *         return output_data             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_output_data);
    __pyx_r = __pyx_v_output_data;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":2516
 * 
 *     finally:
 *         if buffer_list != NULL:             # <<<<<<<<<<<<<<
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __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;
       __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        __pyx_t_5 = (__pyx_v_buffer_list != NULL);
        if (__pyx_t_5) {

          /* "coremusic/capi.pyx":2517
 *     finally:
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)
*/
          __pyx_t_5 = ((__pyx_v_buffer_list->mBuffers[0]).mData != NULL);
          if (__pyx_t_5) {

            /* "coremusic/capi.pyx":2518
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)             # <<<<<<<<<<<<<<
 *             free(buffer_list)
 * 
*/
            free((__pyx_v_buffer_list->mBuffers[0]).mData);

            /* "coremusic/capi.pyx":2517
 *     finally:
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)
*/
          }

          /* "coremusic/capi.pyx":2519
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
          free(__pyx_v_buffer_list);

          /* "coremusic/capi.pyx":2516
 * 
 *     finally:
 *         if buffer_list != NULL:             # <<<<<<<<<<<<<<
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_5 = (__pyx_v_buffer_list != NULL);
      if (__pyx_t_5) {

        /* "coremusic/capi.pyx":2517
 *     finally:
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)
*/
        __pyx_t_5 = ((__pyx_v_buffer_list->mBuffers[0]).mData != NULL);
        if (__pyx_t_5) {

          /* "coremusic/capi.pyx":2518
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)             # <<<<<<<<<<<<<<
 *             free(buffer_list)
 * 
*/
          free((__pyx_v_buffer_list->mBuffers[0]).mData);

          /* "coremusic/capi.pyx":2517
 *     finally:
 *         if buffer_list != NULL:
 *             if buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)
*/
        }

        /* "coremusic/capi.pyx":2519
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)
 *             free(buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        free(__pyx_v_buffer_list);

        /* "coremusic/capi.pyx":2516
 * 
 *     finally:
 *         if buffer_list != NULL:             # <<<<<<<<<<<<<<
 *             if buffer_list.mBuffers[0].mData != NULL:
 *                 free(buffer_list.mBuffers[0].mData)
*/
      }
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2451
 * 
 * 
 * def audio_unit_render(long audio_unit_id, input_data, num_frames, sample_rate=44100.0, num_channels=2):             # <<<<<<<<<<<<<<
 *     """Process audio through an AudioUnit
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2522
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_unit_render_into(long audio_unit_id,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_225audio_unit_render_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_224audio_unit_render_into, "audio_unit_render_into(long audio_unit_id, const unsigned char[::1] input_data, unsigned char[::1] output_buffer, int num_frames, int num_channels=2)\n\nProcess audio through an AudioUnit directly into provided buffers (zero-copy).\n\nThis is a high-performance variant of audio_unit_render() that:\n1. Accepts memoryview input (bytes, bytearray, numpy array)\n2. Writes processed audio directly to caller-provided output buffer\n3. Avoids all memory allocation and copying\n\nArgs:\n    audio_unit_id: AudioUnit instance ID from audio_component_instance_new()\n    input_data: Input audio data as contiguous buffer (interleaved float32)\n    output_buffer: Pre-allocated output buffer (bytearray or numpy uint8 array).\n                  Must be at least num_frames * num_channels * 4 bytes\n    num_frames: Number of frames to process\n    num_channels: Number of channels (default 2)\n\nReturns:\n    Number of bytes written to output_buffer\n\nRaises:\n    RuntimeError: If the render operation fails\n    ValueError: If buffers are too small\n\nExample:\n    >>> # Process 1024 stereo float32 frames\n    >>> input_data = bytearray(audio_bytes)\n    >>> output_buffer = bytearray(1024 * 2 * 4)  # frames * channels * sizeof(float32)\n    >>> bytes_written = audio_unit_render_into(\n    ...     unit_id, input_data, output_buffer, 1024, num_channels=2)\n    >>> # Processed data is in output_buffer[:bytes_written]");
static PyMethodDef __pyx_mdef_9coremusic_4capi_225audio_unit_render_into = {"audio_unit_render_into", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_225audio_unit_render_into, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_224audio_unit_render_into};
static PyObject *__pyx_pw_9coremusic_4capi_225audio_unit_render_into(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_audio_unit_id;
  __Pyx_memviewslice __pyx_v_input_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_output_buffer = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_num_frames;
  int __pyx_v_num_channels;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_unit_render_into (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_unit_id,&__pyx_mstate_global->__pyx_n_u_input_data,&__pyx_mstate_global->__pyx_n_u_output_buffer,&__pyx_mstate_global->__pyx_n_u_num_frames,&__pyx_mstate_global->__pyx_n_u_num_channels,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2522, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_unit_render_into", 0) < (0)) __PYX_ERR(0, 2522, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_unit_render_into", 0, 4, 5, i); __PYX_ERR(0, 2522, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2522, __pyx_L3_error)
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2522, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2522, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2522, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_audio_unit_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_audio_unit_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2524, __pyx_L3_error)
    __pyx_v_input_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(values[1], 0); if (unlikely(!__pyx_v_input_data.memview)) __PYX_ERR(0, 2525, __pyx_L3_error)
    __pyx_v_output_buffer = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_output_buffer.memview)) __PYX_ERR(0, 2526, __pyx_L3_error)
    __pyx_v_num_frames = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_num_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2527, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_num_channels = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_num_channels == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2528, __pyx_L3_error)
    } else {
      __pyx_v_num_channels = ((int)((int)2));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_render_into", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 2522, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_render_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_input_data.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "input_data"); __PYX_ERR(0, 2525, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_output_buffer.memview) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "output_buffer"); __PYX_ERR(0, 2526, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9coremusic_4capi_224audio_unit_render_into(__pyx_self, __pyx_v_audio_unit_id, __pyx_v_input_data, __pyx_v_output_buffer, __pyx_v_num_frames, __pyx_v_num_channels);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output_buffer, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_224audio_unit_render_into(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id, __Pyx_memviewslice __pyx_v_input_data, __Pyx_memviewslice __pyx_v_output_buffer, int __pyx_v_num_frames, int __pyx_v_num_channels) {
  AudioUnit __pyx_v_unit;
  OSStatus __pyx_v_status;
  AudioUnitRenderActionFlags __pyx_v_flags;
  AudioTimeStamp __pyx_v_timestamp;
  AudioBufferList __pyx_v_buffer_list;
  UInt32 __pyx_v_buffer_size;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[7];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_render_into", 0);

  /* "coremusic/capi.pyx":2559
 *         >>> # Processed data is in output_buffer[:bytes_written]
 *     """
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitRenderActionFlags flags = 0
*/
  __pyx_v_unit = ((AudioUnit)__pyx_v_audio_unit_id);

  /* "coremusic/capi.pyx":2561
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 *     cdef cf.OSStatus status
 *     cdef at.AudioUnitRenderActionFlags flags = 0             # <<<<<<<<<<<<<<
 *     cdef ca.AudioTimeStamp timestamp
 *     cdef ca.AudioBufferList buffer_list
*/
  __pyx_v_flags = 0;

  /* "coremusic/capi.pyx":2564
 *     cdef ca.AudioTimeStamp timestamp
 *     cdef ca.AudioBufferList buffer_list
 *     cdef cf.UInt32 buffer_size = num_frames * num_channels * sizeof(cf.Float32)             # <<<<<<<<<<<<<<
 * 
 *     # Validate buffer sizes
*/
  __pyx_v_buffer_size = ((__pyx_v_num_frames * __pyx_v_num_channels) * (sizeof(Float32)));

  /* "coremusic/capi.pyx":2567
 * 
 *     # Validate buffer sizes
 *     if <cf.UInt32>input_data.shape[0] < buffer_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "
*/
  __pyx_t_1 = (((UInt32)(__pyx_v_input_data.shape[0])) < __pyx_v_buffer_size);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2568
 *     # Validate buffer sizes
 *     if <cf.UInt32>input_data.shape[0] < buffer_size:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "
 *             f"but {buffer_size} bytes required for {num_frames} frames"
*/
    __pyx_t_3 = NULL;

    /* "coremusic/capi.pyx":2569
 *     if <cf.UInt32>input_data.shape[0] < buffer_size:
 *         raise ValueError(
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_input_data.shape[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "coremusic/capi.pyx":2570
 *         raise ValueError(
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "
 *             f"but {buffer_size} bytes required for {num_frames} frames"             # <<<<<<<<<<<<<<
 *         )
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_UInt32(__pyx_v_buffer_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_num_frames, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Input_buffer_too_small;
    __pyx_t_7[1] = __pyx_t_4;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_bytes_provided_but;
    __pyx_t_7[3] = __pyx_t_5;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_bytes_required_for;
    __pyx_t_7[5] = __pyx_t_6;
    __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u_frames_2;

    /* "coremusic/capi.pyx":2569
 *     if <cf.UInt32>input_data.shape[0] < buffer_size:
 *         raise ValueError(
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
*/
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 7, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2568, __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_ERR(0, 2568, __pyx_L1_error)

    /* "coremusic/capi.pyx":2567
 * 
 *     # Validate buffer sizes
 *     if <cf.UInt32>input_data.shape[0] < buffer_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Input buffer too small: {input_data.shape[0]} bytes provided, "
*/
  }

  /* "coremusic/capi.pyx":2572
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "
*/
  __pyx_t_1 = (((UInt32)(__pyx_v_output_buffer.shape[0])) < __pyx_v_buffer_size);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2573
 *         )
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "
 *             f"but {buffer_size} bytes required for {num_frames} frames"
*/
    __pyx_t_8 = NULL;

    /* "coremusic/capi.pyx":2574
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:
 *         raise ValueError(
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
*/
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_output_buffer.shape[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "coremusic/capi.pyx":2575
 *         raise ValueError(
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "
 *             f"but {buffer_size} bytes required for {num_frames} frames"             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_6 = __Pyx_PyUnicode_From_UInt32(__pyx_v_buffer_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_num_frames, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Output_buffer_too_small;
    __pyx_t_7[1] = __pyx_t_3;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_bytes_provided_but;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_bytes_required_for;
    __pyx_t_7[5] = __pyx_t_5;
    __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u_frames_2;

    /* "coremusic/capi.pyx":2574
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:
 *         raise ValueError(
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "             # <<<<<<<<<<<<<<
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
*/
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 7, 127);
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2573, __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_ERR(0, 2573, __pyx_L1_error)

    /* "coremusic/capi.pyx":2572
 *             f"but {buffer_size} bytes required for {num_frames} frames"
 *         )
 *     if <cf.UInt32>output_buffer.shape[0] < buffer_size:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f"Output buffer too small: {output_buffer.shape[0]} bytes provided, "
*/
  }

  /* "coremusic/capi.pyx":2579
 * 
 *     # Copy input data to output buffer (AudioUnitRender operates in-place)
 *     memcpy(&output_buffer[0], &input_data[0], buffer_size)             # <<<<<<<<<<<<<<
 * 
 *     # Setup buffer list to point directly to the output buffer
*/
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  (void)(memcpy((&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_output_buffer.data) + __pyx_t_10)) )))), (&(*((unsigned char const  *) ( /* dim=0 */ ((char *) (((unsigned char const  *) __pyx_v_input_data.data) + __pyx_t_11)) )))), __pyx_v_buffer_size));

  /* "coremusic/capi.pyx":2582
 * 
 *     # Setup buffer list to point directly to the output buffer
 *     buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
*/
  __pyx_v_buffer_list.mNumberBuffers = 1;

  /* "coremusic/capi.pyx":2583
 *     # Setup buffer list to point directly to the output buffer
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = &output_buffer[0]
*/
  (__pyx_v_buffer_list.mBuffers[0]).mNumberChannels = __pyx_v_num_channels;

  /* "coremusic/capi.pyx":2584
 *     buffer_list.mNumberBuffers = 1
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size             # <<<<<<<<<<<<<<
 *     buffer_list.mBuffers[0].mData = &output_buffer[0]
 * 
*/
  (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize = __pyx_v_buffer_size;

  /* "coremusic/capi.pyx":2585
 *     buffer_list.mBuffers[0].mNumberChannels = num_channels
 *     buffer_list.mBuffers[0].mDataByteSize = buffer_size
 *     buffer_list.mBuffers[0].mData = &output_buffer[0]             # <<<<<<<<<<<<<<
 * 
 *     # Setup timestamp
*/
  __pyx_t_11 = 0;
  (__pyx_v_buffer_list.mBuffers[0]).mData = (&(*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_output_buffer.data) + __pyx_t_11)) ))));

  /* "coremusic/capi.pyx":2588
 * 
 *     # Setup timestamp
 *     memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))             # <<<<<<<<<<<<<<
 *     timestamp.mSampleTime = 0
 *     timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid
*/
  (void)(memset((&__pyx_v_timestamp), 0, (sizeof(AudioTimeStamp))));

  /* "coremusic/capi.pyx":2589
 *     # Setup timestamp
 *     memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))
 *     timestamp.mSampleTime = 0             # <<<<<<<<<<<<<<
 *     timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid
 * 
*/
  __pyx_v_timestamp.mSampleTime = 0.0;

  /* "coremusic/capi.pyx":2590
 *     memset(&timestamp, 0, sizeof(ca.AudioTimeStamp))
 *     timestamp.mSampleTime = 0
 *     timestamp.mFlags = ca.kAudioTimeStampSampleTimeValid             # <<<<<<<<<<<<<<
 * 
 *     # Render audio
*/
  __pyx_v_timestamp.mFlags = kAudioTimeStampSampleTimeValid;

  /* "coremusic/capi.pyx":2593
 * 
 *     # Render audio
 *     status = at.AudioUnitRender(             # <<<<<<<<<<<<<<
 *         unit,
 *         &flags,
*/
  __pyx_v_status = AudioUnitRender(__pyx_v_unit, (&__pyx_v_flags), (&__pyx_v_timestamp), 0, ((UInt32)__pyx_v_num_frames), (&__pyx_v_buffer_list));

  /* "coremusic/capi.pyx":2602
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2603
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))             # <<<<<<<<<<<<<<
 * 
 *     return buffer_size
*/
    __pyx_t_4 = NULL;
    __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioUnitRender); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2603, __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_ERR(0, 2603, __pyx_L1_error)

    /* "coremusic/capi.pyx":2602
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))
 * 
*/
  }

  /* "coremusic/capi.pyx":2605
 *         raise RuntimeError(format_osstatus_error(status, "AudioUnitRender"))
 * 
 *     return buffer_size             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_buffer_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2522
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_unit_render_into(long audio_unit_id,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.audio_unit_render_into", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2609
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     """Get the output type for an audio unit"""
 *     return at.kAudioUnitType_Output
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_227get_audio_unit_type_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_226get_audio_unit_type_output, "get_audio_unit_type_output()\n\nGet the output type for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_227get_audio_unit_type_output = {"get_audio_unit_type_output", (PyCFunction)__pyx_pw_9coremusic_4capi_227get_audio_unit_type_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_226get_audio_unit_type_output};
static PyObject *__pyx_pw_9coremusic_4capi_227get_audio_unit_type_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_type_output (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_226get_audio_unit_type_output(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_226get_audio_unit_type_output(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_type_output", 0);

  /* "coremusic/capi.pyx":2611
 * def get_audio_unit_type_output():
 *     """Get the output type for an audio unit"""
 *     return at.kAudioUnitType_Output             # <<<<<<<<<<<<<<
 * 
 * def get_audio_component_type_music_device():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitType_Output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2609
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     """Get the output type for an audio unit"""
 *     return at.kAudioUnitType_Output
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_type_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2613
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     """Get the music device type for an audio unit"""
 *     return at.kAudioUnitType_MusicDevice
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_229get_audio_component_type_music_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_228get_audio_component_type_music_device, "get_audio_component_type_music_device()\n\nGet the music device type for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_229get_audio_component_type_music_device = {"get_audio_component_type_music_device", (PyCFunction)__pyx_pw_9coremusic_4capi_229get_audio_component_type_music_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_228get_audio_component_type_music_device};
static PyObject *__pyx_pw_9coremusic_4capi_229get_audio_component_type_music_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_component_type_music_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_228get_audio_component_type_music_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_228get_audio_component_type_music_device(CYTHON_UNUSED PyObject *__pyx_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_audio_component_type_music_device", 0);

  /* "coremusic/capi.pyx":2615
 * def get_audio_component_type_music_device():
 *     """Get the music device type for an audio unit"""
 *     return at.kAudioUnitType_MusicDevice             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_subtype_default_output():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitType_MusicDevice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2613
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     """Get the music device type for an audio unit"""
 *     return at.kAudioUnitType_MusicDevice
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_component_type_music_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2617
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     """Get the default output type for an audio unit"""
 *     return at.kAudioUnitSubType_DefaultOutput
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_231get_audio_unit_subtype_default_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_230get_audio_unit_subtype_default_output, "get_audio_unit_subtype_default_output()\n\nGet the default output type for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_231get_audio_unit_subtype_default_output = {"get_audio_unit_subtype_default_output", (PyCFunction)__pyx_pw_9coremusic_4capi_231get_audio_unit_subtype_default_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_230get_audio_unit_subtype_default_output};
static PyObject *__pyx_pw_9coremusic_4capi_231get_audio_unit_subtype_default_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_subtype_default_output (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_230get_audio_unit_subtype_default_output(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_230get_audio_unit_subtype_default_output(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_subtype_default_output", 0);

  /* "coremusic/capi.pyx":2619
 * def get_audio_unit_subtype_default_output():
 *     """Get the default output type for an audio unit"""
 *     return at.kAudioUnitSubType_DefaultOutput             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_manufacturer_apple():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitSubType_DefaultOutput); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2617
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     """Get the default output type for an audio unit"""
 *     return at.kAudioUnitSubType_DefaultOutput
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_subtype_default_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2621
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     """Get the Apple manufacturer for an audio unit"""
 *     return at.kAudioUnitManufacturer_Apple
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_233get_audio_unit_manufacturer_apple(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_232get_audio_unit_manufacturer_apple, "get_audio_unit_manufacturer_apple()\n\nGet the Apple manufacturer for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_233get_audio_unit_manufacturer_apple = {"get_audio_unit_manufacturer_apple", (PyCFunction)__pyx_pw_9coremusic_4capi_233get_audio_unit_manufacturer_apple, METH_NOARGS, __pyx_doc_9coremusic_4capi_232get_audio_unit_manufacturer_apple};
static PyObject *__pyx_pw_9coremusic_4capi_233get_audio_unit_manufacturer_apple(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_manufacturer_apple (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_232get_audio_unit_manufacturer_apple(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_232get_audio_unit_manufacturer_apple(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_manufacturer_apple", 0);

  /* "coremusic/capi.pyx":2623
 * def get_audio_unit_manufacturer_apple():
 *     """Get the Apple manufacturer for an audio unit"""
 *     return at.kAudioUnitManufacturer_Apple             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_property_stream_format():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitManufacturer_Apple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2621
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     """Get the Apple manufacturer for an audio unit"""
 *     return at.kAudioUnitManufacturer_Apple
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_manufacturer_apple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2625
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     """Get the stream format for an audio unit"""
 *     return at.kAudioUnitProperty_StreamFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_235get_audio_unit_property_stream_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_234get_audio_unit_property_stream_format, "get_audio_unit_property_stream_format()\n\nGet the stream format for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_235get_audio_unit_property_stream_format = {"get_audio_unit_property_stream_format", (PyCFunction)__pyx_pw_9coremusic_4capi_235get_audio_unit_property_stream_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_234get_audio_unit_property_stream_format};
static PyObject *__pyx_pw_9coremusic_4capi_235get_audio_unit_property_stream_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_property_stream_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_234get_audio_unit_property_stream_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_234get_audio_unit_property_stream_format(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_property_stream_format", 0);

  /* "coremusic/capi.pyx":2627
 * def get_audio_unit_property_stream_format():
 *     """Get the stream format for an audio unit"""
 *     return at.kAudioUnitProperty_StreamFormat             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_property_set_render_callback():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitProperty_StreamFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2625
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     """Get the stream format for an audio unit"""
 *     return at.kAudioUnitProperty_StreamFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_property_stream_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2629
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     """Get the set render callback for an audio unit"""
 *     return at.kAudioUnitProperty_SetRenderCallback
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_237get_audio_unit_property_set_render_callback(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_236get_audio_unit_property_set_render_callback, "get_audio_unit_property_set_render_callback()\n\nGet the set render callback for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_237get_audio_unit_property_set_render_callback = {"get_audio_unit_property_set_render_callback", (PyCFunction)__pyx_pw_9coremusic_4capi_237get_audio_unit_property_set_render_callback, METH_NOARGS, __pyx_doc_9coremusic_4capi_236get_audio_unit_property_set_render_callback};
static PyObject *__pyx_pw_9coremusic_4capi_237get_audio_unit_property_set_render_callback(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_property_set_render_callback (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_236get_audio_unit_property_set_render_callback(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_236get_audio_unit_property_set_render_callback(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_property_set_render_callback", 0);

  /* "coremusic/capi.pyx":2631
 * def get_audio_unit_property_set_render_callback():
 *     """Get the set render callback for an audio unit"""
 *     return at.kAudioUnitProperty_SetRenderCallback             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_scope_input():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitProperty_SetRenderCallback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2629
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     """Get the set render callback for an audio unit"""
 *     return at.kAudioUnitProperty_SetRenderCallback
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_property_set_render_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2633
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio unit"""
 *     return at.kAudioUnitScope_Input
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_239get_audio_unit_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_238get_audio_unit_scope_input, "get_audio_unit_scope_input()\n\nGet the input scope for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_239get_audio_unit_scope_input = {"get_audio_unit_scope_input", (PyCFunction)__pyx_pw_9coremusic_4capi_239get_audio_unit_scope_input, METH_NOARGS, __pyx_doc_9coremusic_4capi_238get_audio_unit_scope_input};
static PyObject *__pyx_pw_9coremusic_4capi_239get_audio_unit_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_scope_input (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_238get_audio_unit_scope_input(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_238get_audio_unit_scope_input(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_scope_input", 0);

  /* "coremusic/capi.pyx":2635
 * def get_audio_unit_scope_input():
 *     """Get the input scope for an audio unit"""
 *     return at.kAudioUnitScope_Input             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_scope_output():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitScope_Input); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2633
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio unit"""
 *     return at.kAudioUnitScope_Input
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_scope_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2637
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio unit"""
 *     return at.kAudioUnitScope_Output
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_241get_audio_unit_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_240get_audio_unit_scope_output, "get_audio_unit_scope_output()\n\nGet the output scope for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_241get_audio_unit_scope_output = {"get_audio_unit_scope_output", (PyCFunction)__pyx_pw_9coremusic_4capi_241get_audio_unit_scope_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_240get_audio_unit_scope_output};
static PyObject *__pyx_pw_9coremusic_4capi_241get_audio_unit_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_scope_output (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_240get_audio_unit_scope_output(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_240get_audio_unit_scope_output(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_scope_output", 0);

  /* "coremusic/capi.pyx":2639
 * def get_audio_unit_scope_output():
 *     """Get the output scope for an audio unit"""
 *     return at.kAudioUnitScope_Output             # <<<<<<<<<<<<<<
 * 
 * def get_audio_unit_scope_global():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitScope_Output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2637
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio unit"""
 *     return at.kAudioUnitScope_Output
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_scope_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2641
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio unit"""
 *     return at.kAudioUnitScope_Global
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_243get_audio_unit_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_242get_audio_unit_scope_global, "get_audio_unit_scope_global()\n\nGet the global scope for an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_243get_audio_unit_scope_global = {"get_audio_unit_scope_global", (PyCFunction)__pyx_pw_9coremusic_4capi_243get_audio_unit_scope_global, METH_NOARGS, __pyx_doc_9coremusic_4capi_242get_audio_unit_scope_global};
static PyObject *__pyx_pw_9coremusic_4capi_243get_audio_unit_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_unit_scope_global (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_242get_audio_unit_scope_global(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_242get_audio_unit_scope_global(CYTHON_UNUSED PyObject *__pyx_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_audio_unit_scope_global", 0);

  /* "coremusic/capi.pyx":2643
 * def get_audio_unit_scope_global():
 *     """Get the global scope for an audio unit"""
 *     return at.kAudioUnitScope_Global             # <<<<<<<<<<<<<<
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioUnitScope_Global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2641
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio unit"""
 *     return at.kAudioUnitScope_Global
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_unit_scope_global", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2645
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     """Get the non-interleaved flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_245get_linear_pcm_format_flag_is_non_interleaved(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_244get_linear_pcm_format_flag_is_non_interleaved, "get_linear_pcm_format_flag_is_non_interleaved()\n\nGet the non-interleaved flag for a linear PCM format");
static PyMethodDef __pyx_mdef_9coremusic_4capi_245get_linear_pcm_format_flag_is_non_interleaved = {"get_linear_pcm_format_flag_is_non_interleaved", (PyCFunction)__pyx_pw_9coremusic_4capi_245get_linear_pcm_format_flag_is_non_interleaved, METH_NOARGS, __pyx_doc_9coremusic_4capi_244get_linear_pcm_format_flag_is_non_interleaved};
static PyObject *__pyx_pw_9coremusic_4capi_245get_linear_pcm_format_flag_is_non_interleaved(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_linear_pcm_format_flag_is_non_interleaved (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_244get_linear_pcm_format_flag_is_non_interleaved(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_244get_linear_pcm_format_flag_is_non_interleaved(CYTHON_UNUSED PyObject *__pyx_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_linear_pcm_format_flag_is_non_interleaved", 0);

  /* "coremusic/capi.pyx":2647
 * def get_linear_pcm_format_flag_is_non_interleaved():
 *     """Get the non-interleaved flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kLinearPCMFormatFlagIsNonInterleaved); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2645
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     """Get the non-interleaved flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_linear_pcm_format_flag_is_non_interleaved", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2672
 * # Render callback function
 * # Optimized with block memcpy instead of frame-by-frame loop for 2-5x performance gain
 * cdef cf.OSStatus audio_player_render_callback(             # <<<<<<<<<<<<<<
 *     void* user_data,
 *     at.AudioUnitRenderActionFlags* action_flags,
*/

static OSStatus __pyx_f_9coremusic_4capi_audio_player_render_callback(void *__pyx_v_user_data, CYTHON_UNUSED AudioUnitRenderActionFlags *__pyx_v_action_flags, CYTHON_UNUSED AudioTimeStamp const *__pyx_v_time_stamp, CYTHON_UNUSED UInt32 __pyx_v_bus_number, UInt32 __pyx_v_num_frames, AudioBufferList *__pyx_v_io_data) {
  struct __pyx_t_9coremusic_4capi_AudioPlayerData *__pyx_v_player_data;
  UInt32 __pyx_v_current_frame;
  UInt32 __pyx_v_max_frames;
  Float32 *__pyx_v_output_data;
  Float32 *__pyx_v_input_data;
  UInt32 __pyx_v_buffer_idx;
  UInt32 __pyx_v_frames_available;
  UInt32 __pyx_v_frames_to_copy;
  UInt32 __pyx_v_output_offset;
  size_t __pyx_v_bytes_to_copy;
  OSStatus __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  UInt32 __pyx_t_3;
  UInt32 __pyx_t_4;
  UInt32 __pyx_t_5;

  /* "coremusic/capi.pyx":2700
 *     cdef size_t bytes_to_copy
 * 
 *     if user_data == NULL or io_data == NULL:             # <<<<<<<<<<<<<<
 *         return 0  # noErr
 * 
*/
  __pyx_t_2 = (__pyx_v_user_data == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_io_data == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":2701
 * 
 *     if user_data == NULL or io_data == NULL:
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     player_data = <AudioPlayerData*>user_data
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2700
 *     cdef size_t bytes_to_copy
 * 
 *     if user_data == NULL or io_data == NULL:             # <<<<<<<<<<<<<<
 *         return 0  # noErr
 * 
*/
  }

  /* "coremusic/capi.pyx":2703
 *         return 0  # noErr
 * 
 *     player_data = <AudioPlayerData*>user_data             # <<<<<<<<<<<<<<
 * 
 *     # Clear output buffers first
*/
  __pyx_v_player_data = ((struct __pyx_t_9coremusic_4capi_AudioPlayerData *)__pyx_v_user_data);

  /* "coremusic/capi.pyx":2706
 * 
 *     # Clear output buffers first
 *     for buffer_idx in range(io_data.mNumberBuffers):             # <<<<<<<<<<<<<<
 *         memset(io_data.mBuffers[buffer_idx].mData, 0, io_data.mBuffers[buffer_idx].mDataByteSize)
 * 
*/
  __pyx_t_3 = __pyx_v_io_data->mNumberBuffers;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_buffer_idx = __pyx_t_5;

    /* "coremusic/capi.pyx":2707
 *     # Clear output buffers first
 *     for buffer_idx in range(io_data.mNumberBuffers):
 *         memset(io_data.mBuffers[buffer_idx].mData, 0, io_data.mBuffers[buffer_idx].mDataByteSize)             # <<<<<<<<<<<<<<
 * 
 *     # Check if we have data and are playing
*/
    (void)(memset((__pyx_v_io_data->mBuffers[__pyx_v_buffer_idx]).mData, 0, (__pyx_v_io_data->mBuffers[__pyx_v_buffer_idx]).mDataByteSize));
  }

  /* "coremusic/capi.pyx":2710
 * 
 *     # Check if we have data and are playing
 *     if not player_data.playing or player_data.buffer_list == NULL or player_data.total_frames == 0:             # <<<<<<<<<<<<<<
 *         return 0  # Return silence
 * 
*/
  __pyx_t_2 = (!(__pyx_v_player_data->playing != 0));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_player_data->buffer_list == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_player_data->total_frames == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":2711
 *     # Check if we have data and are playing
 *     if not player_data.playing or player_data.buffer_list == NULL or player_data.total_frames == 0:
 *         return 0  # Return silence             # <<<<<<<<<<<<<<
 * 
 *     current_frame = player_data.current_frame
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":2710
 * 
 *     # Check if we have data and are playing
 *     if not player_data.playing or player_data.buffer_list == NULL or player_data.total_frames == 0:             # <<<<<<<<<<<<<<
 *         return 0  # Return silence
 * 
*/
  }

  /* "coremusic/capi.pyx":2713
 *         return 0  # Return silence
 * 
 *     current_frame = player_data.current_frame             # <<<<<<<<<<<<<<
 *     max_frames = player_data.total_frames
 * 
*/
  __pyx_t_3 = __pyx_v_player_data->current_frame;
  __pyx_v_current_frame = __pyx_t_3;

  /* "coremusic/capi.pyx":2714
 * 
 *     current_frame = player_data.current_frame
 *     max_frames = player_data.total_frames             # <<<<<<<<<<<<<<
 * 
 *     output_data = <cf.Float32*>io_data.mBuffers[0].mData
*/
  __pyx_t_3 = __pyx_v_player_data->total_frames;
  __pyx_v_max_frames = __pyx_t_3;

  /* "coremusic/capi.pyx":2716
 *     max_frames = player_data.total_frames
 * 
 *     output_data = <cf.Float32*>io_data.mBuffers[0].mData             # <<<<<<<<<<<<<<
 *     input_data = <cf.Float32*>player_data.buffer_list.mBuffers[0].mData
 * 
*/
  __pyx_v_output_data = ((Float32 *)(__pyx_v_io_data->mBuffers[0]).mData);

  /* "coremusic/capi.pyx":2717
 * 
 *     output_data = <cf.Float32*>io_data.mBuffers[0].mData
 *     input_data = <cf.Float32*>player_data.buffer_list.mBuffers[0].mData             # <<<<<<<<<<<<<<
 * 
 *     # Track output position for handling loop wraparound
*/
  __pyx_v_input_data = ((Float32 *)(__pyx_v_player_data->buffer_list->mBuffers[0]).mData);

  /* "coremusic/capi.pyx":2720
 * 
 *     # Track output position for handling loop wraparound
 *     output_offset = 0             # <<<<<<<<<<<<<<
 * 
 *     while output_offset < num_frames:
*/
  __pyx_v_output_offset = 0;

  /* "coremusic/capi.pyx":2722
 *     output_offset = 0
 * 
 *     while output_offset < num_frames:             # <<<<<<<<<<<<<<
 *         # Handle end of audio
 *         if current_frame >= max_frames:
*/
  while (1) {
    __pyx_t_1 = (__pyx_v_output_offset < __pyx_v_num_frames);
    if (!__pyx_t_1) break;

    /* "coremusic/capi.pyx":2724
 *     while output_offset < num_frames:
 *         # Handle end of audio
 *         if current_frame >= max_frames:             # <<<<<<<<<<<<<<
 *             if player_data.loop:
 *                 current_frame = 0  # Loop back to start
*/
    __pyx_t_1 = (__pyx_v_current_frame >= __pyx_v_max_frames);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":2725
 *         # Handle end of audio
 *         if current_frame >= max_frames:
 *             if player_data.loop:             # <<<<<<<<<<<<<<
 *                 current_frame = 0  # Loop back to start
 *             else:
*/
      __pyx_t_1 = (__pyx_v_player_data->loop != 0);
      if (__pyx_t_1) {

        /* "coremusic/capi.pyx":2726
 *         if current_frame >= max_frames:
 *             if player_data.loop:
 *                 current_frame = 0  # Loop back to start             # <<<<<<<<<<<<<<
 *             else:
 *                 player_data.playing = False
*/
        __pyx_v_current_frame = 0;

        /* "coremusic/capi.pyx":2725
 *         # Handle end of audio
 *         if current_frame >= max_frames:
 *             if player_data.loop:             # <<<<<<<<<<<<<<
 *                 current_frame = 0  # Loop back to start
 *             else:
*/
        goto __pyx_L15;
      }

      /* "coremusic/capi.pyx":2728
 *                 current_frame = 0  # Loop back to start
 *             else:
 *                 player_data.playing = False             # <<<<<<<<<<<<<<
 *                 break  # Stop playing, remaining buffer already zeroed
 * 
*/
      /*else*/ {
        __pyx_v_player_data->playing = 0;

        /* "coremusic/capi.pyx":2729
 *             else:
 *                 player_data.playing = False
 *                 break  # Stop playing, remaining buffer already zeroed             # <<<<<<<<<<<<<<
 * 
 *         # Calculate how many contiguous frames we can copy
*/
        goto __pyx_L13_break;
      }
      __pyx_L15:;

      /* "coremusic/capi.pyx":2724
 *     while output_offset < num_frames:
 *         # Handle end of audio
 *         if current_frame >= max_frames:             # <<<<<<<<<<<<<<
 *             if player_data.loop:
 *                 current_frame = 0  # Loop back to start
*/
    }

    /* "coremusic/capi.pyx":2732
 * 
 *         # Calculate how many contiguous frames we can copy
 *         frames_available = max_frames - current_frame             # <<<<<<<<<<<<<<
 *         frames_to_copy = num_frames - output_offset
 * 
*/
    __pyx_v_frames_available = (__pyx_v_max_frames - __pyx_v_current_frame);

    /* "coremusic/capi.pyx":2733
 *         # Calculate how many contiguous frames we can copy
 *         frames_available = max_frames - current_frame
 *         frames_to_copy = num_frames - output_offset             # <<<<<<<<<<<<<<
 * 
 *         # Don't copy more than available
*/
    __pyx_v_frames_to_copy = (__pyx_v_num_frames - __pyx_v_output_offset);

    /* "coremusic/capi.pyx":2736
 * 
 *         # Don't copy more than available
 *         if frames_to_copy > frames_available:             # <<<<<<<<<<<<<<
 *             frames_to_copy = frames_available
 * 
*/
    __pyx_t_1 = (__pyx_v_frames_to_copy > __pyx_v_frames_available);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":2737
 *         # Don't copy more than available
 *         if frames_to_copy > frames_available:
 *             frames_to_copy = frames_available             # <<<<<<<<<<<<<<
 * 
 *         # Block copy: 2 channels (stereo) * sizeof(Float32) = 8 bytes per frame
*/
      __pyx_v_frames_to_copy = __pyx_v_frames_available;

      /* "coremusic/capi.pyx":2736
 * 
 *         # Don't copy more than available
 *         if frames_to_copy > frames_available:             # <<<<<<<<<<<<<<
 *             frames_to_copy = frames_available
 * 
*/
    }

    /* "coremusic/capi.pyx":2740
 * 
 *         # Block copy: 2 channels (stereo) * sizeof(Float32) = 8 bytes per frame
 *         bytes_to_copy = <size_t>(frames_to_copy * 2 * sizeof(cf.Float32))             # <<<<<<<<<<<<<<
 *         memcpy(
 *             &output_data[output_offset * 2],      # Destination: output buffer at current offset
*/
    __pyx_v_bytes_to_copy = ((size_t)((__pyx_v_frames_to_copy * 2) * (sizeof(Float32))));

    /* "coremusic/capi.pyx":2741
 *         # Block copy: 2 channels (stereo) * sizeof(Float32) = 8 bytes per frame
 *         bytes_to_copy = <size_t>(frames_to_copy * 2 * sizeof(cf.Float32))
 *         memcpy(             # <<<<<<<<<<<<<<
 *             &output_data[output_offset * 2],      # Destination: output buffer at current offset
 *             &input_data[current_frame * 2],       # Source: input buffer at current frame
*/
    (void)(memcpy((&(__pyx_v_output_data[(__pyx_v_output_offset * 2)])), (&(__pyx_v_input_data[(__pyx_v_current_frame * 2)])), __pyx_v_bytes_to_copy));

    /* "coremusic/capi.pyx":2747
 *         )
 * 
 *         current_frame += frames_to_copy             # <<<<<<<<<<<<<<
 *         output_offset += frames_to_copy
 * 
*/
    __pyx_v_current_frame = (__pyx_v_current_frame + __pyx_v_frames_to_copy);

    /* "coremusic/capi.pyx":2748
 * 
 *         current_frame += frames_to_copy
 *         output_offset += frames_to_copy             # <<<<<<<<<<<<<<
 * 
 *     player_data.current_frame = current_frame
*/
    __pyx_v_output_offset = (__pyx_v_output_offset + __pyx_v_frames_to_copy);
  }
  __pyx_L13_break:;

  /* "coremusic/capi.pyx":2750
 *         output_offset += frames_to_copy
 * 
 *     player_data.current_frame = current_frame             # <<<<<<<<<<<<<<
 * 
 *     return 0  # noErr
*/
  __pyx_v_player_data->current_frame = __pyx_v_current_frame;

  /* "coremusic/capi.pyx":2752
 *     player_data.current_frame = current_frame
 * 
 *     return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2672
 * # Render callback function
 * # Optimized with block memcpy instead of frame-by-frame loop for 2-5x performance gain
 * cdef cf.OSStatus audio_player_render_callback(             # <<<<<<<<<<<<<<
 *     void* user_data,
 *     at.AudioUnitRenderActionFlags* action_flags,
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":2766
 *     cdef object _link_session_ref  # Keep Python reference to prevent GC
 * 
 *     def __init__(self, link_session=None):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioPlayer
 * 
*/

/* Python wrapper */
static int __pyx_pw_9coremusic_4capi_11AudioPlayer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer___init__, "Initialize the AudioPlayer\n\n        Args:\n            link_session: Optional LinkSession instance for tempo synchronization\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_9coremusic_4capi_11AudioPlayer___init__;
#endif
static int __pyx_pw_9coremusic_4capi_11AudioPlayer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_link_session = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_link_session,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2766, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 2766, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_link_session = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2766, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self), __pyx_v_link_session);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_link_session) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "coremusic/capi.pyx":2772
 *             link_session: Optional LinkSession instance for tempo synchronization
 *         """
 *         memset(&self.player_data, 0, sizeof(AudioPlayerData))             # <<<<<<<<<<<<<<
 *         self.output_unit = NULL
 *         self.initialized = False
*/
  (void)(memset((&__pyx_v_self->player_data), 0, (sizeof(struct __pyx_t_9coremusic_4capi_AudioPlayerData))));

  /* "coremusic/capi.pyx":2773
 *         """
 *         memset(&self.player_data, 0, sizeof(AudioPlayerData))
 *         self.output_unit = NULL             # <<<<<<<<<<<<<<
 *         self.initialized = False
 *         self._link_session_ref = link_session
*/
  __pyx_v_self->output_unit = NULL;

  /* "coremusic/capi.pyx":2774
 *         memset(&self.player_data, 0, sizeof(AudioPlayerData))
 *         self.output_unit = NULL
 *         self.initialized = False             # <<<<<<<<<<<<<<
 *         self._link_session_ref = link_session
 * 
*/
  __pyx_v_self->initialized = 0;

  /* "coremusic/capi.pyx":2775
 *         self.output_unit = NULL
 *         self.initialized = False
 *         self._link_session_ref = link_session             # <<<<<<<<<<<<<<
 * 
 *     def load_file(self, str file_path):
*/
  __Pyx_INCREF(__pyx_v_link_session);
  __Pyx_GIVEREF(__pyx_v_link_session);
  __Pyx_GOTREF(__pyx_v_self->_link_session_ref);
  __Pyx_DECREF(__pyx_v_self->_link_session_ref);
  __pyx_v_self->_link_session_ref = __pyx_v_link_session;

  /* "coremusic/capi.pyx":2766
 *     cdef object _link_session_ref  # Keep Python reference to prevent GC
 * 
 *     def __init__(self, link_session=None):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioPlayer
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2777
 *         self._link_session_ref = link_session
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback using ExtAudioFile"""
 *         # Declare all C variables at the beginning
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_3load_file(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_2load_file, "AudioPlayer.load_file(self, str file_path)\n\nLoad an audio file for playback using ExtAudioFile");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_3load_file = {"load_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_3load_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_2load_file};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_3load_file(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2777, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2777, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "load_file", 0) < (0)) __PYX_ERR(0, 2777, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("load_file", 1, 1, 1, i); __PYX_ERR(0, 2777, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2777, __pyx_L3_error)
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2777, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.load_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 2777, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_2load_file(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self), __pyx_v_file_path);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_2load_file(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_file_path) {
  PyObject *__pyx_v_path_bytes = 0;
  CFURLRef __pyx_v_url_ref;
  ExtAudioFileRef __pyx_v_audio_file;
  OSStatus __pyx_v_status;
  AudioStreamBasicDescription __pyx_v_file_format;
  AudioStreamBasicDescription __pyx_v_client_format;
  UInt32 __pyx_v_size;
  SInt64 __pyx_v_file_length_frames;
  UInt32 __pyx_v_bytes_per_buffer;
  AudioBufferList *__pyx_v_buffer_list;
  UInt32 __pyx_v_read_frames;
  UInt32 __pyx_v_frames_to_read;
  AudioBufferList __pyx_v_temp_buffer_list;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt8 const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  UInt32 __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_file", 0);

  /* "coremusic/capi.pyx":2780
 *         """Load an audio file for playback using ExtAudioFile"""
 *         # Declare all C variables at the beginning
 *         cdef bytes path_bytes = file_path.encode('utf-8')             # <<<<<<<<<<<<<<
 *         cdef cf.CFURLRef url_ref
 *         cdef at.ExtAudioFileRef audio_file
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 2780, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2790
 *         cdef cf.UInt32 bytes_per_buffer
 *         cdef ca.AudioBufferList* buffer_list
 *         cdef cf.UInt32 read_frames = 0             # <<<<<<<<<<<<<<
 *         cdef cf.UInt32 frames_to_read
 *         cdef ca.AudioBufferList temp_buffer_list
*/
  __pyx_v_read_frames = 0;

  /* "coremusic/capi.pyx":2796
 *         url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,             # <<<<<<<<<<<<<<
 *             len(path_bytes),
 *             False
*/
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_path_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2796, __pyx_L1_error)

  /* "coremusic/capi.pyx":2797
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,
 *             len(path_bytes),             # <<<<<<<<<<<<<<
 *             False
 *         )
*/
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_path_bytes); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2797, __pyx_L1_error)

  /* "coremusic/capi.pyx":2794
 *         cdef ca.AudioBufferList temp_buffer_list
 * 
 *         url_ref = cf.CFURLCreateFromFileSystemRepresentation(             # <<<<<<<<<<<<<<
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,
*/
  __pyx_v_url_ref = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, ((UInt8 const *)__pyx_t_2), __pyx_t_3, 0);

  /* "coremusic/capi.pyx":2801
 *         )
 * 
 *         if url_ref == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
*/
  __pyx_t_4 = (__pyx_v_url_ref == NULL);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":2802
 * 
 *         if url_ref == NULL:
 *             raise ValueError(f"Could not create URL for file: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *         # Open audio file
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_for_file, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __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_ERR(0, 2802, __pyx_L1_error)

    /* "coremusic/capi.pyx":2801
 *         )
 * 
 *         if url_ref == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2805
 * 
 *         # Open audio file
 *         status = at.ExtAudioFileOpenURL(url_ref, &audio_file)             # <<<<<<<<<<<<<<
 *         cf.CFRelease(url_ref)
 * 
*/
  __pyx_v_status = ExtAudioFileOpenURL(__pyx_v_url_ref, (&__pyx_v_audio_file));

  /* "coremusic/capi.pyx":2806
 *         # Open audio file
 *         status = at.ExtAudioFileOpenURL(url_ref, &audio_file)
 *         cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *         if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":2808
 *         cf.CFRelease(url_ref)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not open audio file: {status}")
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":2809
 * 
 *         if status != 0:
 *             raise RuntimeError(f"Could not open audio file: {status}")             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
    __pyx_t_7 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_open_audio_file, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2809, __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_ERR(0, 2809, __pyx_L1_error)

    /* "coremusic/capi.pyx":2808
 *         cf.CFRelease(url_ref)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not open audio file: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2811
 *             raise RuntimeError(f"Could not open audio file: {status}")
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # Get file format
 *             size = sizeof(file_format)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2813
 *         try:
 *             # Get file format
 *             size = sizeof(file_format)             # <<<<<<<<<<<<<<
 *             status = at.ExtAudioFileGetProperty(
 *                 audio_file,
*/
    __pyx_v_size = (sizeof(__pyx_v_file_format));

    /* "coremusic/capi.pyx":2814
 *             # Get file format
 *             size = sizeof(file_format)
 *             status = at.ExtAudioFileGetProperty(             # <<<<<<<<<<<<<<
 *                 audio_file,
 *                 at.kExtAudioFileProperty_FileDataFormat,
*/
    __pyx_v_status = ExtAudioFileGetProperty(__pyx_v_audio_file, kExtAudioFileProperty_FileDataFormat, (&__pyx_v_size), (&__pyx_v_file_format));

    /* "coremusic/capi.pyx":2820
 *                 &file_format
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not get file format: {status}")
 * 
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2821
 *             )
 *             if status != 0:
 *                 raise RuntimeError(f"Could not get file format: {status}")             # <<<<<<<<<<<<<<
 * 
 *             # Set client format (what we want the data converted to)
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2821, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_get_file_format, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2821, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2821, __pyx_L6_error)

      /* "coremusic/capi.pyx":2820
 *                 &file_format
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not get file format: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":2824
 * 
 *             # Set client format (what we want the data converted to)
 *             client_format.mSampleRate = SAMPLE_RATE             # <<<<<<<<<<<<<<
 *             client_format.mFormatID = ca.kAudioFormatLinearPCM
 *             client_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
*/
    __pyx_v_client_format.mSampleRate = 44100.0;

    /* "coremusic/capi.pyx":2825
 *             # Set client format (what we want the data converted to)
 *             client_format.mSampleRate = SAMPLE_RATE
 *             client_format.mFormatID = ca.kAudioFormatLinearPCM             # <<<<<<<<<<<<<<
 *             client_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *             client_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
*/
    __pyx_v_client_format.mFormatID = kAudioFormatLinearPCM;

    /* "coremusic/capi.pyx":2826
 *             client_format.mSampleRate = SAMPLE_RATE
 *             client_format.mFormatID = ca.kAudioFormatLinearPCM
 *             client_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat             # <<<<<<<<<<<<<<
 *             client_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *             client_format.mFramesPerPacket = 1
*/
    __pyx_v_client_format.mFormatFlags = kLinearPCMFormatFlagIsFloat;

    /* "coremusic/capi.pyx":2827
 *             client_format.mFormatID = ca.kAudioFormatLinearPCM
 *             client_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *             client_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS             # <<<<<<<<<<<<<<
 *             client_format.mFramesPerPacket = 1
 *             client_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
*/
    __pyx_v_client_format.mBytesPerPacket = ((sizeof(Float32)) * 2);

    /* "coremusic/capi.pyx":2828
 *             client_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *             client_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *             client_format.mFramesPerPacket = 1             # <<<<<<<<<<<<<<
 *             client_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *             client_format.mChannelsPerFrame = CHANNELS
*/
    __pyx_v_client_format.mFramesPerPacket = 1;

    /* "coremusic/capi.pyx":2829
 *             client_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *             client_format.mFramesPerPacket = 1
 *             client_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)             # <<<<<<<<<<<<<<
 *             client_format.mChannelsPerFrame = CHANNELS
 *             client_format.mBitsPerChannel = BITS_PER_CHANNEL
*/
    __pyx_v_client_format.mBytesPerFrame = (2 * (sizeof(Float32)));

    /* "coremusic/capi.pyx":2830
 *             client_format.mFramesPerPacket = 1
 *             client_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *             client_format.mChannelsPerFrame = CHANNELS             # <<<<<<<<<<<<<<
 *             client_format.mBitsPerChannel = BITS_PER_CHANNEL
 *             client_format.mReserved = 0
*/
    __pyx_v_client_format.mChannelsPerFrame = 2;

    /* "coremusic/capi.pyx":2831
 *             client_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *             client_format.mChannelsPerFrame = CHANNELS
 *             client_format.mBitsPerChannel = BITS_PER_CHANNEL             # <<<<<<<<<<<<<<
 *             client_format.mReserved = 0
 * 
*/
    __pyx_v_client_format.mBitsPerChannel = 32;

    /* "coremusic/capi.pyx":2832
 *             client_format.mChannelsPerFrame = CHANNELS
 *             client_format.mBitsPerChannel = BITS_PER_CHANNEL
 *             client_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *             status = at.ExtAudioFileSetProperty(
*/
    __pyx_v_client_format.mReserved = 0;

    /* "coremusic/capi.pyx":2834
 *             client_format.mReserved = 0
 * 
 *             status = at.ExtAudioFileSetProperty(             # <<<<<<<<<<<<<<
 *                 audio_file,
 *                 at.kExtAudioFileProperty_ClientDataFormat,
*/
    __pyx_v_status = ExtAudioFileSetProperty(__pyx_v_audio_file, kExtAudioFileProperty_ClientDataFormat, (sizeof(__pyx_v_client_format)), (&__pyx_v_client_format));

    /* "coremusic/capi.pyx":2840
 *                 &client_format
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not set client format: {status}")
 * 
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2841
 *             )
 *             if status != 0:
 *                 raise RuntimeError(f"Could not set client format: {status}")             # <<<<<<<<<<<<<<
 * 
 *             # Get file length in frames
*/
      __pyx_t_5 = NULL;
      __pyx_t_6 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2841, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_set_client_format, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2841, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2841, __pyx_L6_error)

      /* "coremusic/capi.pyx":2840
 *                 &client_format
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not set client format: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":2844
 * 
 *             # Get file length in frames
 *             size = sizeof(file_length_frames)             # <<<<<<<<<<<<<<
 *             status = at.ExtAudioFileGetProperty(
 *                 audio_file,
*/
    __pyx_v_size = (sizeof(__pyx_v_file_length_frames));

    /* "coremusic/capi.pyx":2845
 *             # Get file length in frames
 *             size = sizeof(file_length_frames)
 *             status = at.ExtAudioFileGetProperty(             # <<<<<<<<<<<<<<
 *                 audio_file,
 *                 at.kExtAudioFileProperty_FileLengthFrames,
*/
    __pyx_v_status = ExtAudioFileGetProperty(__pyx_v_audio_file, kExtAudioFileProperty_FileLengthFrames, (&__pyx_v_size), (&__pyx_v_file_length_frames));

    /* "coremusic/capi.pyx":2851
 *                 &file_length_frames
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not get file length: {status}")
 * 
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2852
 *             )
 *             if status != 0:
 *                 raise RuntimeError(f"Could not get file length: {status}")             # <<<<<<<<<<<<<<
 * 
 *             # Account for sample rate conversion
*/
      __pyx_t_7 = NULL;
      __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2852, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_get_file_length, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2852, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2852, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2852, __pyx_L6_error)

      /* "coremusic/capi.pyx":2851
 *                 &file_length_frames
 *             )
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not get file length: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":2855
 * 
 *             # Account for sample rate conversion
 *             file_length_frames = <cf.SInt64>(file_length_frames * (SAMPLE_RATE / file_format.mSampleRate))             # <<<<<<<<<<<<<<
 * 
 *             # Allocate buffer for audio data
*/
    if (unlikely(__pyx_v_file_format.mSampleRate == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 2855, __pyx_L6_error)
    }
    __pyx_v_file_length_frames = ((SInt64)(__pyx_v_file_length_frames * (((Float64)44100.0) / __pyx_v_file_format.mSampleRate)));

    /* "coremusic/capi.pyx":2858
 * 
 *             # Allocate buffer for audio data
 *             bytes_per_buffer = client_format.mBytesPerFrame * <cf.UInt32>file_length_frames             # <<<<<<<<<<<<<<
 * 
 *             # Allocate AudioBufferList
*/
    __pyx_v_bytes_per_buffer = (__pyx_v_client_format.mBytesPerFrame * ((UInt32)__pyx_v_file_length_frames));

    /* "coremusic/capi.pyx":2861
 * 
 *             # Allocate AudioBufferList
 *             buffer_list = <ca.AudioBufferList*>malloc(             # <<<<<<<<<<<<<<
 *                 sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)  # Single buffer
 *             )
*/
    __pyx_v_buffer_list = ((AudioBufferList *)malloc(((sizeof(AudioBufferList)) + (0 * (sizeof(AudioBuffer))))));

    /* "coremusic/capi.pyx":2864
 *                 sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)  # Single buffer
 *             )
 *             if buffer_list == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate AudioBufferList")
 * 
*/
    __pyx_t_4 = (__pyx_v_buffer_list == NULL);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2865
 *             )
 *             if buffer_list == NULL:
 *                 raise MemoryError("Could not allocate AudioBufferList")             # <<<<<<<<<<<<<<
 * 
 *             buffer_list.mNumberBuffers = 1
*/
      __pyx_t_6 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_AudioBufferLi};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2865, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2865, __pyx_L6_error)

      /* "coremusic/capi.pyx":2864
 *                 sizeof(ca.AudioBufferList) + 0 * sizeof(ca.AudioBuffer)  # Single buffer
 *             )
 *             if buffer_list == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate AudioBufferList")
 * 
*/
    }

    /* "coremusic/capi.pyx":2867
 *                 raise MemoryError("Could not allocate AudioBufferList")
 * 
 *             buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *             buffer_list.mBuffers[0].mData = malloc(bytes_per_buffer)
 *             if buffer_list.mBuffers[0].mData == NULL:
*/
    __pyx_v_buffer_list->mNumberBuffers = 1;

    /* "coremusic/capi.pyx":2868
 * 
 *             buffer_list.mNumberBuffers = 1
 *             buffer_list.mBuffers[0].mData = malloc(bytes_per_buffer)             # <<<<<<<<<<<<<<
 *             if buffer_list.mBuffers[0].mData == NULL:
 *                 free(buffer_list)
*/
    (__pyx_v_buffer_list->mBuffers[0]).mData = malloc(__pyx_v_bytes_per_buffer);

    /* "coremusic/capi.pyx":2869
 *             buffer_list.mNumberBuffers = 1
 *             buffer_list.mBuffers[0].mData = malloc(bytes_per_buffer)
 *             if buffer_list.mBuffers[0].mData == NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list)
 *                 raise MemoryError("Could not allocate audio buffer")
*/
    __pyx_t_4 = ((__pyx_v_buffer_list->mBuffers[0]).mData == NULL);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2870
 *             buffer_list.mBuffers[0].mData = malloc(bytes_per_buffer)
 *             if buffer_list.mBuffers[0].mData == NULL:
 *                 free(buffer_list)             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate audio buffer")
 * 
*/
      free(__pyx_v_buffer_list);

      /* "coremusic/capi.pyx":2871
 *             if buffer_list.mBuffers[0].mData == NULL:
 *                 free(buffer_list)
 *                 raise MemoryError("Could not allocate audio buffer")             # <<<<<<<<<<<<<<
 * 
 *             memset(buffer_list.mBuffers[0].mData, 0, bytes_per_buffer)
*/
      __pyx_t_6 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_audio_buffer};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2871, __pyx_L6_error)

      /* "coremusic/capi.pyx":2869
 *             buffer_list.mNumberBuffers = 1
 *             buffer_list.mBuffers[0].mData = malloc(bytes_per_buffer)
 *             if buffer_list.mBuffers[0].mData == NULL:             # <<<<<<<<<<<<<<
 *                 free(buffer_list)
 *                 raise MemoryError("Could not allocate audio buffer")
*/
    }

    /* "coremusic/capi.pyx":2873
 *                 raise MemoryError("Could not allocate audio buffer")
 * 
 *             memset(buffer_list.mBuffers[0].mData, 0, bytes_per_buffer)             # <<<<<<<<<<<<<<
 *             buffer_list.mBuffers[0].mDataByteSize = bytes_per_buffer
 *             buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame
*/
    (void)(memset((__pyx_v_buffer_list->mBuffers[0]).mData, 0, __pyx_v_bytes_per_buffer));

    /* "coremusic/capi.pyx":2874
 * 
 *             memset(buffer_list.mBuffers[0].mData, 0, bytes_per_buffer)
 *             buffer_list.mBuffers[0].mDataByteSize = bytes_per_buffer             # <<<<<<<<<<<<<<
 *             buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame
 * 
*/
    (__pyx_v_buffer_list->mBuffers[0]).mDataByteSize = __pyx_v_bytes_per_buffer;

    /* "coremusic/capi.pyx":2875
 *             memset(buffer_list.mBuffers[0].mData, 0, bytes_per_buffer)
 *             buffer_list.mBuffers[0].mDataByteSize = bytes_per_buffer
 *             buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame             # <<<<<<<<<<<<<<
 * 
 *             # Read audio data in chunks
*/
    __pyx_t_9 = __pyx_v_client_format.mChannelsPerFrame;
    (__pyx_v_buffer_list->mBuffers[0]).mNumberChannels = __pyx_t_9;

    /* "coremusic/capi.pyx":2878
 * 
 *             # Read audio data in chunks
 *             read_frames = 0             # <<<<<<<<<<<<<<
 *             while read_frames < <cf.UInt32>file_length_frames:
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames
*/
    __pyx_v_read_frames = 0;

    /* "coremusic/capi.pyx":2879
 *             # Read audio data in chunks
 *             read_frames = 0
 *             while read_frames < <cf.UInt32>file_length_frames:             # <<<<<<<<<<<<<<
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames
 *                 if frames_to_read > 16384:
*/
    while (1) {
      __pyx_t_4 = (__pyx_v_read_frames < ((UInt32)__pyx_v_file_length_frames));
      if (!__pyx_t_4) break;

      /* "coremusic/capi.pyx":2880
 *             read_frames = 0
 *             while read_frames < <cf.UInt32>file_length_frames:
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames             # <<<<<<<<<<<<<<
 *                 if frames_to_read > 16384:
 *                     frames_to_read = 16384  # Read in chunks
*/
      __pyx_v_frames_to_read = (((UInt32)__pyx_v_file_length_frames) - __pyx_v_read_frames);

      /* "coremusic/capi.pyx":2881
 *             while read_frames < <cf.UInt32>file_length_frames:
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames
 *                 if frames_to_read > 16384:             # <<<<<<<<<<<<<<
 *                     frames_to_read = 16384  # Read in chunks
 * 
*/
      __pyx_t_4 = (__pyx_v_frames_to_read > 0x4000);
      if (__pyx_t_4) {

        /* "coremusic/capi.pyx":2882
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames
 *                 if frames_to_read > 16384:
 *                     frames_to_read = 16384  # Read in chunks             # <<<<<<<<<<<<<<
 * 
 *                 # Setup temporary buffer list for this chunk
*/
        __pyx_v_frames_to_read = 0x4000;

        /* "coremusic/capi.pyx":2881
 *             while read_frames < <cf.UInt32>file_length_frames:
 *                 frames_to_read = <cf.UInt32>file_length_frames - read_frames
 *                 if frames_to_read > 16384:             # <<<<<<<<<<<<<<
 *                     frames_to_read = 16384  # Read in chunks
 * 
*/
      }

      /* "coremusic/capi.pyx":2885
 * 
 *                 # Setup temporary buffer list for this chunk
 *                 temp_buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *                 temp_buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame
 *                 temp_buffer_list.mBuffers[0].mData = <char*>buffer_list.mBuffers[0].mData + (read_frames * client_format.mBytesPerFrame)
*/
      __pyx_v_temp_buffer_list.mNumberBuffers = 1;

      /* "coremusic/capi.pyx":2886
 *                 # Setup temporary buffer list for this chunk
 *                 temp_buffer_list.mNumberBuffers = 1
 *                 temp_buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame             # <<<<<<<<<<<<<<
 *                 temp_buffer_list.mBuffers[0].mData = <char*>buffer_list.mBuffers[0].mData + (read_frames * client_format.mBytesPerFrame)
 *                 temp_buffer_list.mBuffers[0].mDataByteSize = frames_to_read * client_format.mBytesPerFrame
*/
      __pyx_t_9 = __pyx_v_client_format.mChannelsPerFrame;
      (__pyx_v_temp_buffer_list.mBuffers[0]).mNumberChannels = __pyx_t_9;

      /* "coremusic/capi.pyx":2887
 *                 temp_buffer_list.mNumberBuffers = 1
 *                 temp_buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame
 *                 temp_buffer_list.mBuffers[0].mData = <char*>buffer_list.mBuffers[0].mData + (read_frames * client_format.mBytesPerFrame)             # <<<<<<<<<<<<<<
 *                 temp_buffer_list.mBuffers[0].mDataByteSize = frames_to_read * client_format.mBytesPerFrame
 * 
*/
      (__pyx_v_temp_buffer_list.mBuffers[0]).mData = (((char *)(__pyx_v_buffer_list->mBuffers[0]).mData) + (__pyx_v_read_frames * __pyx_v_client_format.mBytesPerFrame));

      /* "coremusic/capi.pyx":2888
 *                 temp_buffer_list.mBuffers[0].mNumberChannels = client_format.mChannelsPerFrame
 *                 temp_buffer_list.mBuffers[0].mData = <char*>buffer_list.mBuffers[0].mData + (read_frames * client_format.mBytesPerFrame)
 *                 temp_buffer_list.mBuffers[0].mDataByteSize = frames_to_read * client_format.mBytesPerFrame             # <<<<<<<<<<<<<<
 * 
 *                 status = at.ExtAudioFileRead(audio_file, &frames_to_read, &temp_buffer_list)
*/
      (__pyx_v_temp_buffer_list.mBuffers[0]).mDataByteSize = (__pyx_v_frames_to_read * __pyx_v_client_format.mBytesPerFrame);

      /* "coremusic/capi.pyx":2890
 *                 temp_buffer_list.mBuffers[0].mDataByteSize = frames_to_read * client_format.mBytesPerFrame
 * 
 *                 status = at.ExtAudioFileRead(audio_file, &frames_to_read, &temp_buffer_list)             # <<<<<<<<<<<<<<
 *                 if frames_to_read == 0:
 *                     break
*/
      __pyx_v_status = ExtAudioFileRead(__pyx_v_audio_file, (&__pyx_v_frames_to_read), (&__pyx_v_temp_buffer_list));

      /* "coremusic/capi.pyx":2891
 * 
 *                 status = at.ExtAudioFileRead(audio_file, &frames_to_read, &temp_buffer_list)
 *                 if frames_to_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
      __pyx_t_4 = (__pyx_v_frames_to_read == 0);
      if (__pyx_t_4) {

        /* "coremusic/capi.pyx":2892
 *                 status = at.ExtAudioFileRead(audio_file, &frames_to_read, &temp_buffer_list)
 *                 if frames_to_read == 0:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 read_frames += frames_to_read
*/
        goto __pyx_L14_break;

        /* "coremusic/capi.pyx":2891
 * 
 *                 status = at.ExtAudioFileRead(audio_file, &frames_to_read, &temp_buffer_list)
 *                 if frames_to_read == 0:             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
      }

      /* "coremusic/capi.pyx":2894
 *                     break
 * 
 *                 read_frames += frames_to_read             # <<<<<<<<<<<<<<
 * 
 *             # Clean up old buffer if exists
*/
      __pyx_v_read_frames = (__pyx_v_read_frames + __pyx_v_frames_to_read);
    }
    __pyx_L14_break:;

    /* "coremusic/capi.pyx":2897
 * 
 *             # Clean up old buffer if exists
 *             if self.player_data.buffer_list != NULL:             # <<<<<<<<<<<<<<
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)
*/
    __pyx_t_4 = (__pyx_v_self->player_data.buffer_list != NULL);
    if (__pyx_t_4) {

      /* "coremusic/capi.pyx":2898
 *             # Clean up old buffer if exists
 *             if self.player_data.buffer_list != NULL:
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)
 *                 free(self.player_data.buffer_list)
*/
      __pyx_t_4 = ((__pyx_v_self->player_data.buffer_list->mBuffers[0]).mData != NULL);
      if (__pyx_t_4) {

        /* "coremusic/capi.pyx":2899
 *             if self.player_data.buffer_list != NULL:
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)             # <<<<<<<<<<<<<<
 *                 free(self.player_data.buffer_list)
 * 
*/
        free((__pyx_v_self->player_data.buffer_list->mBuffers[0]).mData);

        /* "coremusic/capi.pyx":2898
 *             # Clean up old buffer if exists
 *             if self.player_data.buffer_list != NULL:
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)
 *                 free(self.player_data.buffer_list)
*/
      }

      /* "coremusic/capi.pyx":2900
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)
 *                 free(self.player_data.buffer_list)             # <<<<<<<<<<<<<<
 * 
 *             # Set up player data
*/
      free(__pyx_v_self->player_data.buffer_list);

      /* "coremusic/capi.pyx":2897
 * 
 *             # Clean up old buffer if exists
 *             if self.player_data.buffer_list != NULL:             # <<<<<<<<<<<<<<
 *                 if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                     free(self.player_data.buffer_list.mBuffers[0].mData)
*/
    }

    /* "coremusic/capi.pyx":2903
 * 
 *             # Set up player data
 *             self.player_data.buffer_list = buffer_list             # <<<<<<<<<<<<<<
 *             self.player_data.total_frames = read_frames
 *             self.player_data.current_frame = 0
*/
    __pyx_v_self->player_data.buffer_list = __pyx_v_buffer_list;

    /* "coremusic/capi.pyx":2904
 *             # Set up player data
 *             self.player_data.buffer_list = buffer_list
 *             self.player_data.total_frames = read_frames             # <<<<<<<<<<<<<<
 *             self.player_data.current_frame = 0
 *             self.player_data.playing = False
*/
    __pyx_v_self->player_data.total_frames = __pyx_v_read_frames;

    /* "coremusic/capi.pyx":2905
 *             self.player_data.buffer_list = buffer_list
 *             self.player_data.total_frames = read_frames
 *             self.player_data.current_frame = 0             # <<<<<<<<<<<<<<
 *             self.player_data.playing = False
 *             self.player_data.loop = False
*/
    __pyx_v_self->player_data.current_frame = 0;

    /* "coremusic/capi.pyx":2906
 *             self.player_data.total_frames = read_frames
 *             self.player_data.current_frame = 0
 *             self.player_data.playing = False             # <<<<<<<<<<<<<<
 *             self.player_data.loop = False
 * 
*/
    __pyx_v_self->player_data.playing = 0;

    /* "coremusic/capi.pyx":2907
 *             self.player_data.current_frame = 0
 *             self.player_data.playing = False
 *             self.player_data.loop = False             # <<<<<<<<<<<<<<
 * 
 *         finally:
*/
    __pyx_v_self->player_data.loop = 0;
  }

  /* "coremusic/capi.pyx":2910
 * 
 *         finally:
 *             at.ExtAudioFileDispose(audio_file)             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
  /*finally:*/ {
    /*normal exit:*/{
      (void)(ExtAudioFileDispose(__pyx_v_audio_file));
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
      {
        (void)(ExtAudioFileDispose(__pyx_v_audio_file));
      }
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "coremusic/capi.pyx":2912
 *             at.ExtAudioFileDispose(audio_file)
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def setup_output(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2777
 *         self._link_session_ref = link_session
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback using ExtAudioFile"""
 *         # Declare all C variables at the beginning
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.load_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2914
 *         return 0  # noErr
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef at.AudioComponentDescription output_desc
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_5setup_output(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_4setup_output, "AudioPlayer.setup_output(self)\n\nSetup the audio output unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_5setup_output = {"setup_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_5setup_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_4setup_output};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_5setup_output(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup_output (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("setup_output", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("setup_output", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_4setup_output(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_4setup_output(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  AudioComponentDescription __pyx_v_output_desc;
  AudioComponent __pyx_v_comp;
  OSStatus __pyx_v_status;
  AudioStreamBasicDescription __pyx_v_stream_format;
  AURenderCallbackStruct __pyx_v_callback_struct;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setup_output", 0);

  /* "coremusic/capi.pyx":2921
 * 
 *         # Find default output AudioComponent
 *         output_desc.componentType = at.kAudioUnitType_Output             # <<<<<<<<<<<<<<
 *         output_desc.componentSubType = at.kAudioUnitSubType_DefaultOutput
 *         output_desc.componentManufacturer = at.kAudioUnitManufacturer_Apple
*/
  __pyx_v_output_desc.componentType = kAudioUnitType_Output;

  /* "coremusic/capi.pyx":2922
 *         # Find default output AudioComponent
 *         output_desc.componentType = at.kAudioUnitType_Output
 *         output_desc.componentSubType = at.kAudioUnitSubType_DefaultOutput             # <<<<<<<<<<<<<<
 *         output_desc.componentManufacturer = at.kAudioUnitManufacturer_Apple
 *         output_desc.componentFlags = 0
*/
  __pyx_v_output_desc.componentSubType = kAudioUnitSubType_DefaultOutput;

  /* "coremusic/capi.pyx":2923
 *         output_desc.componentType = at.kAudioUnitType_Output
 *         output_desc.componentSubType = at.kAudioUnitSubType_DefaultOutput
 *         output_desc.componentManufacturer = at.kAudioUnitManufacturer_Apple             # <<<<<<<<<<<<<<
 *         output_desc.componentFlags = 0
 *         output_desc.componentFlagsMask = 0
*/
  __pyx_v_output_desc.componentManufacturer = kAudioUnitManufacturer_Apple;

  /* "coremusic/capi.pyx":2924
 *         output_desc.componentSubType = at.kAudioUnitSubType_DefaultOutput
 *         output_desc.componentManufacturer = at.kAudioUnitManufacturer_Apple
 *         output_desc.componentFlags = 0             # <<<<<<<<<<<<<<
 *         output_desc.componentFlagsMask = 0
 * 
*/
  __pyx_v_output_desc.componentFlags = 0;

  /* "coremusic/capi.pyx":2925
 *         output_desc.componentManufacturer = at.kAudioUnitManufacturer_Apple
 *         output_desc.componentFlags = 0
 *         output_desc.componentFlagsMask = 0             # <<<<<<<<<<<<<<
 * 
 *         comp = at.AudioComponentFindNext(NULL, &output_desc)
*/
  __pyx_v_output_desc.componentFlagsMask = 0;

  /* "coremusic/capi.pyx":2927
 *         output_desc.componentFlagsMask = 0
 * 
 *         comp = at.AudioComponentFindNext(NULL, &output_desc)             # <<<<<<<<<<<<<<
 *         if comp == NULL:
 *             raise RuntimeError("Cannot find default output AudioComponent")
*/
  __pyx_v_comp = AudioComponentFindNext(NULL, (&__pyx_v_output_desc));

  /* "coremusic/capi.pyx":2928
 * 
 *         comp = at.AudioComponentFindNext(NULL, &output_desc)
 *         if comp == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Cannot find default output AudioComponent")
 * 
*/
  __pyx_t_1 = (__pyx_v_comp == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2929
 *         comp = at.AudioComponentFindNext(NULL, &output_desc)
 *         if comp == NULL:
 *             raise RuntimeError("Cannot find default output AudioComponent")             # <<<<<<<<<<<<<<
 * 
 *         # Create AudioUnit instance
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_find_default_output_Audio};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2929, __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_ERR(0, 2929, __pyx_L1_error)

    /* "coremusic/capi.pyx":2928
 * 
 *         comp = at.AudioComponentFindNext(NULL, &output_desc)
 *         if comp == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Cannot find default output AudioComponent")
 * 
*/
  }

  /* "coremusic/capi.pyx":2932
 * 
 *         # Create AudioUnit instance
 *         status = at.AudioComponentInstanceNew(comp, &self.output_unit)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"Could not create AudioUnit instance: {status}")
*/
  __pyx_v_status = AudioComponentInstanceNew(__pyx_v_comp, (&__pyx_v_self->output_unit));

  /* "coremusic/capi.pyx":2933
 *         # Create AudioUnit instance
 *         status = at.AudioComponentInstanceNew(comp, &self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not create AudioUnit instance: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2934
 *         status = at.AudioComponentInstanceNew(comp, &self.output_unit)
 *         if status != 0:
 *             raise RuntimeError(f"Could not create AudioUnit instance: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Set stream format
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_AudioUnit_insta, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __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_ERR(0, 2934, __pyx_L1_error)

    /* "coremusic/capi.pyx":2933
 *         # Create AudioUnit instance
 *         status = at.AudioComponentInstanceNew(comp, &self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not create AudioUnit instance: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2938
 *         # Set stream format
 *         cdef at.AudioStreamBasicDescription stream_format
 *         stream_format.mSampleRate = SAMPLE_RATE             # <<<<<<<<<<<<<<
 *         stream_format.mFormatID = ca.kAudioFormatLinearPCM
 *         stream_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
*/
  __pyx_v_stream_format.mSampleRate = 44100.0;

  /* "coremusic/capi.pyx":2939
 *         cdef at.AudioStreamBasicDescription stream_format
 *         stream_format.mSampleRate = SAMPLE_RATE
 *         stream_format.mFormatID = ca.kAudioFormatLinearPCM             # <<<<<<<<<<<<<<
 *         stream_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         stream_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
*/
  __pyx_v_stream_format.mFormatID = kAudioFormatLinearPCM;

  /* "coremusic/capi.pyx":2940
 *         stream_format.mSampleRate = SAMPLE_RATE
 *         stream_format.mFormatID = ca.kAudioFormatLinearPCM
 *         stream_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat             # <<<<<<<<<<<<<<
 *         stream_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *         stream_format.mFramesPerPacket = 1
*/
  __pyx_v_stream_format.mFormatFlags = kLinearPCMFormatFlagIsFloat;

  /* "coremusic/capi.pyx":2941
 *         stream_format.mFormatID = ca.kAudioFormatLinearPCM
 *         stream_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         stream_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS             # <<<<<<<<<<<<<<
 *         stream_format.mFramesPerPacket = 1
 *         stream_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
*/
  __pyx_v_stream_format.mBytesPerPacket = ((sizeof(Float32)) * 2);

  /* "coremusic/capi.pyx":2942
 *         stream_format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         stream_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *         stream_format.mFramesPerPacket = 1             # <<<<<<<<<<<<<<
 *         stream_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *         stream_format.mChannelsPerFrame = CHANNELS
*/
  __pyx_v_stream_format.mFramesPerPacket = 1;

  /* "coremusic/capi.pyx":2943
 *         stream_format.mBytesPerPacket = sizeof(cf.Float32) * CHANNELS
 *         stream_format.mFramesPerPacket = 1
 *         stream_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)             # <<<<<<<<<<<<<<
 *         stream_format.mChannelsPerFrame = CHANNELS
 *         stream_format.mBitsPerChannel = BITS_PER_CHANNEL
*/
  __pyx_v_stream_format.mBytesPerFrame = (2 * (sizeof(Float32)));

  /* "coremusic/capi.pyx":2944
 *         stream_format.mFramesPerPacket = 1
 *         stream_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *         stream_format.mChannelsPerFrame = CHANNELS             # <<<<<<<<<<<<<<
 *         stream_format.mBitsPerChannel = BITS_PER_CHANNEL
 *         stream_format.mReserved = 0
*/
  __pyx_v_stream_format.mChannelsPerFrame = 2;

  /* "coremusic/capi.pyx":2945
 *         stream_format.mBytesPerFrame = CHANNELS * sizeof(cf.Float32)
 *         stream_format.mChannelsPerFrame = CHANNELS
 *         stream_format.mBitsPerChannel = BITS_PER_CHANNEL             # <<<<<<<<<<<<<<
 *         stream_format.mReserved = 0
 * 
*/
  __pyx_v_stream_format.mBitsPerChannel = 32;

  /* "coremusic/capi.pyx":2946
 *         stream_format.mChannelsPerFrame = CHANNELS
 *         stream_format.mBitsPerChannel = BITS_PER_CHANNEL
 *         stream_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *         status = at.AudioUnitSetProperty(
*/
  __pyx_v_stream_format.mReserved = 0;

  /* "coremusic/capi.pyx":2948
 *         stream_format.mReserved = 0
 * 
 *         status = at.AudioUnitSetProperty(             # <<<<<<<<<<<<<<
 *             self.output_unit,
 *             at.kAudioUnitProperty_StreamFormat,
*/
  __pyx_v_status = AudioUnitSetProperty(__pyx_v_self->output_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, (&__pyx_v_stream_format), (sizeof(__pyx_v_stream_format)));

  /* "coremusic/capi.pyx":2956
 *             sizeof(stream_format)
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not set stream format: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2957
 *         )
 *         if status != 0:
 *             raise RuntimeError(f"Could not set stream format: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Set render callback
*/
    __pyx_t_6 = NULL;
    __pyx_t_3 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_set_stream_format, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2957, __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_ERR(0, 2957, __pyx_L1_error)

    /* "coremusic/capi.pyx":2956
 *             sizeof(stream_format)
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not set stream format: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2961
 *         # Set render callback
 *         cdef at.AURenderCallbackStruct callback_struct
 *         callback_struct.inputProc = audio_player_render_callback             # <<<<<<<<<<<<<<
 *         callback_struct.inputProcRefCon = &self.player_data
 * 
*/
  __pyx_v_callback_struct.inputProc = __pyx_f_9coremusic_4capi_audio_player_render_callback;

  /* "coremusic/capi.pyx":2962
 *         cdef at.AURenderCallbackStruct callback_struct
 *         callback_struct.inputProc = audio_player_render_callback
 *         callback_struct.inputProcRefCon = &self.player_data             # <<<<<<<<<<<<<<
 * 
 *         status = at.AudioUnitSetProperty(
*/
  __pyx_v_callback_struct.inputProcRefCon = (&__pyx_v_self->player_data);

  /* "coremusic/capi.pyx":2964
 *         callback_struct.inputProcRefCon = &self.player_data
 * 
 *         status = at.AudioUnitSetProperty(             # <<<<<<<<<<<<<<
 *             self.output_unit,
 *             at.kAudioUnitProperty_SetRenderCallback,
*/
  __pyx_v_status = AudioUnitSetProperty(__pyx_v_self->output_unit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, (&__pyx_v_callback_struct), (sizeof(__pyx_v_callback_struct)));

  /* "coremusic/capi.pyx":2972
 *             sizeof(callback_struct)
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not set render callback: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2973
 *         )
 *         if status != 0:
 *             raise RuntimeError(f"Could not set render callback: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Initialize AudioUnit
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_set_render_callback, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __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_ERR(0, 2973, __pyx_L1_error)

    /* "coremusic/capi.pyx":2972
 *             sizeof(callback_struct)
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not set render callback: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2976
 * 
 *         # Initialize AudioUnit
 *         status = at.AudioUnitInitialize(self.output_unit)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"Could not initialize AudioUnit: {status}")
*/
  __pyx_v_status = AudioUnitInitialize(__pyx_v_self->output_unit);

  /* "coremusic/capi.pyx":2977
 *         # Initialize AudioUnit
 *         status = at.AudioUnitInitialize(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not initialize AudioUnit: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2978
 *         status = at.AudioUnitInitialize(self.output_unit)
 *         if status != 0:
 *             raise RuntimeError(f"Could not initialize AudioUnit: {status}")             # <<<<<<<<<<<<<<
 * 
 *         self.initialized = True
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_initialize_AudioUnit, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __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_ERR(0, 2978, __pyx_L1_error)

    /* "coremusic/capi.pyx":2977
 *         # Initialize AudioUnit
 *         status = at.AudioUnitInitialize(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not initialize AudioUnit: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2980
 *             raise RuntimeError(f"Could not initialize AudioUnit: {status}")
 * 
 *         self.initialized = True             # <<<<<<<<<<<<<<
 *         return 0  # noErr
 * 
*/
  __pyx_v_self->initialized = 1;

  /* "coremusic/capi.pyx":2981
 * 
 *         self.initialized = True
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def start(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2914
 *         return 0  # noErr
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef at.AudioComponentDescription output_desc
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.setup_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2983
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback"""
 *         if not self.initialized:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_7start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_6start, "AudioPlayer.start(self)\n\nStart audio playback");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_7start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_7start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_6start};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_7start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_6start(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_6start(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  /* "coremusic/capi.pyx":2985
 *     def start(self):
 *         """Start audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->initialized);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2986
 *         """Start audio playback"""
 *         if not self.initialized:
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")             # <<<<<<<<<<<<<<
 * 
 *         self.player_data.playing = True
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_AudioPlayer_not_initialized_Call};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __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_ERR(0, 2986, __pyx_L1_error)

    /* "coremusic/capi.pyx":2985
 *     def start(self):
 *         """Start audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")
 * 
*/
  }

  /* "coremusic/capi.pyx":2988
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")
 * 
 *         self.player_data.playing = True             # <<<<<<<<<<<<<<
 *         self.player_data.current_frame = 0
 * 
*/
  __pyx_v_self->player_data.playing = 1;

  /* "coremusic/capi.pyx":2989
 * 
 *         self.player_data.playing = True
 *         self.player_data.current_frame = 0             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStart(self.output_unit)
*/
  __pyx_v_self->player_data.current_frame = 0;

  /* "coremusic/capi.pyx":2991
 *         self.player_data.current_frame = 0
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStart(self.output_unit)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             self.player_data.playing = False
*/
  __pyx_v_status = AudioOutputUnitStart(__pyx_v_self->output_unit);

  /* "coremusic/capi.pyx":2992
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStart(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             self.player_data.playing = False
 *             raise RuntimeError(f"Could not start AudioUnit: {status}")
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2993
 *         cdef cf.OSStatus status = at.AudioOutputUnitStart(self.output_unit)
 *         if status != 0:
 *             self.player_data.playing = False             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not start AudioUnit: {status}")
 * 
*/
    __pyx_v_self->player_data.playing = 0;

    /* "coremusic/capi.pyx":2994
 *         if status != 0:
 *             self.player_data.playing = False
 *             raise RuntimeError(f"Could not start AudioUnit: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_start_AudioUnit, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2994, __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_ERR(0, 2994, __pyx_L1_error)

    /* "coremusic/capi.pyx":2992
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStart(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             self.player_data.playing = False
 *             raise RuntimeError(f"Could not start AudioUnit: {status}")
*/
  }

  /* "coremusic/capi.pyx":2996
 *             raise RuntimeError(f"Could not start AudioUnit: {status}")
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def play(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2983
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback"""
 *         if not self.initialized:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":2998
 *         return 0  # noErr
 * 
 *     def play(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback (alias for start())"""
 *         return self.start()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_9play(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_8play, "AudioPlayer.play(self)\n\nStart audio playback (alias for start())");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_9play = {"play", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_9play, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_8play};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_9play(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("play (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("play", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("play", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_8play(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_8play(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("play", 0);

  /* "coremusic/capi.pyx":3000
 *     def play(self):
 *         """Start audio playback (alias for start())"""
 *         return self.start()             # <<<<<<<<<<<<<<
 * 
 *     def stop(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2998
 *         return 0  # noErr
 * 
 *     def play(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback (alias for start())"""
 *         return self.start()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.play", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3002
 *         return self.start()
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio playback"""
 *         if not self.initialized:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_11stop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_10stop, "AudioPlayer.stop(self)\n\nStop audio playback");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_11stop = {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_11stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_10stop};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_11stop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("stop", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("stop", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_10stop(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_10stop(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);

  /* "coremusic/capi.pyx":3004
 *     def stop(self):
 *         """Stop audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->initialized);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3005
 *         """Stop audio playback"""
 *         if not self.initialized:
 *             return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *         self.player_data.playing = False
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3004
 *     def stop(self):
 *         """Stop audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr
 * 
*/
  }

  /* "coremusic/capi.pyx":3007
 *             return 0  # noErr
 * 
 *         self.player_data.playing = False             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStop(self.output_unit)
*/
  __pyx_v_self->player_data.playing = 0;

  /* "coremusic/capi.pyx":3009
 *         self.player_data.playing = False
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStop(self.output_unit)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"Could not stop AudioUnit: {status}")
*/
  __pyx_v_status = AudioOutputUnitStop(__pyx_v_self->output_unit);

  /* "coremusic/capi.pyx":3010
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStop(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not stop AudioUnit: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3011
 *         cdef cf.OSStatus status = at.AudioOutputUnitStop(self.output_unit)
 *         if status != 0:
 *             raise RuntimeError(f"Could not stop AudioUnit: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_stop_AudioUnit, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3011, __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_ERR(0, 3011, __pyx_L1_error)

    /* "coremusic/capi.pyx":3010
 * 
 *         cdef cf.OSStatus status = at.AudioOutputUnitStop(self.output_unit)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not stop AudioUnit: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3013
 *             raise RuntimeError(f"Could not stop AudioUnit: {status}")
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def set_looping(self, bint loop):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3002
 *         return self.start()
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio playback"""
 *         if not self.initialized:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3015
 *         return 0  # noErr
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         self.player_data.loop = loop
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_13set_looping(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_12set_looping, "AudioPlayer.set_looping(self, bool loop)\n\nEnable/disable looping playback");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_13set_looping = {"set_looping", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_13set_looping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_12set_looping};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_13set_looping(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_loop;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_looping (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_loop,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3015, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_looping", 0) < (0)) __PYX_ERR(0, 3015, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_looping", 1, 1, 1, i); __PYX_ERR(0, 3015, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3015, __pyx_L3_error)
    }
    __pyx_v_loop = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_loop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3015, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_looping", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3015, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.set_looping", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_12set_looping(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self), __pyx_v_loop);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_12set_looping(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, int __pyx_v_loop) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_looping", 0);

  /* "coremusic/capi.pyx":3017
 *     def set_looping(self, bint loop):
 *         """Enable/disable looping playback"""
 *         self.player_data.loop = loop             # <<<<<<<<<<<<<<
 * 
 *     def reset_playback(self):
*/
  __pyx_v_self->player_data.loop = __pyx_v_loop;

  /* "coremusic/capi.pyx":3015
 *         return 0  # noErr
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         self.player_data.loop = loop
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3019
 *         self.player_data.loop = loop
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         self.player_data.current_frame = 0
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_15reset_playback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_14reset_playback, "AudioPlayer.reset_playback(self)\n\nReset playback to beginning");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_15reset_playback = {"reset_playback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_15reset_playback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_14reset_playback};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_15reset_playback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_playback (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("reset_playback", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("reset_playback", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_14reset_playback(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_14reset_playback(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_playback", 0);

  /* "coremusic/capi.pyx":3021
 *     def reset_playback(self):
 *         """Reset playback to beginning"""
 *         self.player_data.current_frame = 0             # <<<<<<<<<<<<<<
 * 
 *     def is_playing(self):
*/
  __pyx_v_self->player_data.current_frame = 0;

  /* "coremusic/capi.pyx":3019
 *         self.player_data.loop = loop
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         self.player_data.current_frame = 0
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3023
 *         self.player_data.current_frame = 0
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(self.player_data.playing)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_17is_playing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_16is_playing, "AudioPlayer.is_playing(self)\n\nCheck if audio is currently playing");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_17is_playing = {"is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_17is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_16is_playing};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_17is_playing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_playing (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_playing", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_playing", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_16is_playing(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_16is_playing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__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("is_playing", 0);

  /* "coremusic/capi.pyx":3025
 *     def is_playing(self):
 *         """Check if audio is currently playing"""
 *         return bool(self.player_data.playing)             # <<<<<<<<<<<<<<
 * 
 *     def get_progress(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_self->player_data.playing != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3023
 *         self.player_data.current_frame = 0
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(self.player_data.playing)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.is_playing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3027
 *         return bool(self.player_data.playing)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_19get_progress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_18get_progress, "AudioPlayer.get_progress(self)\n\nGet current playback progress as a float (0.0 to 1.0)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_19get_progress = {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_19get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_18get_progress};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_19get_progress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_progress (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_progress", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_progress", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_18get_progress(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_18get_progress(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_progress", 0);

  /* "coremusic/capi.pyx":3029
 *     def get_progress(self):
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames
*/
  __pyx_t_1 = (__pyx_v_self->player_data.total_frames == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3030
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:
 *             return 0.0             # <<<<<<<<<<<<<<
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_0);
    __pyx_r = __pyx_mstate_global->__pyx_float_0_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3029
 *     def get_progress(self):
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames
*/
  }

  /* "coremusic/capi.pyx":3031
 *         if self.player_data.total_frames == 0:
 *             return 0.0
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((float)__pyx_v_self->player_data.total_frames) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 3031, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble((((float)__pyx_v_self->player_data.current_frame) / ((float)__pyx_v_self->player_data.total_frames))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3027
 *         return bool(self.player_data.playing)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.get_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3033
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def link_session(self):
 *         """Get the Link session if one was provided"""
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_12link_session_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_12link_session_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_12link_session___get__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_12link_session___get__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "coremusic/capi.pyx":3036
 *     def link_session(self):
 *         """Get the Link session if one was provided"""
 *         return self._link_session_ref             # <<<<<<<<<<<<<<
 * 
 *     def get_link_timing(self, quantum=4.0):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_link_session_ref);
  __pyx_r = __pyx_v_self->_link_session_ref;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3033
 *         return <float>self.player_data.current_frame / <float>self.player_data.total_frames
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def link_session(self):
 *         """Get the Link session if one was provided"""
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3038
 *         return self._link_session_ref
 * 
 *     def get_link_timing(self, quantum=4.0):             # <<<<<<<<<<<<<<
 *         """Get current Link timing information (if Link session is attached)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_21get_link_timing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_20get_link_timing, "AudioPlayer.get_link_timing(self, quantum=4.0)\n\nGet current Link timing information (if Link session is attached)\n\nArgs:\n    quantum: Beat quantum (default 4.0 for 4/4 time)\n\nReturns:\n    dict with keys: tempo, beat, phase, is_playing\n    or None if no Link session attached");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_21get_link_timing = {"get_link_timing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_21get_link_timing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_20get_link_timing};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_21get_link_timing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_quantum = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_link_timing (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_quantum,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3038, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3038, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_link_timing", 0) < (0)) __PYX_ERR(0, 3038, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_4_0));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3038, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_4_0));
    }
    __pyx_v_quantum = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_link_timing", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3038, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.get_link_timing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_20get_link_timing(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self), __pyx_v_quantum);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_20get_link_timing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, PyObject *__pyx_v_quantum) {
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_link_timing", 0);

  /* "coremusic/capi.pyx":3048
 *             or None if no Link session attached
 *         """
 *         if self._link_session_ref is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
  __pyx_t_1 = (__pyx_v_self->_link_session_ref == Py_None);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3049
 *         """
 *         if self._link_session_ref is None:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         # Query Link session from Python layer
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3048
 *             or None if no Link session attached
 *         """
 *         if self._link_session_ref is None:             # <<<<<<<<<<<<<<
 *             return None
 * 
*/
  }

  /* "coremusic/capi.pyx":3052
 * 
 *         # Query Link session from Python layer
 *         state = self._link_session_ref.capture_app_session_state()             # <<<<<<<<<<<<<<
 *         current_time = self._link_session_ref.clock.micros()
 * 
*/
  __pyx_t_3 = __pyx_v_self->_link_session_ref;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_capture_app_session_state, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v_state = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":3053
 *         # Query Link session from Python layer
 *         state = self._link_session_ref.capture_app_session_state()
 *         current_time = self._link_session_ref.clock.micros()             # <<<<<<<<<<<<<<
 * 
 *         return {
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_link_session_ref, __pyx_mstate_global->__pyx_n_u_clock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_micros, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v_current_time = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":3055
 *         current_time = self._link_session_ref.clock.micros()
 * 
 *         return {             # <<<<<<<<<<<<<<
 *             'tempo': state.tempo,
 *             'beat': state.beat_at_time(current_time, quantum),
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":3056
 * 
 *         return {
 *             'tempo': state.tempo,             # <<<<<<<<<<<<<<
 *             'beat': state.beat_at_time(current_time, quantum),
 *             'phase': state.phase_at_time(current_time, quantum),
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_mstate_global->__pyx_n_u_tempo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tempo, __pyx_t_5) < (0)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":3057
 *         return {
 *             'tempo': state.tempo,
 *             'beat': state.beat_at_time(current_time, quantum),             # <<<<<<<<<<<<<<
 *             'phase': state.phase_at_time(current_time, quantum),
 *             'is_playing': state.is_playing
*/
  __pyx_t_3 = __pyx_v_state;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_current_time, __pyx_v_quantum};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_beat_at_time, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_beat, __pyx_t_5) < (0)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":3058
 *             'tempo': state.tempo,
 *             'beat': state.beat_at_time(current_time, quantum),
 *             'phase': state.phase_at_time(current_time, quantum),             # <<<<<<<<<<<<<<
 *             'is_playing': state.is_playing
 *         }
*/
  __pyx_t_3 = __pyx_v_state;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_current_time, __pyx_v_quantum};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_phase_at_time, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_phase, __pyx_t_5) < (0)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "coremusic/capi.pyx":3059
 *             'beat': state.beat_at_time(current_time, quantum),
 *             'phase': state.phase_at_time(current_time, quantum),
 *             'is_playing': state.is_playing             # <<<<<<<<<<<<<<
 *         }
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_state, __pyx_mstate_global->__pyx_n_u_is_playing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_playing, __pyx_t_5) < (0)) __PYX_ERR(0, 3056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3038
 *         return self._link_session_ref
 * 
 *     def get_link_timing(self, quantum=4.0):             # <<<<<<<<<<<<<<
 *         """Get current Link timing information (if Link session is attached)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.get_link_timing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3062
 *         }
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized and self.output_unit != NULL:
*/

/* Python wrapper */
static void __pyx_pw_9coremusic_4capi_11AudioPlayer_23__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9coremusic_4capi_11AudioPlayer_23__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_9coremusic_4capi_11AudioPlayer_22__dealloc__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_9coremusic_4capi_11AudioPlayer_22__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "coremusic/capi.pyx":3064
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized and self.output_unit != NULL:             # <<<<<<<<<<<<<<
 *             at.AudioOutputUnitStop(self.output_unit)
 *             at.AudioUnitUninitialize(self.output_unit)
*/
  if (__pyx_v_self->initialized) {
  } else {
    __pyx_t_1 = __pyx_v_self->initialized;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->output_unit != NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3065
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized and self.output_unit != NULL:
 *             at.AudioOutputUnitStop(self.output_unit)             # <<<<<<<<<<<<<<
 *             at.AudioUnitUninitialize(self.output_unit)
 *             at.AudioComponentInstanceDispose(self.output_unit)
*/
    (void)(AudioOutputUnitStop(__pyx_v_self->output_unit));

    /* "coremusic/capi.pyx":3066
 *         if self.initialized and self.output_unit != NULL:
 *             at.AudioOutputUnitStop(self.output_unit)
 *             at.AudioUnitUninitialize(self.output_unit)             # <<<<<<<<<<<<<<
 *             at.AudioComponentInstanceDispose(self.output_unit)
 * 
*/
    (void)(AudioUnitUninitialize(__pyx_v_self->output_unit));

    /* "coremusic/capi.pyx":3067
 *             at.AudioOutputUnitStop(self.output_unit)
 *             at.AudioUnitUninitialize(self.output_unit)
 *             at.AudioComponentInstanceDispose(self.output_unit)             # <<<<<<<<<<<<<<
 * 
 *         if self.player_data.buffer_list != NULL:
*/
    (void)(AudioComponentInstanceDispose(__pyx_v_self->output_unit));

    /* "coremusic/capi.pyx":3064
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized and self.output_unit != NULL:             # <<<<<<<<<<<<<<
 *             at.AudioOutputUnitStop(self.output_unit)
 *             at.AudioUnitUninitialize(self.output_unit)
*/
  }

  /* "coremusic/capi.pyx":3069
 *             at.AudioComponentInstanceDispose(self.output_unit)
 * 
 *         if self.player_data.buffer_list != NULL:             # <<<<<<<<<<<<<<
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
*/
  __pyx_t_1 = (__pyx_v_self->player_data.buffer_list != NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3070
 * 
 *         if self.player_data.buffer_list != NULL:
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
 *             free(self.player_data.buffer_list)
*/
    __pyx_t_1 = ((__pyx_v_self->player_data.buffer_list->mBuffers[0]).mData != NULL);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":3071
 *         if self.player_data.buffer_list != NULL:
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)             # <<<<<<<<<<<<<<
 *             free(self.player_data.buffer_list)
 *             self.player_data.buffer_list = NULL
*/
      free((__pyx_v_self->player_data.buffer_list->mBuffers[0]).mData);

      /* "coremusic/capi.pyx":3070
 * 
 *         if self.player_data.buffer_list != NULL:
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:             # <<<<<<<<<<<<<<
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
 *             free(self.player_data.buffer_list)
*/
    }

    /* "coremusic/capi.pyx":3072
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
 *             free(self.player_data.buffer_list)             # <<<<<<<<<<<<<<
 *             self.player_data.buffer_list = NULL
 * 
*/
    free(__pyx_v_self->player_data.buffer_list);

    /* "coremusic/capi.pyx":3073
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
 *             free(self.player_data.buffer_list)
 *             self.player_data.buffer_list = NULL             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_self->player_data.buffer_list = NULL;

    /* "coremusic/capi.pyx":3069
 *             at.AudioComponentInstanceDispose(self.output_unit)
 * 
 *         if self.player_data.buffer_list != NULL:             # <<<<<<<<<<<<<<
 *             if self.player_data.buffer_list.mBuffers[0].mData != NULL:
 *                 free(self.player_data.buffer_list.mBuffers[0].mData)
*/
  }

  /* "coremusic/capi.pyx":3062
 *         }
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized and self.output_unit != NULL:
*/

  /* function exit code */
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_24__reduce_cython__, "AudioPlayer.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_24__reduce_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_24__reduce_cython__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_output_unit_self_player_dat, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_11AudioPlayer_26__setstate_cython__, "AudioPlayer.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_26__setstate_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer_26__setstate_cython__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_output_unit_self_player_dat, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.AudioPlayer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3090
 * 
 * # Audio queue input callback for recording
 * cdef void audio_recorder_input_callback(             # <<<<<<<<<<<<<<
 *     void* user_data,
 *     at.AudioQueueRef queue,
*/

static void __pyx_f_9coremusic_4capi_audio_recorder_input_callback(void *__pyx_v_user_data, AudioQueueRef __pyx_v_queue, AudioQueueBufferRef __pyx_v_buffer, CYTHON_UNUSED AudioTimeStamp const *__pyx_v_start_time, CYTHON_UNUSED UInt32 __pyx_v_num_packet_descriptions, CYTHON_UNUSED AudioStreamPacketDescription const *__pyx_v_packet_descs) {
  struct __pyx_t_9coremusic_4capi_AudioRecorderData *__pyx_v_recorder_data;
  UInt32 __pyx_v_frames_available;
  UInt32 __pyx_v_frames_to_copy;
  UInt32 __pyx_v_buffer_frames;
  Float32 *__pyx_v_input_data;
  size_t __pyx_v_bytes_to_copy;
  int __pyx_t_1;
  int __pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "coremusic/capi.pyx":3106
 *     cdef size_t bytes_to_copy
 * 
 *     if user_data == NULL or buffer == NULL:             # <<<<<<<<<<<<<<
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
*/
  __pyx_t_2 = (__pyx_v_user_data == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_buffer == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3108
 *     if user_data == NULL or buffer == NULL:
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)             # <<<<<<<<<<<<<<
 *         return
 * 
*/
    (void)(AudioQueueEnqueueBuffer(__pyx_v_queue, __pyx_v_buffer, 0, NULL));

    /* "coremusic/capi.pyx":3109
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 *         return             # <<<<<<<<<<<<<<
 * 
 *     recorder_data = <AudioRecorderData*>user_data
*/
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3106
 *     cdef size_t bytes_to_copy
 * 
 *     if user_data == NULL or buffer == NULL:             # <<<<<<<<<<<<<<
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
*/
  }

  /* "coremusic/capi.pyx":3111
 *         return
 * 
 *     recorder_data = <AudioRecorderData*>user_data             # <<<<<<<<<<<<<<
 * 
 *     if not recorder_data.recording or recorder_data.buffer == NULL:
*/
  __pyx_v_recorder_data = ((struct __pyx_t_9coremusic_4capi_AudioRecorderData *)__pyx_v_user_data);

  /* "coremusic/capi.pyx":3113
 *     recorder_data = <AudioRecorderData*>user_data
 * 
 *     if not recorder_data.recording or recorder_data.buffer == NULL:             # <<<<<<<<<<<<<<
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
*/
  __pyx_t_2 = (!(__pyx_v_recorder_data->recording != 0));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_recorder_data->buffer == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3115
 *     if not recorder_data.recording or recorder_data.buffer == NULL:
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)             # <<<<<<<<<<<<<<
 *         return
 * 
*/
    (void)(AudioQueueEnqueueBuffer(__pyx_v_queue, __pyx_v_buffer, 0, NULL));

    /* "coremusic/capi.pyx":3116
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 *         return             # <<<<<<<<<<<<<<
 * 
 *     # Calculate frames in this buffer
*/
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3113
 *     recorder_data = <AudioRecorderData*>user_data
 * 
 *     if not recorder_data.recording or recorder_data.buffer == NULL:             # <<<<<<<<<<<<<<
 *         # Re-enqueue the buffer and return
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
*/
  }

  /* "coremusic/capi.pyx":3119
 * 
 *     # Calculate frames in this buffer
 *     buffer_frames = buffer.mAudioDataByteSize // (sizeof(cf.Float32) * recorder_data.channels)             # <<<<<<<<<<<<<<
 *     input_data = <cf.Float32*>buffer.mAudioData
 * 
*/
  __pyx_t_3 = ((sizeof(Float32)) * __pyx_v_recorder_data->channels);
  if (unlikely(__pyx_t_3 == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(0, 3119, __pyx_L1_error)
  }
  __pyx_v_buffer_frames = (__pyx_v_buffer->mAudioDataByteSize / __pyx_t_3);

  /* "coremusic/capi.pyx":3120
 *     # Calculate frames in this buffer
 *     buffer_frames = buffer.mAudioDataByteSize // (sizeof(cf.Float32) * recorder_data.channels)
 *     input_data = <cf.Float32*>buffer.mAudioData             # <<<<<<<<<<<<<<
 * 
 *     # Calculate how many frames we can still store
*/
  __pyx_v_input_data = ((Float32 *)__pyx_v_buffer->mAudioData);

  /* "coremusic/capi.pyx":3123
 * 
 *     # Calculate how many frames we can still store
 *     frames_available = recorder_data.buffer_size_frames - recorder_data.current_frame             # <<<<<<<<<<<<<<
 *     frames_to_copy = buffer_frames
 *     if frames_to_copy > frames_available:
*/
  __pyx_v_frames_available = (__pyx_v_recorder_data->buffer_size_frames - __pyx_v_recorder_data->current_frame);

  /* "coremusic/capi.pyx":3124
 *     # Calculate how many frames we can still store
 *     frames_available = recorder_data.buffer_size_frames - recorder_data.current_frame
 *     frames_to_copy = buffer_frames             # <<<<<<<<<<<<<<
 *     if frames_to_copy > frames_available:
 *         frames_to_copy = frames_available
*/
  __pyx_v_frames_to_copy = __pyx_v_buffer_frames;

  /* "coremusic/capi.pyx":3125
 *     frames_available = recorder_data.buffer_size_frames - recorder_data.current_frame
 *     frames_to_copy = buffer_frames
 *     if frames_to_copy > frames_available:             # <<<<<<<<<<<<<<
 *         frames_to_copy = frames_available
 * 
*/
  __pyx_t_1 = (__pyx_v_frames_to_copy > __pyx_v_frames_available);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3126
 *     frames_to_copy = buffer_frames
 *     if frames_to_copy > frames_available:
 *         frames_to_copy = frames_available             # <<<<<<<<<<<<<<
 * 
 *     if frames_to_copy > 0:
*/
    __pyx_v_frames_to_copy = __pyx_v_frames_available;

    /* "coremusic/capi.pyx":3125
 *     frames_available = recorder_data.buffer_size_frames - recorder_data.current_frame
 *     frames_to_copy = buffer_frames
 *     if frames_to_copy > frames_available:             # <<<<<<<<<<<<<<
 *         frames_to_copy = frames_available
 * 
*/
  }

  /* "coremusic/capi.pyx":3128
 *         frames_to_copy = frames_available
 * 
 *     if frames_to_copy > 0:             # <<<<<<<<<<<<<<
 *         # Copy audio data to our buffer
 *         bytes_to_copy = <size_t>(frames_to_copy * recorder_data.channels * sizeof(cf.Float32))
*/
  __pyx_t_1 = (__pyx_v_frames_to_copy > 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3130
 *     if frames_to_copy > 0:
 *         # Copy audio data to our buffer
 *         bytes_to_copy = <size_t>(frames_to_copy * recorder_data.channels * sizeof(cf.Float32))             # <<<<<<<<<<<<<<
 *         memcpy(
 *             &recorder_data.buffer[recorder_data.current_frame * recorder_data.channels],
*/
    __pyx_v_bytes_to_copy = ((size_t)((__pyx_v_frames_to_copy * __pyx_v_recorder_data->channels) * (sizeof(Float32))));

    /* "coremusic/capi.pyx":3131
 *         # Copy audio data to our buffer
 *         bytes_to_copy = <size_t>(frames_to_copy * recorder_data.channels * sizeof(cf.Float32))
 *         memcpy(             # <<<<<<<<<<<<<<
 *             &recorder_data.buffer[recorder_data.current_frame * recorder_data.channels],
 *             input_data,
*/
    (void)(memcpy((&(__pyx_v_recorder_data->buffer[(__pyx_v_recorder_data->current_frame * __pyx_v_recorder_data->channels)])), __pyx_v_input_data, __pyx_v_bytes_to_copy));

    /* "coremusic/capi.pyx":3136
 *             bytes_to_copy
 *         )
 *         recorder_data.current_frame += frames_to_copy             # <<<<<<<<<<<<<<
 * 
 *     # Check if buffer is full
*/
    __pyx_v_recorder_data->current_frame = (__pyx_v_recorder_data->current_frame + __pyx_v_frames_to_copy);

    /* "coremusic/capi.pyx":3128
 *         frames_to_copy = frames_available
 * 
 *     if frames_to_copy > 0:             # <<<<<<<<<<<<<<
 *         # Copy audio data to our buffer
 *         bytes_to_copy = <size_t>(frames_to_copy * recorder_data.channels * sizeof(cf.Float32))
*/
  }

  /* "coremusic/capi.pyx":3139
 * 
 *     # Check if buffer is full
 *     if recorder_data.current_frame >= recorder_data.buffer_size_frames:             # <<<<<<<<<<<<<<
 *         recorder_data.recording = False
 *     else:
*/
  __pyx_t_1 = (__pyx_v_recorder_data->current_frame >= __pyx_v_recorder_data->buffer_size_frames);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3140
 *     # Check if buffer is full
 *     if recorder_data.current_frame >= recorder_data.buffer_size_frames:
 *         recorder_data.recording = False             # <<<<<<<<<<<<<<
 *     else:
 *         # Re-enqueue the buffer for more recording
*/
    __pyx_v_recorder_data->recording = 0;

    /* "coremusic/capi.pyx":3139
 * 
 *     # Check if buffer is full
 *     if recorder_data.current_frame >= recorder_data.buffer_size_frames:             # <<<<<<<<<<<<<<
 *         recorder_data.recording = False
 *     else:
*/
    goto __pyx_L11;
  }

  /* "coremusic/capi.pyx":3143
 *     else:
 *         # Re-enqueue the buffer for more recording
 *         at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    (void)(AudioQueueEnqueueBuffer(__pyx_v_queue, __pyx_v_buffer, 0, NULL));
  }
  __pyx_L11:;

  /* "coremusic/capi.pyx":3090
 * 
 * # Audio queue input callback for recording
 * cdef void audio_recorder_input_callback(             # <<<<<<<<<<<<<<
 *     void* user_data,
 *     at.AudioQueueRef queue,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("coremusic.capi.audio_recorder_input_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
}

/* "coremusic/capi.pyx":3159
 *     cdef str output_path
 * 
 *     def __init__(self, sample_rate=44100, channels=2):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioRecorder
 * 
*/

/* Python wrapper */
static int __pyx_pw_9coremusic_4capi_13AudioRecorder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder___init__, "Initialize the AudioRecorder\n\n        Args:\n            sample_rate: Sample rate for recording (default: 44100)\n            channels: Number of channels (1=mono, 2=stereo, default: 2)\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_9coremusic_4capi_13AudioRecorder___init__;
#endif
static int __pyx_pw_9coremusic_4capi_13AudioRecorder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sample_rate = 0;
  PyObject *__pyx_v_channels = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sample_rate,&__pyx_mstate_global->__pyx_n_u_channels,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3159, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 3159, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_44100));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_2));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_44100));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_2));
    }
    __pyx_v_sample_rate = values[0];
    __pyx_v_channels = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 3159, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder___init__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self), __pyx_v_sample_rate, __pyx_v_channels);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9coremusic_4capi_13AudioRecorder___init__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, PyObject *__pyx_v_sample_rate, PyObject *__pyx_v_channels) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  UInt32 __pyx_t_1;
  Float64 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "coremusic/capi.pyx":3166
 *             channels: Number of channels (1=mono, 2=stereo, default: 2)
 *         """
 *         memset(&self.recorder_data, 0, sizeof(AudioRecorderData))             # <<<<<<<<<<<<<<
 *         self.audio_queue = NULL
 *         self.initialized = False
*/
  (void)(memset((&__pyx_v_self->recorder_data), 0, (sizeof(struct __pyx_t_9coremusic_4capi_AudioRecorderData))));

  /* "coremusic/capi.pyx":3167
 *         """
 *         memset(&self.recorder_data, 0, sizeof(AudioRecorderData))
 *         self.audio_queue = NULL             # <<<<<<<<<<<<<<
 *         self.initialized = False
 *         self.output_path = None
*/
  __pyx_v_self->audio_queue = NULL;

  /* "coremusic/capi.pyx":3168
 *         memset(&self.recorder_data, 0, sizeof(AudioRecorderData))
 *         self.audio_queue = NULL
 *         self.initialized = False             # <<<<<<<<<<<<<<
 *         self.output_path = None
 * 
*/
  __pyx_v_self->initialized = 0;

  /* "coremusic/capi.pyx":3169
 *         self.audio_queue = NULL
 *         self.initialized = False
 *         self.output_path = None             # <<<<<<<<<<<<<<
 * 
 *         # Store format parameters
*/
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->output_path);
  __Pyx_DECREF(__pyx_v_self->output_path);
  __pyx_v_self->output_path = ((PyObject*)Py_None);

  /* "coremusic/capi.pyx":3172
 * 
 *         # Store format parameters
 *         self.recorder_data.sample_rate = sample_rate             # <<<<<<<<<<<<<<
 *         self.recorder_data.channels = channels
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_sample_rate); if (unlikely((__pyx_t_1 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3172, __pyx_L1_error)
  __pyx_v_self->recorder_data.sample_rate = __pyx_t_1;

  /* "coremusic/capi.pyx":3173
 *         # Store format parameters
 *         self.recorder_data.sample_rate = sample_rate
 *         self.recorder_data.channels = channels             # <<<<<<<<<<<<<<
 * 
 *         # Initialize format
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_channels); if (unlikely((__pyx_t_1 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3173, __pyx_L1_error)
  __pyx_v_self->recorder_data.channels = __pyx_t_1;

  /* "coremusic/capi.pyx":3176
 * 
 *         # Initialize format
 *         self.format.mSampleRate = sample_rate             # <<<<<<<<<<<<<<
 *         self.format.mFormatID = ca.kAudioFormatLinearPCM
 *         self.format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
*/
  __pyx_t_2 = __Pyx_PyFloat_AsDouble(__pyx_v_sample_rate); if (unlikely((__pyx_t_2 == ((Float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3176, __pyx_L1_error)
  __pyx_v_self->format.mSampleRate = __pyx_t_2;

  /* "coremusic/capi.pyx":3177
 *         # Initialize format
 *         self.format.mSampleRate = sample_rate
 *         self.format.mFormatID = ca.kAudioFormatLinearPCM             # <<<<<<<<<<<<<<
 *         self.format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         self.format.mBytesPerPacket = sizeof(cf.Float32) * channels
*/
  __pyx_v_self->format.mFormatID = kAudioFormatLinearPCM;

  /* "coremusic/capi.pyx":3178
 *         self.format.mSampleRate = sample_rate
 *         self.format.mFormatID = ca.kAudioFormatLinearPCM
 *         self.format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat             # <<<<<<<<<<<<<<
 *         self.format.mBytesPerPacket = sizeof(cf.Float32) * channels
 *         self.format.mFramesPerPacket = 1
*/
  __pyx_v_self->format.mFormatFlags = kLinearPCMFormatFlagIsFloat;

  /* "coremusic/capi.pyx":3179
 *         self.format.mFormatID = ca.kAudioFormatLinearPCM
 *         self.format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         self.format.mBytesPerPacket = sizeof(cf.Float32) * channels             # <<<<<<<<<<<<<<
 *         self.format.mFramesPerPacket = 1
 *         self.format.mBytesPerFrame = sizeof(cf.Float32) * channels
*/
  __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(Float32))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_3, __pyx_v_channels); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_t_4); if (unlikely((__pyx_t_1 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_self->format.mBytesPerPacket = __pyx_t_1;

  /* "coremusic/capi.pyx":3180
 *         self.format.mFormatFlags = ca.kLinearPCMFormatFlagIsFloat
 *         self.format.mBytesPerPacket = sizeof(cf.Float32) * channels
 *         self.format.mFramesPerPacket = 1             # <<<<<<<<<<<<<<
 *         self.format.mBytesPerFrame = sizeof(cf.Float32) * channels
 *         self.format.mChannelsPerFrame = channels
*/
  __pyx_v_self->format.mFramesPerPacket = 1;

  /* "coremusic/capi.pyx":3181
 *         self.format.mBytesPerPacket = sizeof(cf.Float32) * channels
 *         self.format.mFramesPerPacket = 1
 *         self.format.mBytesPerFrame = sizeof(cf.Float32) * channels             # <<<<<<<<<<<<<<
 *         self.format.mChannelsPerFrame = channels
 *         self.format.mBitsPerChannel = 32
*/
  __pyx_t_4 = __Pyx_PyLong_FromSize_t((sizeof(Float32))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_v_channels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_1 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->format.mBytesPerFrame = __pyx_t_1;

  /* "coremusic/capi.pyx":3182
 *         self.format.mFramesPerPacket = 1
 *         self.format.mBytesPerFrame = sizeof(cf.Float32) * channels
 *         self.format.mChannelsPerFrame = channels             # <<<<<<<<<<<<<<
 *         self.format.mBitsPerChannel = 32
 *         self.format.mReserved = 0
*/
  __pyx_t_1 = __Pyx_PyLong_As_UInt32(__pyx_v_channels); if (unlikely((__pyx_t_1 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3182, __pyx_L1_error)
  __pyx_v_self->format.mChannelsPerFrame = __pyx_t_1;

  /* "coremusic/capi.pyx":3183
 *         self.format.mBytesPerFrame = sizeof(cf.Float32) * channels
 *         self.format.mChannelsPerFrame = channels
 *         self.format.mBitsPerChannel = 32             # <<<<<<<<<<<<<<
 *         self.format.mReserved = 0
 * 
*/
  __pyx_v_self->format.mBitsPerChannel = 32;

  /* "coremusic/capi.pyx":3184
 *         self.format.mChannelsPerFrame = channels
 *         self.format.mBitsPerChannel = 32
 *         self.format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     def setup_input(self, float duration):
*/
  __pyx_v_self->format.mReserved = 0;

  /* "coremusic/capi.pyx":3159
 *     cdef str output_path
 * 
 *     def __init__(self, sample_rate=44100, channels=2):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioRecorder
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3186
 *         self.format.mReserved = 0
 * 
 *     def setup_input(self, float duration):             # <<<<<<<<<<<<<<
 *         """Setup the audio input queue for recording
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_3setup_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_2setup_input, "AudioRecorder.setup_input(self, float duration)\n\nSetup the audio input queue for recording\n\nArgs:\n    duration: Maximum recording duration in seconds");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_3setup_input = {"setup_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_3setup_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_2setup_input};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_3setup_input(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  float __pyx_v_duration;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setup_input (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_duration,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3186, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3186, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setup_input", 0) < (0)) __PYX_ERR(0, 3186, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setup_input", 1, 1, 1, i); __PYX_ERR(0, 3186, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3186, __pyx_L3_error)
    }
    __pyx_v_duration = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_duration == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3186, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setup_input", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3186, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.setup_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_2setup_input(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self), __pyx_v_duration);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_2setup_input(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, float __pyx_v_duration) {
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_buffer_size;
  int __pyx_v_i;
  size_t __pyx_v_total_bytes;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8[4];
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setup_input", 0);

  /* "coremusic/capi.pyx":3197
 * 
 *         # Calculate buffer sizes
 *         self.recorder_data.buffer_size_frames = <cf.UInt32>(duration * self.recorder_data.sample_rate)             # <<<<<<<<<<<<<<
 *         self.recorder_data.current_frame = 0
 *         self.recorder_data.recording = False
*/
  __pyx_v_self->recorder_data.buffer_size_frames = ((UInt32)(__pyx_v_duration * __pyx_v_self->recorder_data.sample_rate));

  /* "coremusic/capi.pyx":3198
 *         # Calculate buffer sizes
 *         self.recorder_data.buffer_size_frames = <cf.UInt32>(duration * self.recorder_data.sample_rate)
 *         self.recorder_data.current_frame = 0             # <<<<<<<<<<<<<<
 *         self.recorder_data.recording = False
 * 
*/
  __pyx_v_self->recorder_data.current_frame = 0;

  /* "coremusic/capi.pyx":3199
 *         self.recorder_data.buffer_size_frames = <cf.UInt32>(duration * self.recorder_data.sample_rate)
 *         self.recorder_data.current_frame = 0
 *         self.recorder_data.recording = False             # <<<<<<<<<<<<<<
 * 
 *         # Allocate main recording buffer
*/
  __pyx_v_self->recorder_data.recording = 0;

  /* "coremusic/capi.pyx":3202
 * 
 *         # Allocate main recording buffer
 *         cdef size_t total_bytes = <size_t>(self.recorder_data.buffer_size_frames * self.recorder_data.channels * sizeof(cf.Float32))             # <<<<<<<<<<<<<<
 *         self.recorder_data.buffer = <cf.Float32*>malloc(total_bytes)
 *         if self.recorder_data.buffer == NULL:
*/
  __pyx_v_total_bytes = ((size_t)((__pyx_v_self->recorder_data.buffer_size_frames * __pyx_v_self->recorder_data.channels) * (sizeof(Float32))));

  /* "coremusic/capi.pyx":3203
 *         # Allocate main recording buffer
 *         cdef size_t total_bytes = <size_t>(self.recorder_data.buffer_size_frames * self.recorder_data.channels * sizeof(cf.Float32))
 *         self.recorder_data.buffer = <cf.Float32*>malloc(total_bytes)             # <<<<<<<<<<<<<<
 *         if self.recorder_data.buffer == NULL:
 *             raise MemoryError("Could not allocate recording buffer")
*/
  __pyx_v_self->recorder_data.buffer = ((Float32 *)malloc(__pyx_v_total_bytes));

  /* "coremusic/capi.pyx":3204
 *         cdef size_t total_bytes = <size_t>(self.recorder_data.buffer_size_frames * self.recorder_data.channels * sizeof(cf.Float32))
 *         self.recorder_data.buffer = <cf.Float32*>malloc(total_bytes)
 *         if self.recorder_data.buffer == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("Could not allocate recording buffer")
 *         memset(self.recorder_data.buffer, 0, total_bytes)
*/
  __pyx_t_1 = (__pyx_v_self->recorder_data.buffer == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3205
 *         self.recorder_data.buffer = <cf.Float32*>malloc(total_bytes)
 *         if self.recorder_data.buffer == NULL:
 *             raise MemoryError("Could not allocate recording buffer")             # <<<<<<<<<<<<<<
 *         memset(self.recorder_data.buffer, 0, total_bytes)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_recording_buf};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3205, __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_ERR(0, 3205, __pyx_L1_error)

    /* "coremusic/capi.pyx":3204
 *         cdef size_t total_bytes = <size_t>(self.recorder_data.buffer_size_frames * self.recorder_data.channels * sizeof(cf.Float32))
 *         self.recorder_data.buffer = <cf.Float32*>malloc(total_bytes)
 *         if self.recorder_data.buffer == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("Could not allocate recording buffer")
 *         memset(self.recorder_data.buffer, 0, total_bytes)
*/
  }

  /* "coremusic/capi.pyx":3206
 *         if self.recorder_data.buffer == NULL:
 *             raise MemoryError("Could not allocate recording buffer")
 *         memset(self.recorder_data.buffer, 0, total_bytes)             # <<<<<<<<<<<<<<
 * 
 *         # Create audio queue for input
*/
  (void)(memset(__pyx_v_self->recorder_data.buffer, 0, __pyx_v_total_bytes));

  /* "coremusic/capi.pyx":3210
 *         # Create audio queue for input
 *         # IMPORTANT: Use current thread's run loop so callbacks work when we call run_loop()
 *         status = at.AudioQueueNewInput(             # <<<<<<<<<<<<<<
 *             &self.format,
 *             audio_recorder_input_callback,
*/
  __pyx_v_status = AudioQueueNewInput((&__pyx_v_self->format), __pyx_f_9coremusic_4capi_audio_recorder_input_callback, (&__pyx_v_self->recorder_data), CFRunLoopGetCurrent(), kCFRunLoopCommonModes, 0, (&__pyx_v_self->audio_queue));

  /* "coremusic/capi.pyx":3219
 *             &self.audio_queue
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3220
 *         )
 *         if status != 0:
 *             free(self.recorder_data.buffer)             # <<<<<<<<<<<<<<
 *             self.recorder_data.buffer = NULL
 *             raise RuntimeError(f"Could not create audio input queue: {status}")
*/
    free(__pyx_v_self->recorder_data.buffer);

    /* "coremusic/capi.pyx":3221
 *         if status != 0:
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not create audio input queue: {status}")
 * 
*/
    __pyx_v_self->recorder_data.buffer = NULL;

    /* "coremusic/capi.pyx":3222
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL
 *             raise RuntimeError(f"Could not create audio input queue: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Allocate and enqueue buffers
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_audio_input_que, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3222, __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_ERR(0, 3222, __pyx_L1_error)

    /* "coremusic/capi.pyx":3219
 *             &self.audio_queue
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL
*/
  }

  /* "coremusic/capi.pyx":3225
 * 
 *         # Allocate and enqueue buffers
 *         buffer_size = <cf.UInt32>(RECORD_BUFFER_DURATION_SECONDS * self.recorder_data.sample_rate *             # <<<<<<<<<<<<<<
 *                                    self.recorder_data.channels * sizeof(cf.Float32))
 * 
*/
  __pyx_v_buffer_size = ((UInt32)(((0.1 * __pyx_v_self->recorder_data.sample_rate) * __pyx_v_self->recorder_data.channels) * (sizeof(Float32))));

  /* "coremusic/capi.pyx":3228
 *                                    self.recorder_data.channels * sizeof(cf.Float32))
 * 
 *         for i in range(NUM_RECORD_BUFFERS):             # <<<<<<<<<<<<<<
 *             status = at.AudioQueueAllocateBuffer(self.audio_queue, buffer_size, &self.buffers[i])
 *             if status != 0:
*/
  for (__pyx_t_7 = 0; __pyx_t_7 < 3; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "coremusic/capi.pyx":3229
 * 
 *         for i in range(NUM_RECORD_BUFFERS):
 *             status = at.AudioQueueAllocateBuffer(self.audio_queue, buffer_size, &self.buffers[i])             # <<<<<<<<<<<<<<
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)
*/
    __pyx_v_status = AudioQueueAllocateBuffer(__pyx_v_self->audio_queue, __pyx_v_buffer_size, (&(__pyx_v_self->buffers[__pyx_v_i])));

    /* "coremusic/capi.pyx":3230
 *         for i in range(NUM_RECORD_BUFFERS):
 *             status = at.AudioQueueAllocateBuffer(self.audio_queue, buffer_size, &self.buffers[i])
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":3231
 *             status = at.AudioQueueAllocateBuffer(self.audio_queue, buffer_size, &self.buffers[i])
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)             # <<<<<<<<<<<<<<
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)
*/
      (void)(AudioQueueDispose(__pyx_v_self->audio_queue, 1));

      /* "coremusic/capi.pyx":3232
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL             # <<<<<<<<<<<<<<
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL
*/
      __pyx_v_self->audio_queue = NULL;

      /* "coremusic/capi.pyx":3233
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)             # <<<<<<<<<<<<<<
 *                 self.recorder_data.buffer = NULL
 *                 raise RuntimeError(f"Could not allocate audio buffer {i}: {status}")
*/
      free(__pyx_v_self->recorder_data.buffer);

      /* "coremusic/capi.pyx":3234
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not allocate audio buffer {i}: {status}")
 * 
*/
      __pyx_v_self->recorder_data.buffer = NULL;

      /* "coremusic/capi.pyx":3235
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL
 *                 raise RuntimeError(f"Could not allocate audio buffer {i}: {status}")             # <<<<<<<<<<<<<<
 * 
 *             status = at.AudioQueueEnqueueBuffer(self.audio_queue, self.buffers[i], 0, NULL)
*/
      __pyx_t_6 = NULL;
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_audio_buffer_2;
      __pyx_t_8[1] = __pyx_t_3;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_;
      __pyx_t_8[3] = __pyx_t_5;
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __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_ERR(0, 3235, __pyx_L1_error)

      /* "coremusic/capi.pyx":3230
 *         for i in range(NUM_RECORD_BUFFERS):
 *             status = at.AudioQueueAllocateBuffer(self.audio_queue, buffer_size, &self.buffers[i])
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
*/
    }

    /* "coremusic/capi.pyx":3237
 *                 raise RuntimeError(f"Could not allocate audio buffer {i}: {status}")
 * 
 *             status = at.AudioQueueEnqueueBuffer(self.audio_queue, self.buffers[i], 0, NULL)             # <<<<<<<<<<<<<<
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)
*/
    __pyx_v_status = AudioQueueEnqueueBuffer(__pyx_v_self->audio_queue, (__pyx_v_self->buffers[__pyx_v_i]), 0, NULL);

    /* "coremusic/capi.pyx":3238
 * 
 *             status = at.AudioQueueEnqueueBuffer(self.audio_queue, self.buffers[i], 0, NULL)
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":3239
 *             status = at.AudioQueueEnqueueBuffer(self.audio_queue, self.buffers[i], 0, NULL)
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)             # <<<<<<<<<<<<<<
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)
*/
      (void)(AudioQueueDispose(__pyx_v_self->audio_queue, 1));

      /* "coremusic/capi.pyx":3240
 *             if status != 0:
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL             # <<<<<<<<<<<<<<
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL
*/
      __pyx_v_self->audio_queue = NULL;

      /* "coremusic/capi.pyx":3241
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)             # <<<<<<<<<<<<<<
 *                 self.recorder_data.buffer = NULL
 *                 raise RuntimeError(f"Could not enqueue audio buffer {i}: {status}")
*/
      free(__pyx_v_self->recorder_data.buffer);

      /* "coremusic/capi.pyx":3242
 *                 self.audio_queue = NULL
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(f"Could not enqueue audio buffer {i}: {status}")
 * 
*/
      __pyx_v_self->recorder_data.buffer = NULL;

      /* "coremusic/capi.pyx":3243
 *                 free(self.recorder_data.buffer)
 *                 self.recorder_data.buffer = NULL
 *                 raise RuntimeError(f"Could not enqueue audio buffer {i}: {status}")             # <<<<<<<<<<<<<<
 * 
 *         self.initialized = True
*/
      __pyx_t_9 = NULL;
      __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Could_not_enqueue_audio_buffer;
      __pyx_t_8[1] = __pyx_t_6;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_;
      __pyx_t_8[3] = __pyx_t_5;
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3243, __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_ERR(0, 3243, __pyx_L1_error)

      /* "coremusic/capi.pyx":3238
 * 
 *             status = at.AudioQueueEnqueueBuffer(self.audio_queue, self.buffers[i], 0, NULL)
 *             if status != 0:             # <<<<<<<<<<<<<<
 *                 at.AudioQueueDispose(self.audio_queue, True)
 *                 self.audio_queue = NULL
*/
    }
  }

  /* "coremusic/capi.pyx":3245
 *                 raise RuntimeError(f"Could not enqueue audio buffer {i}: {status}")
 * 
 *         self.initialized = True             # <<<<<<<<<<<<<<
 *         return 0  # noErr
 * 
*/
  __pyx_v_self->initialized = 1;

  /* "coremusic/capi.pyx":3246
 * 
 *         self.initialized = True
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def start(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3186
 *         self.format.mReserved = 0
 * 
 *     def setup_input(self, float duration):             # <<<<<<<<<<<<<<
 *         """Setup the audio input queue for recording
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.setup_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3248
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio recording"""
 *         if not self.initialized:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_5start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_4start, "AudioRecorder.start(self)\n\nStart audio recording");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_5start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_4start};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_5start(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("start", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_4start(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_4start(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  /* "coremusic/capi.pyx":3250
 *     def start(self):
 *         """Start audio recording"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("AudioRecorder not initialized. Call setup_input() first.")
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->initialized);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3251
 *         """Start audio recording"""
 *         if not self.initialized:
 *             raise RuntimeError("AudioRecorder not initialized. Call setup_input() first.")             # <<<<<<<<<<<<<<
 * 
 *         self.recorder_data.recording = True
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_AudioRecorder_not_initialized_Ca};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __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_ERR(0, 3251, __pyx_L1_error)

    /* "coremusic/capi.pyx":3250
 *     def start(self):
 *         """Start audio recording"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("AudioRecorder not initialized. Call setup_input() first.")
 * 
*/
  }

  /* "coremusic/capi.pyx":3253
 *             raise RuntimeError("AudioRecorder not initialized. Call setup_input() first.")
 * 
 *         self.recorder_data.recording = True             # <<<<<<<<<<<<<<
 *         self.recorder_data.current_frame = 0
 * 
*/
  __pyx_v_self->recorder_data.recording = 1;

  /* "coremusic/capi.pyx":3254
 * 
 *         self.recorder_data.recording = True
 *         self.recorder_data.current_frame = 0             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStart(self.audio_queue, NULL)
*/
  __pyx_v_self->recorder_data.current_frame = 0;

  /* "coremusic/capi.pyx":3256
 *         self.recorder_data.current_frame = 0
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStart(self.audio_queue, NULL)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             self.recorder_data.recording = False
*/
  __pyx_v_status = AudioQueueStart(__pyx_v_self->audio_queue, NULL);

  /* "coremusic/capi.pyx":3257
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStart(self.audio_queue, NULL)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             self.recorder_data.recording = False
 *             raise RuntimeError(f"Could not start audio queue: {status}")
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3258
 *         cdef cf.OSStatus status = at.AudioQueueStart(self.audio_queue, NULL)
 *         if status != 0:
 *             self.recorder_data.recording = False             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not start audio queue: {status}")
 * 
*/
    __pyx_v_self->recorder_data.recording = 0;

    /* "coremusic/capi.pyx":3259
 *         if status != 0:
 *             self.recorder_data.recording = False
 *             raise RuntimeError(f"Could not start audio queue: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_start_audio_queue, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3259, __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_ERR(0, 3259, __pyx_L1_error)

    /* "coremusic/capi.pyx":3257
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStart(self.audio_queue, NULL)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             self.recorder_data.recording = False
 *             raise RuntimeError(f"Could not start audio queue: {status}")
*/
  }

  /* "coremusic/capi.pyx":3261
 *             raise RuntimeError(f"Could not start audio queue: {status}")
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def stop(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3248
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio recording"""
 *         if not self.initialized:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3263
 *         return 0  # noErr
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio recording"""
 *         if not self.initialized:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_7stop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_6stop, "AudioRecorder.stop(self)\n\nStop audio recording");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_7stop = {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_7stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_6stop};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_7stop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("stop", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("stop", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_6stop(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_6stop(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);

  /* "coremusic/capi.pyx":3265
 *     def stop(self):
 *         """Stop audio recording"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->initialized);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3266
 *         """Stop audio recording"""
 *         if not self.initialized:
 *             return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *         self.recorder_data.recording = False
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3265
 *     def stop(self):
 *         """Stop audio recording"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr
 * 
*/
  }

  /* "coremusic/capi.pyx":3268
 *             return 0  # noErr
 * 
 *         self.recorder_data.recording = False             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStop(self.audio_queue, True)
*/
  __pyx_v_self->recorder_data.recording = 0;

  /* "coremusic/capi.pyx":3270
 *         self.recorder_data.recording = False
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStop(self.audio_queue, True)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"Could not stop audio queue: {status}")
*/
  __pyx_v_status = AudioQueueStop(__pyx_v_self->audio_queue, 1);

  /* "coremusic/capi.pyx":3271
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStop(self.audio_queue, True)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not stop audio queue: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3272
 *         cdef cf.OSStatus status = at.AudioQueueStop(self.audio_queue, True)
 *         if status != 0:
 *             raise RuntimeError(f"Could not stop audio queue: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_stop_audio_queue, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3272, __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_ERR(0, 3272, __pyx_L1_error)

    /* "coremusic/capi.pyx":3271
 * 
 *         cdef cf.OSStatus status = at.AudioQueueStop(self.audio_queue, True)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not stop audio queue: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3274
 *             raise RuntimeError(f"Could not stop audio queue: {status}")
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def is_recording(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3263
 *         return 0  # noErr
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio recording"""
 *         if not self.initialized:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3276
 *         return 0  # noErr
 * 
 *     def is_recording(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently being recorded"""
 *         return bool(self.recorder_data.recording)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_9is_recording(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_8is_recording, "AudioRecorder.is_recording(self)\n\nCheck if audio is currently being recorded");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_9is_recording = {"is_recording", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_9is_recording, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_8is_recording};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_9is_recording(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_recording (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_recording", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_recording", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_8is_recording(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_8is_recording(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__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("is_recording", 0);

  /* "coremusic/capi.pyx":3278
 *     def is_recording(self):
 *         """Check if audio is currently being recorded"""
 *         return bool(self.recorder_data.recording)             # <<<<<<<<<<<<<<
 * 
 *     def get_progress(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(__pyx_v_self->recorder_data.recording != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3276
 *         return 0  # noErr
 * 
 *     def is_recording(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently being recorded"""
 *         return bool(self.recorder_data.recording)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.is_recording", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3280
 *         return bool(self.recorder_data.recording)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_11get_progress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_10get_progress, "AudioRecorder.get_progress(self)\n\nGet current recording progress as a float (0.0 to 1.0)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_11get_progress = {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_11get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_10get_progress};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_11get_progress(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_progress (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_progress", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_progress", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_10get_progress(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_10get_progress(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_progress", 0);

  /* "coremusic/capi.pyx":3282
 *     def get_progress(self):
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
*/
  __pyx_t_1 = (__pyx_v_self->recorder_data.buffer_size_frames == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3283
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:
 *             return 0.0             # <<<<<<<<<<<<<<
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_0);
    __pyx_r = __pyx_mstate_global->__pyx_float_0_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3282
 *     def get_progress(self):
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
*/
  }

  /* "coremusic/capi.pyx":3284
 *         if self.recorder_data.buffer_size_frames == 0:
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames             # <<<<<<<<<<<<<<
 * 
 *     def get_recorded_frames(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((float)__pyx_v_self->recorder_data.buffer_size_frames) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 3284, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble((((float)__pyx_v_self->recorder_data.current_frame) / ((float)__pyx_v_self->recorder_data.buffer_size_frames))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3280
 *         return bool(self.recorder_data.recording)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.get_progress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3286
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
 * 
 *     def get_recorded_frames(self):             # <<<<<<<<<<<<<<
 *         """Get the number of frames recorded so far"""
 *         return self.recorder_data.current_frame
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_13get_recorded_frames(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_12get_recorded_frames, "AudioRecorder.get_recorded_frames(self)\n\nGet the number of frames recorded so far");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_13get_recorded_frames = {"get_recorded_frames", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_13get_recorded_frames, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_12get_recorded_frames};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_13get_recorded_frames(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_recorded_frames (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_recorded_frames", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_recorded_frames", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_12get_recorded_frames(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_12get_recorded_frames(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__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_recorded_frames", 0);

  /* "coremusic/capi.pyx":3288
 *     def get_recorded_frames(self):
 *         """Get the number of frames recorded so far"""
 *         return self.recorder_data.current_frame             # <<<<<<<<<<<<<<
 * 
 *     def get_recorded_duration(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_self->recorder_data.current_frame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3286
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
 * 
 *     def get_recorded_frames(self):             # <<<<<<<<<<<<<<
 *         """Get the number of frames recorded so far"""
 *         return self.recorder_data.current_frame
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.get_recorded_frames", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3290
 *         return self.recorder_data.current_frame
 * 
 *     def get_recorded_duration(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_15get_recorded_duration(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_14get_recorded_duration, "AudioRecorder.get_recorded_duration(self)\n\nGet the recorded duration in seconds");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_15get_recorded_duration = {"get_recorded_duration", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_15get_recorded_duration, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_14get_recorded_duration};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_15get_recorded_duration(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_recorded_duration (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_recorded_duration", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_recorded_duration", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_14get_recorded_duration(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_14get_recorded_duration(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_recorded_duration", 0);

  /* "coremusic/capi.pyx":3292
 *     def get_recorded_duration(self):
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
*/
  __pyx_t_1 = (__pyx_v_self->recorder_data.sample_rate == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3293
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:
 *             return 0.0             # <<<<<<<<<<<<<<
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_0);
    __pyx_r = __pyx_mstate_global->__pyx_float_0_0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3292
 *     def get_recorded_duration(self):
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:             # <<<<<<<<<<<<<<
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
*/
  }

  /* "coremusic/capi.pyx":3294
 *         if self.recorder_data.sample_rate == 0:
 *             return 0.0
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate             # <<<<<<<<<<<<<<
 * 
 *     def run_loop(self, double seconds=0.1):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(((float)__pyx_v_self->recorder_data.sample_rate) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 3294, __pyx_L1_error)
  }
  __pyx_t_2 = PyFloat_FromDouble((((float)__pyx_v_self->recorder_data.current_frame) / ((float)__pyx_v_self->recorder_data.sample_rate))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3290
 *         return self.recorder_data.current_frame
 * 
 *     def get_recorded_duration(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.get_recorded_duration", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3296
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
 * 
 *     def run_loop(self, double seconds=0.1):             # <<<<<<<<<<<<<<
 *         """Run the CFRunLoop to process audio queue callbacks.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_17run_loop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_16run_loop, "AudioRecorder.run_loop(self, double seconds=0.1)\n\nRun the CFRunLoop to process audio queue callbacks.\n\nMust be called periodically while recording to receive audio data.\n\nArgs:\n    seconds: How long to run the loop (default 0.1 seconds)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_17run_loop = {"run_loop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_17run_loop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_16run_loop};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_17run_loop(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  double __pyx_v_seconds;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_loop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_seconds,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3296, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3296, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "run_loop", 0) < (0)) __PYX_ERR(0, 3296, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3296, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_seconds = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_seconds == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3296, __pyx_L3_error)
    } else {
      __pyx_v_seconds = ((double)0.1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run_loop", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3296, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.run_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_16run_loop(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self), __pyx_v_seconds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_16run_loop(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, double __pyx_v_seconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_loop", 0);

  /* "coremusic/capi.pyx":3304
 *             seconds: How long to run the loop (default 0.1 seconds)
 *         """
 *         cf.CFRunLoopRunInMode(cf.kCFRunLoopDefaultMode, seconds, False)             # <<<<<<<<<<<<<<
 * 
 *     def save_to_file(self, str file_path):
*/
  (void)(CFRunLoopRunInMode(kCFRunLoopDefaultMode, __pyx_v_seconds, 0));

  /* "coremusic/capi.pyx":3296
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
 * 
 *     def run_loop(self, double seconds=0.1):             # <<<<<<<<<<<<<<
 *         """Run the CFRunLoop to process audio queue callbacks.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3306
 *         cf.CFRunLoopRunInMode(cf.kCFRunLoopDefaultMode, seconds, False)
 * 
 *     def save_to_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Save the recorded audio to a WAV file
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_19save_to_file(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_18save_to_file, "AudioRecorder.save_to_file(self, str file_path)\n\nSave the recorded audio to a WAV file\n\nArgs:\n    file_path: Path to save the WAV file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_19save_to_file = {"save_to_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_19save_to_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_18save_to_file};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_19save_to_file(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("save_to_file (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3306, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3306, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "save_to_file", 0) < (0)) __PYX_ERR(0, 3306, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("save_to_file", 1, 1, 1, i); __PYX_ERR(0, 3306, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3306, __pyx_L3_error)
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("save_to_file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3306, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.save_to_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 3306, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_18save_to_file(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self), __pyx_v_file_path);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_18save_to_file(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, PyObject *__pyx_v_file_path) {
  PyObject *__pyx_v_path_bytes = 0;
  CFURLRef __pyx_v_url_ref;
  ExtAudioFileRef __pyx_v_ext_audio_file;
  OSStatus __pyx_v_status;
  UInt32 __pyx_v_num_frames;
  AudioStreamBasicDescription __pyx_v_file_format;
  AudioBufferList __pyx_v_buffer_list;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  UInt8 const *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  UInt32 __pyx_t_10;
  Float32 *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("save_to_file", 0);

  /* "coremusic/capi.pyx":3312
 *             file_path: Path to save the WAV file
 *         """
 *         cdef bytes path_bytes = file_path.encode('utf-8')             # <<<<<<<<<<<<<<
 *         cdef cf.CFURLRef url_ref
 *         cdef at.ExtAudioFileRef ext_audio_file
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 3312, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3320
 *         cdef ca.AudioBufferList buffer_list
 * 
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("No audio data to save")
 * 
*/
  __pyx_t_3 = (__pyx_v_self->recorder_data.buffer == NULL);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_self->recorder_data.current_frame == 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3321
 * 
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:
 *             raise RuntimeError("No audio data to save")             # <<<<<<<<<<<<<<
 * 
 *         # Create file URL
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_No_audio_data_to_save};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __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_ERR(0, 3321, __pyx_L1_error)

    /* "coremusic/capi.pyx":3320
 *         cdef ca.AudioBufferList buffer_list
 * 
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("No audio data to save")
 * 
*/
  }

  /* "coremusic/capi.pyx":3326
 *         url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,             # <<<<<<<<<<<<<<
 *             len(path_bytes),
 *             False
*/
  __pyx_t_6 = __Pyx_PyBytes_AsUString(__pyx_v_path_bytes); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 3326, __pyx_L1_error)

  /* "coremusic/capi.pyx":3327
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,
 *             len(path_bytes),             # <<<<<<<<<<<<<<
 *             False
 *         )
*/
  __pyx_t_7 = __Pyx_PyBytes_GET_SIZE(__pyx_v_path_bytes); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3327, __pyx_L1_error)

  /* "coremusic/capi.pyx":3324
 * 
 *         # Create file URL
 *         url_ref = cf.CFURLCreateFromFileSystemRepresentation(             # <<<<<<<<<<<<<<
 *             cf.kCFAllocatorDefault,
 *             <const cf.UInt8*>path_bytes,
*/
  __pyx_v_url_ref = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, ((UInt8 const *)__pyx_t_6), __pyx_t_7, 0);

  /* "coremusic/capi.pyx":3330
 *             False
 *         )
 *         if url_ref == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
*/
  __pyx_t_2 = (__pyx_v_url_ref == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3331
 *         )
 *         if url_ref == NULL:
 *             raise ValueError(f"Could not create URL for file: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *         # Define file format (16-bit integer PCM for WAV compatibility)
*/
    __pyx_t_4 = NULL;
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_for_file, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __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_ERR(0, 3331, __pyx_L1_error)

    /* "coremusic/capi.pyx":3330
 *             False
 *         )
 *         if url_ref == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3334
 * 
 *         # Define file format (16-bit integer PCM for WAV compatibility)
 *         file_format.mSampleRate = self.recorder_data.sample_rate             # <<<<<<<<<<<<<<
 *         file_format.mFormatID = ca.kAudioFormatLinearPCM
 *         file_format.mFormatFlags = ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked
*/
  __pyx_t_10 = __pyx_v_self->recorder_data.sample_rate;
  __pyx_v_file_format.mSampleRate = __pyx_t_10;

  /* "coremusic/capi.pyx":3335
 *         # Define file format (16-bit integer PCM for WAV compatibility)
 *         file_format.mSampleRate = self.recorder_data.sample_rate
 *         file_format.mFormatID = ca.kAudioFormatLinearPCM             # <<<<<<<<<<<<<<
 *         file_format.mFormatFlags = ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked
 *         file_format.mBytesPerPacket = 2 * self.recorder_data.channels  # 16-bit = 2 bytes
*/
  __pyx_v_file_format.mFormatID = kAudioFormatLinearPCM;

  /* "coremusic/capi.pyx":3336
 *         file_format.mSampleRate = self.recorder_data.sample_rate
 *         file_format.mFormatID = ca.kAudioFormatLinearPCM
 *         file_format.mFormatFlags = ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked             # <<<<<<<<<<<<<<
 *         file_format.mBytesPerPacket = 2 * self.recorder_data.channels  # 16-bit = 2 bytes
 *         file_format.mFramesPerPacket = 1
*/
  __pyx_v_file_format.mFormatFlags = (kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked);

  /* "coremusic/capi.pyx":3337
 *         file_format.mFormatID = ca.kAudioFormatLinearPCM
 *         file_format.mFormatFlags = ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked
 *         file_format.mBytesPerPacket = 2 * self.recorder_data.channels  # 16-bit = 2 bytes             # <<<<<<<<<<<<<<
 *         file_format.mFramesPerPacket = 1
 *         file_format.mBytesPerFrame = 2 * self.recorder_data.channels
*/
  __pyx_v_file_format.mBytesPerPacket = (2 * __pyx_v_self->recorder_data.channels);

  /* "coremusic/capi.pyx":3338
 *         file_format.mFormatFlags = ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked
 *         file_format.mBytesPerPacket = 2 * self.recorder_data.channels  # 16-bit = 2 bytes
 *         file_format.mFramesPerPacket = 1             # <<<<<<<<<<<<<<
 *         file_format.mBytesPerFrame = 2 * self.recorder_data.channels
 *         file_format.mChannelsPerFrame = self.recorder_data.channels
*/
  __pyx_v_file_format.mFramesPerPacket = 1;

  /* "coremusic/capi.pyx":3339
 *         file_format.mBytesPerPacket = 2 * self.recorder_data.channels  # 16-bit = 2 bytes
 *         file_format.mFramesPerPacket = 1
 *         file_format.mBytesPerFrame = 2 * self.recorder_data.channels             # <<<<<<<<<<<<<<
 *         file_format.mChannelsPerFrame = self.recorder_data.channels
 *         file_format.mBitsPerChannel = 16
*/
  __pyx_v_file_format.mBytesPerFrame = (2 * __pyx_v_self->recorder_data.channels);

  /* "coremusic/capi.pyx":3340
 *         file_format.mFramesPerPacket = 1
 *         file_format.mBytesPerFrame = 2 * self.recorder_data.channels
 *         file_format.mChannelsPerFrame = self.recorder_data.channels             # <<<<<<<<<<<<<<
 *         file_format.mBitsPerChannel = 16
 *         file_format.mReserved = 0
*/
  __pyx_t_10 = __pyx_v_self->recorder_data.channels;
  __pyx_v_file_format.mChannelsPerFrame = __pyx_t_10;

  /* "coremusic/capi.pyx":3341
 *         file_format.mBytesPerFrame = 2 * self.recorder_data.channels
 *         file_format.mChannelsPerFrame = self.recorder_data.channels
 *         file_format.mBitsPerChannel = 16             # <<<<<<<<<<<<<<
 *         file_format.mReserved = 0
 * 
*/
  __pyx_v_file_format.mBitsPerChannel = 16;

  /* "coremusic/capi.pyx":3342
 *         file_format.mChannelsPerFrame = self.recorder_data.channels
 *         file_format.mBitsPerChannel = 16
 *         file_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *         # Create ExtAudioFile (handles format conversion)
*/
  __pyx_v_file_format.mReserved = 0;

  /* "coremusic/capi.pyx":3345
 * 
 *         # Create ExtAudioFile (handles format conversion)
 *         status = at.ExtAudioFileCreateWithURL(             # <<<<<<<<<<<<<<
 *             url_ref,
 *             at.kAudioFileWAVEType,
*/
  __pyx_v_status = ExtAudioFileCreateWithURL(__pyx_v_url_ref, kAudioFileWAVEType, (&__pyx_v_file_format), NULL, kAudioFileFlags_EraseFile, (&__pyx_v_ext_audio_file));

  /* "coremusic/capi.pyx":3353
 *             &ext_audio_file
 *         )
 *         cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *         if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":3355
 *         cf.CFRelease(url_ref)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not create audio file: {status}")
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3356
 * 
 *         if status != 0:
 *             raise RuntimeError(f"Could not create audio file: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Set client format (float32, what we have in memory)
*/
    __pyx_t_9 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_audio_file, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3356, __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_ERR(0, 3356, __pyx_L1_error)

    /* "coremusic/capi.pyx":3355
 *         cf.CFRelease(url_ref)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not create audio file: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3359
 * 
 *         # Set client format (float32, what we have in memory)
 *         status = at.ExtAudioFileSetProperty(             # <<<<<<<<<<<<<<
 *             ext_audio_file,
 *             at.kExtAudioFileProperty_ClientDataFormat,
*/
  __pyx_v_status = ExtAudioFileSetProperty(__pyx_v_ext_audio_file, kExtAudioFileProperty_ClientDataFormat, (sizeof(__pyx_v_self->format)), (&__pyx_v_self->format));

  /* "coremusic/capi.pyx":3365
 *             &self.format
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             at.ExtAudioFileDispose(ext_audio_file)
 *             raise RuntimeError(f"Could not set client format: {status}")
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3366
 *         )
 *         if status != 0:
 *             at.ExtAudioFileDispose(ext_audio_file)             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not set client format: {status}")
 * 
*/
    (void)(ExtAudioFileDispose(__pyx_v_ext_audio_file));

    /* "coremusic/capi.pyx":3367
 *         if status != 0:
 *             at.ExtAudioFileDispose(ext_audio_file)
 *             raise RuntimeError(f"Could not set client format: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Prepare buffer list for writing
*/
    __pyx_t_8 = NULL;
    __pyx_t_9 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_set_client_format, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3367, __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_ERR(0, 3367, __pyx_L1_error)

    /* "coremusic/capi.pyx":3365
 *             &self.format
 *         )
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             at.ExtAudioFileDispose(ext_audio_file)
 *             raise RuntimeError(f"Could not set client format: {status}")
*/
  }

  /* "coremusic/capi.pyx":3370
 * 
 *         # Prepare buffer list for writing
 *         buffer_list.mNumberBuffers = 1             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mNumberChannels = self.recorder_data.channels
 *         buffer_list.mBuffers[0].mDataByteSize = self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32)
*/
  __pyx_v_buffer_list.mNumberBuffers = 1;

  /* "coremusic/capi.pyx":3371
 *         # Prepare buffer list for writing
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = self.recorder_data.channels             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mDataByteSize = self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32)
 *         buffer_list.mBuffers[0].mData = self.recorder_data.buffer
*/
  __pyx_t_10 = __pyx_v_self->recorder_data.channels;
  (__pyx_v_buffer_list.mBuffers[0]).mNumberChannels = __pyx_t_10;

  /* "coremusic/capi.pyx":3372
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = self.recorder_data.channels
 *         buffer_list.mBuffers[0].mDataByteSize = self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32)             # <<<<<<<<<<<<<<
 *         buffer_list.mBuffers[0].mData = self.recorder_data.buffer
 * 
*/
  (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize = ((__pyx_v_self->recorder_data.current_frame * __pyx_v_self->recorder_data.channels) * (sizeof(Float32)));

  /* "coremusic/capi.pyx":3373
 *         buffer_list.mBuffers[0].mNumberChannels = self.recorder_data.channels
 *         buffer_list.mBuffers[0].mDataByteSize = self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32)
 *         buffer_list.mBuffers[0].mData = self.recorder_data.buffer             # <<<<<<<<<<<<<<
 * 
 *         # Write audio data (ExtAudioFile converts float32 to int16)
*/
  __pyx_t_11 = __pyx_v_self->recorder_data.buffer;
  (__pyx_v_buffer_list.mBuffers[0]).mData = __pyx_t_11;

  /* "coremusic/capi.pyx":3376
 * 
 *         # Write audio data (ExtAudioFile converts float32 to int16)
 *         num_frames = self.recorder_data.current_frame             # <<<<<<<<<<<<<<
 *         status = at.ExtAudioFileWrite(ext_audio_file, num_frames, &buffer_list)
 * 
*/
  __pyx_t_10 = __pyx_v_self->recorder_data.current_frame;
  __pyx_v_num_frames = __pyx_t_10;

  /* "coremusic/capi.pyx":3377
 *         # Write audio data (ExtAudioFile converts float32 to int16)
 *         num_frames = self.recorder_data.current_frame
 *         status = at.ExtAudioFileWrite(ext_audio_file, num_frames, &buffer_list)             # <<<<<<<<<<<<<<
 * 
 *         at.ExtAudioFileDispose(ext_audio_file)
*/
  __pyx_v_status = ExtAudioFileWrite(__pyx_v_ext_audio_file, __pyx_v_num_frames, (&__pyx_v_buffer_list));

  /* "coremusic/capi.pyx":3379
 *         status = at.ExtAudioFileWrite(ext_audio_file, num_frames, &buffer_list)
 * 
 *         at.ExtAudioFileDispose(ext_audio_file)             # <<<<<<<<<<<<<<
 * 
 *         if status != 0:
*/
  (void)(ExtAudioFileDispose(__pyx_v_ext_audio_file));

  /* "coremusic/capi.pyx":3381
 *         at.ExtAudioFileDispose(ext_audio_file)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not write audio data: {status}")
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3382
 * 
 *         if status != 0:
 *             raise RuntimeError(f"Could not write audio data: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return 0  # noErr
*/
    __pyx_t_4 = NULL;
    __pyx_t_8 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_write_audio_data, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3382, __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_ERR(0, 3382, __pyx_L1_error)

    /* "coremusic/capi.pyx":3381
 *         at.ExtAudioFileDispose(ext_audio_file)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Could not write audio data: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3384
 *             raise RuntimeError(f"Could not write audio data: {status}")
 * 
 *         return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 *     def get_audio_data(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_r = __pyx_mstate_global->__pyx_int_0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3306
 *         cf.CFRunLoopRunInMode(cf.kCFRunLoopDefaultMode, seconds, False)
 * 
 *     def save_to_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Save the recorded audio to a WAV file
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.save_to_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3386
 *         return 0  # noErr
 * 
 *     def get_audio_data(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded audio data as a Python bytes object
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_21get_audio_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_20get_audio_data, "AudioRecorder.get_audio_data(self)\n\nGet the recorded audio data as a Python bytes object\n\nReturns:\n    bytes: Raw audio data (interleaved float32 samples)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_21get_audio_data = {"get_audio_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_21get_audio_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_20get_audio_data};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_21get_audio_data(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_audio_data", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_audio_data", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_20get_audio_data(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_20get_audio_data(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  size_t __pyx_v_num_bytes;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_audio_data", 0);

  /* "coremusic/capi.pyx":3392
 *             bytes: Raw audio data (interleaved float32 samples)
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             return b''
 * 
*/
  __pyx_t_2 = (__pyx_v_self->recorder_data.buffer == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->recorder_data.current_frame == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3393
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:
 *             return b''             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t num_bytes = <size_t>(self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__7);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b__7;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3392
 *             bytes: Raw audio data (interleaved float32 samples)
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":3395
 *             return b''
 * 
 *         cdef size_t num_bytes = <size_t>(self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32))             # <<<<<<<<<<<<<<
 *         # Use PyBytes_FromStringAndSize to avoid null-termination issues with binary data
 *         return (<char*>self.recorder_data.buffer)[:num_bytes]
*/
  __pyx_v_num_bytes = ((size_t)((__pyx_v_self->recorder_data.current_frame * __pyx_v_self->recorder_data.channels) * (sizeof(Float32))));

  /* "coremusic/capi.pyx":3397
 *         cdef size_t num_bytes = <size_t>(self.recorder_data.current_frame * self.recorder_data.channels * sizeof(cf.Float32))
 *         # Use PyBytes_FromStringAndSize to avoid null-termination issues with binary data
 *         return (<char*>self.recorder_data.buffer)[:num_bytes]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char *)__pyx_v_self->recorder_data.buffer) + 0, __pyx_v_num_bytes - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3386
 *         return 0  # noErr
 * 
 *     def get_audio_data(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded audio data as a Python bytes object
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.get_audio_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3399
 *         return (<char*>self.recorder_data.buffer)[:num_bytes]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sample_rate(self):
 *         """Get the sample rate"""
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_11sample_rate_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_11sample_rate_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_11sample_rate___get__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_11sample_rate___get__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__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);

  /* "coremusic/capi.pyx":3402
 *     def sample_rate(self):
 *         """Get the sample rate"""
 *         return self.recorder_data.sample_rate             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_self->recorder_data.sample_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3399
 *         return (<char*>self.recorder_data.buffer)[:num_bytes]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def sample_rate(self):
 *         """Get the sample rate"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.sample_rate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3404
 *         return self.recorder_data.sample_rate
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def channels(self):
 *         """Get the number of channels"""
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_8channels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_8channels_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_8channels___get__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_8channels___get__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__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);

  /* "coremusic/capi.pyx":3407
 *     def channels(self):
 *         """Get the number of channels"""
 *         return self.recorder_data.channels             # <<<<<<<<<<<<<<
 * 
 *     def has_audio_content(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_self->recorder_data.channels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3404
 *         return self.recorder_data.sample_rate
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def channels(self):
 *         """Get the number of channels"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.channels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3409
 *         return self.recorder_data.channels
 * 
 *     def has_audio_content(self):             # <<<<<<<<<<<<<<
 *         """Check if the recording contains actual audio (non-silent).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_23has_audio_content(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_22has_audio_content, "AudioRecorder.has_audio_content(self)\n\nCheck if the recording contains actual audio (non-silent).\n\nReturns True if non-zero samples were detected, False if silent.\nSilent recordings typically indicate microphone permission issues.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_23has_audio_content = {"has_audio_content", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_23has_audio_content, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_22has_audio_content};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_23has_audio_content(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_audio_content (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("has_audio_content", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("has_audio_content", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_22has_audio_content(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_22has_audio_content(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  UInt32 __pyx_v_total_samples;
  UInt32 __pyx_v_i;
  Float32 __pyx_v_sample;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  UInt32 __pyx_t_3;
  UInt32 __pyx_t_4;
  UInt32 __pyx_t_5;
  __Pyx_RefNannySetupContext("has_audio_content", 0);

  /* "coremusic/capi.pyx":3415
 *         Silent recordings typically indicate microphone permission issues.
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_2 = (__pyx_v_self->recorder_data.buffer == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->recorder_data.current_frame == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3416
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.UInt32 total_samples = self.recorder_data.current_frame * self.recorder_data.channels
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":3415
 *         Silent recordings typically indicate microphone permission issues.
 *         """
 *         if self.recorder_data.buffer == NULL or self.recorder_data.current_frame == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "coremusic/capi.pyx":3418
 *             return False
 * 
 *         cdef cf.UInt32 total_samples = self.recorder_data.current_frame * self.recorder_data.channels             # <<<<<<<<<<<<<<
 *         cdef cf.UInt32 i
 *         cdef cf.Float32 sample
*/
  __pyx_v_total_samples = (__pyx_v_self->recorder_data.current_frame * __pyx_v_self->recorder_data.channels);

  /* "coremusic/capi.pyx":3423
 * 
 *         # Check a subset of samples for efficiency (every 100th sample)
 *         for i in range(0, total_samples, 100):             # <<<<<<<<<<<<<<
 *             sample = self.recorder_data.buffer[i]
 *             if sample != 0.0:
*/
  __pyx_t_3 = __pyx_v_total_samples;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=0x64) {
    __pyx_v_i = __pyx_t_5;

    /* "coremusic/capi.pyx":3424
 *         # Check a subset of samples for efficiency (every 100th sample)
 *         for i in range(0, total_samples, 100):
 *             sample = self.recorder_data.buffer[i]             # <<<<<<<<<<<<<<
 *             if sample != 0.0:
 *                 return True
*/
    __pyx_v_sample = (__pyx_v_self->recorder_data.buffer[__pyx_v_i]);

    /* "coremusic/capi.pyx":3425
 *         for i in range(0, total_samples, 100):
 *             sample = self.recorder_data.buffer[i]
 *             if sample != 0.0:             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
    __pyx_t_1 = (__pyx_v_sample != 0.0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":3426
 *             sample = self.recorder_data.buffer[i]
 *             if sample != 0.0:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "coremusic/capi.pyx":3425
 *         for i in range(0, total_samples, 100):
 *             sample = self.recorder_data.buffer[i]
 *             if sample != 0.0:             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
    }
  }

  /* "coremusic/capi.pyx":3428
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3409
 *         return self.recorder_data.channels
 * 
 *     def has_audio_content(self):             # <<<<<<<<<<<<<<
 *         """Check if the recording contains actual audio (non-silent).
 * 
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3430
 *         return False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.audio_queue != NULL:
*/

/* Python wrapper */
static void __pyx_pw_9coremusic_4capi_13AudioRecorder_25__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9coremusic_4capi_13AudioRecorder_25__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_9coremusic_4capi_13AudioRecorder_24__dealloc__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_9coremusic_4capi_13AudioRecorder_24__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  int __pyx_t_1;

  /* "coremusic/capi.pyx":3432
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.audio_queue != NULL:             # <<<<<<<<<<<<<<
 *             at.AudioQueueStop(self.audio_queue, True)
 *             at.AudioQueueDispose(self.audio_queue, True)
*/
  __pyx_t_1 = (__pyx_v_self->audio_queue != NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3433
 *         """Clean up resources when the object is destroyed"""
 *         if self.audio_queue != NULL:
 *             at.AudioQueueStop(self.audio_queue, True)             # <<<<<<<<<<<<<<
 *             at.AudioQueueDispose(self.audio_queue, True)
 *             self.audio_queue = NULL
*/
    (void)(AudioQueueStop(__pyx_v_self->audio_queue, 1));

    /* "coremusic/capi.pyx":3434
 *         if self.audio_queue != NULL:
 *             at.AudioQueueStop(self.audio_queue, True)
 *             at.AudioQueueDispose(self.audio_queue, True)             # <<<<<<<<<<<<<<
 *             self.audio_queue = NULL
 * 
*/
    (void)(AudioQueueDispose(__pyx_v_self->audio_queue, 1));

    /* "coremusic/capi.pyx":3435
 *             at.AudioQueueStop(self.audio_queue, True)
 *             at.AudioQueueDispose(self.audio_queue, True)
 *             self.audio_queue = NULL             # <<<<<<<<<<<<<<
 * 
 *         if self.recorder_data.buffer != NULL:
*/
    __pyx_v_self->audio_queue = NULL;

    /* "coremusic/capi.pyx":3432
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.audio_queue != NULL:             # <<<<<<<<<<<<<<
 *             at.AudioQueueStop(self.audio_queue, True)
 *             at.AudioQueueDispose(self.audio_queue, True)
*/
  }

  /* "coremusic/capi.pyx":3437
 *             self.audio_queue = NULL
 * 
 *         if self.recorder_data.buffer != NULL:             # <<<<<<<<<<<<<<
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL
*/
  __pyx_t_1 = (__pyx_v_self->recorder_data.buffer != NULL);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3438
 * 
 *         if self.recorder_data.buffer != NULL:
 *             free(self.recorder_data.buffer)             # <<<<<<<<<<<<<<
 *             self.recorder_data.buffer = NULL
 * 
*/
    free(__pyx_v_self->recorder_data.buffer);

    /* "coremusic/capi.pyx":3439
 *         if self.recorder_data.buffer != NULL:
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_self->recorder_data.buffer = NULL;

    /* "coremusic/capi.pyx":3437
 *             self.audio_queue = NULL
 * 
 *         if self.recorder_data.buffer != NULL:             # <<<<<<<<<<<<<<
 *             free(self.recorder_data.buffer)
 *             self.recorder_data.buffer = NULL
*/
  }

  /* "coremusic/capi.pyx":3430
 *         return False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.audio_queue != NULL:
*/

  /* function exit code */
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_27__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_26__reduce_cython__, "AudioRecorder.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_27__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_26__reduce_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_27__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_26__reduce_cython__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_26__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_audio_queue_self_buffers_se, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_29__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_13AudioRecorder_28__setstate_cython__, "AudioRecorder.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_13AudioRecorder_29__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_28__setstate_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_13AudioRecorder_29__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_13AudioRecorder_28__setstate_cython__(((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_13AudioRecorder_28__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioRecorder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_audio_queue_self_buffers_se, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.AudioRecorder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3443
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     """Get the ready to produce packets for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_247get_audio_file_stream_property_ready_to_produce_packets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_246get_audio_file_stream_property_ready_to_produce_packets, "get_audio_file_stream_property_ready_to_produce_packets()\n\nGet the ready to produce packets for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_247get_audio_file_stream_property_ready_to_produce_packets = {"get_audio_file_stream_property_ready_to_produce_packets", (PyCFunction)__pyx_pw_9coremusic_4capi_247get_audio_file_stream_property_ready_to_produce_packets, METH_NOARGS, __pyx_doc_9coremusic_4capi_246get_audio_file_stream_property_ready_to_produce_packets};
static PyObject *__pyx_pw_9coremusic_4capi_247get_audio_file_stream_property_ready_to_produce_packets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_ready_to_produce_packets (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_246get_audio_file_stream_property_ready_to_produce_packets(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_246get_audio_file_stream_property_ready_to_produce_packets(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_ready_to_produce_packets", 0);

  /* "coremusic/capi.pyx":3445
 * def get_audio_file_stream_property_ready_to_produce_packets():
 *     """Get the ready to produce packets for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_file_format():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_ReadyToProducePackets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3443
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     """Get the ready to produce packets for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_ready_to_produce_packets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3447
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     """Get the file format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FileFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_249get_audio_file_stream_property_file_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_248get_audio_file_stream_property_file_format, "get_audio_file_stream_property_file_format()\n\nGet the file format for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_249get_audio_file_stream_property_file_format = {"get_audio_file_stream_property_file_format", (PyCFunction)__pyx_pw_9coremusic_4capi_249get_audio_file_stream_property_file_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_248get_audio_file_stream_property_file_format};
static PyObject *__pyx_pw_9coremusic_4capi_249get_audio_file_stream_property_file_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_file_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_248get_audio_file_stream_property_file_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_248get_audio_file_stream_property_file_format(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_file_format", 0);

  /* "coremusic/capi.pyx":3449
 * def get_audio_file_stream_property_file_format():
 *     """Get the file format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FileFormat             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_data_format():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_FileFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3447
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     """Get the file format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FileFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_file_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3451
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_251get_audio_file_stream_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_250get_audio_file_stream_property_data_format, "get_audio_file_stream_property_data_format()\n\nGet the data format for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_251get_audio_file_stream_property_data_format = {"get_audio_file_stream_property_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_251get_audio_file_stream_property_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_250get_audio_file_stream_property_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_251get_audio_file_stream_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_data_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_250get_audio_file_stream_property_data_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_250get_audio_file_stream_property_data_format(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_data_format", 0);

  /* "coremusic/capi.pyx":3453
 * def get_audio_file_stream_property_data_format():
 *     """Get the data format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataFormat             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_format_list():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_DataFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3451
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_data_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3455
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     """Get the format list for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FormatList
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_253get_audio_file_stream_property_format_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_252get_audio_file_stream_property_format_list, "get_audio_file_stream_property_format_list()\n\nGet the format list for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_253get_audio_file_stream_property_format_list = {"get_audio_file_stream_property_format_list", (PyCFunction)__pyx_pw_9coremusic_4capi_253get_audio_file_stream_property_format_list, METH_NOARGS, __pyx_doc_9coremusic_4capi_252get_audio_file_stream_property_format_list};
static PyObject *__pyx_pw_9coremusic_4capi_253get_audio_file_stream_property_format_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_format_list (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_252get_audio_file_stream_property_format_list(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_252get_audio_file_stream_property_format_list(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_format_list", 0);

  /* "coremusic/capi.pyx":3457
 * def get_audio_file_stream_property_format_list():
 *     """Get the format list for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FormatList             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_magic_cookie_data():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_FormatList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3455
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     """Get the format list for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FormatList
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_format_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3459
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     """Get the magic cookie data for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MagicCookieData
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_255get_audio_file_stream_property_magic_cookie_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_254get_audio_file_stream_property_magic_cookie_data, "get_audio_file_stream_property_magic_cookie_data()\n\nGet the magic cookie data for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_255get_audio_file_stream_property_magic_cookie_data = {"get_audio_file_stream_property_magic_cookie_data", (PyCFunction)__pyx_pw_9coremusic_4capi_255get_audio_file_stream_property_magic_cookie_data, METH_NOARGS, __pyx_doc_9coremusic_4capi_254get_audio_file_stream_property_magic_cookie_data};
static PyObject *__pyx_pw_9coremusic_4capi_255get_audio_file_stream_property_magic_cookie_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_magic_cookie_data (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_254get_audio_file_stream_property_magic_cookie_data(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_254get_audio_file_stream_property_magic_cookie_data(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_magic_cookie_data", 0);

  /* "coremusic/capi.pyx":3461
 * def get_audio_file_stream_property_magic_cookie_data():
 *     """Get the magic cookie data for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MagicCookieData             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_MagicCookieData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3459
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     """Get the magic cookie data for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MagicCookieData
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_magic_cookie_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3463
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data byte count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_257get_audio_file_stream_property_audio_data_byte_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_256get_audio_file_stream_property_audio_data_byte_count, "get_audio_file_stream_property_audio_data_byte_count()\n\nGet the audio data byte count for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_257get_audio_file_stream_property_audio_data_byte_count = {"get_audio_file_stream_property_audio_data_byte_count", (PyCFunction)__pyx_pw_9coremusic_4capi_257get_audio_file_stream_property_audio_data_byte_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_256get_audio_file_stream_property_audio_data_byte_count};
static PyObject *__pyx_pw_9coremusic_4capi_257get_audio_file_stream_property_audio_data_byte_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_audio_data_byte_count (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_256get_audio_file_stream_property_audio_data_byte_count(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_256get_audio_file_stream_property_audio_data_byte_count(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_audio_data_byte_count", 0);

  /* "coremusic/capi.pyx":3465
 * def get_audio_file_stream_property_audio_data_byte_count():
 *     """Get the audio data byte count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataByteCount             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_AudioDataByteCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3463
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data byte count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_audio_data_byte_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3467
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_259get_audio_file_stream_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_258get_audio_file_stream_property_audio_data_packet_count, "get_audio_file_stream_property_audio_data_packet_count()\n\nGet the audio data packet count for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_259get_audio_file_stream_property_audio_data_packet_count = {"get_audio_file_stream_property_audio_data_packet_count", (PyCFunction)__pyx_pw_9coremusic_4capi_259get_audio_file_stream_property_audio_data_packet_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_258get_audio_file_stream_property_audio_data_packet_count};
static PyObject *__pyx_pw_9coremusic_4capi_259get_audio_file_stream_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_audio_data_packet_count (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_258get_audio_file_stream_property_audio_data_packet_count(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_258get_audio_file_stream_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_audio_data_packet_count", 0);

  /* "coremusic/capi.pyx":3469
 * def get_audio_file_stream_property_audio_data_packet_count():
 *     """Get the audio data packet count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_maximum_packet_size():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_AudioDataPacketCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3467
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_audio_data_packet_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3471
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_261get_audio_file_stream_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_260get_audio_file_stream_property_maximum_packet_size, "get_audio_file_stream_property_maximum_packet_size()\n\nGet the maximum packet size for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_261get_audio_file_stream_property_maximum_packet_size = {"get_audio_file_stream_property_maximum_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_261get_audio_file_stream_property_maximum_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_260get_audio_file_stream_property_maximum_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_261get_audio_file_stream_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_maximum_packet_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_260get_audio_file_stream_property_maximum_packet_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_260get_audio_file_stream_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_maximum_packet_size", 0);

  /* "coremusic/capi.pyx":3473
 * def get_audio_file_stream_property_maximum_packet_size():
 *     """Get the maximum packet size for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MaximumPacketSize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_data_offset():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_MaximumPacketSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3471
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_maximum_packet_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3475
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     """Get the data offset for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataOffset
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_263get_audio_file_stream_property_data_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_262get_audio_file_stream_property_data_offset, "get_audio_file_stream_property_data_offset()\n\nGet the data offset for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_263get_audio_file_stream_property_data_offset = {"get_audio_file_stream_property_data_offset", (PyCFunction)__pyx_pw_9coremusic_4capi_263get_audio_file_stream_property_data_offset, METH_NOARGS, __pyx_doc_9coremusic_4capi_262get_audio_file_stream_property_data_offset};
static PyObject *__pyx_pw_9coremusic_4capi_263get_audio_file_stream_property_data_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_data_offset (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_262get_audio_file_stream_property_data_offset(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_262get_audio_file_stream_property_data_offset(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_data_offset", 0);

  /* "coremusic/capi.pyx":3477
 * def get_audio_file_stream_property_data_offset():
 *     """Get the data offset for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataOffset             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_channel_layout():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_DataOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3475
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     """Get the data offset for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataOffset
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_data_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3479
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     """Get the channel layout for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ChannelLayout
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_265get_audio_file_stream_property_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_264get_audio_file_stream_property_channel_layout, "get_audio_file_stream_property_channel_layout()\n\nGet the channel layout for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_265get_audio_file_stream_property_channel_layout = {"get_audio_file_stream_property_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_265get_audio_file_stream_property_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_264get_audio_file_stream_property_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_265get_audio_file_stream_property_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_channel_layout (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_264get_audio_file_stream_property_channel_layout(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_264get_audio_file_stream_property_channel_layout(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_channel_layout", 0);

  /* "coremusic/capi.pyx":3481
 * def get_audio_file_stream_property_channel_layout():
 *     """Get the channel layout for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ChannelLayout             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_packet_to_frame():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_ChannelLayout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3479
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     """Get the channel layout for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ChannelLayout
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_channel_layout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3483
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     """Get the packet to frame for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToFrame
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_267get_audio_file_stream_property_packet_to_frame(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_266get_audio_file_stream_property_packet_to_frame, "get_audio_file_stream_property_packet_to_frame()\n\nGet the packet to frame for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_267get_audio_file_stream_property_packet_to_frame = {"get_audio_file_stream_property_packet_to_frame", (PyCFunction)__pyx_pw_9coremusic_4capi_267get_audio_file_stream_property_packet_to_frame, METH_NOARGS, __pyx_doc_9coremusic_4capi_266get_audio_file_stream_property_packet_to_frame};
static PyObject *__pyx_pw_9coremusic_4capi_267get_audio_file_stream_property_packet_to_frame(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_packet_to_frame (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_266get_audio_file_stream_property_packet_to_frame(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_266get_audio_file_stream_property_packet_to_frame(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_packet_to_frame", 0);

  /* "coremusic/capi.pyx":3485
 * def get_audio_file_stream_property_packet_to_frame():
 *     """Get the packet to frame for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToFrame             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_frame_to_packet():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_PacketToFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3483
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     """Get the packet to frame for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToFrame
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_packet_to_frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3487
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the frame to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FrameToPacket
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_269get_audio_file_stream_property_frame_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_268get_audio_file_stream_property_frame_to_packet, "get_audio_file_stream_property_frame_to_packet()\n\nGet the frame to packet for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_269get_audio_file_stream_property_frame_to_packet = {"get_audio_file_stream_property_frame_to_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_269get_audio_file_stream_property_frame_to_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_268get_audio_file_stream_property_frame_to_packet};
static PyObject *__pyx_pw_9coremusic_4capi_269get_audio_file_stream_property_frame_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_frame_to_packet (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_268get_audio_file_stream_property_frame_to_packet(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_268get_audio_file_stream_property_frame_to_packet(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_frame_to_packet", 0);

  /* "coremusic/capi.pyx":3489
 * def get_audio_file_stream_property_frame_to_packet():
 *     """Get the frame to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FrameToPacket             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_packet_to_byte():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_FrameToPacket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3487
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the frame to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FrameToPacket
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_frame_to_packet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3491
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     """Get the packet to byte for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToByte
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_271get_audio_file_stream_property_packet_to_byte(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_270get_audio_file_stream_property_packet_to_byte, "get_audio_file_stream_property_packet_to_byte()\n\nGet the packet to byte for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_271get_audio_file_stream_property_packet_to_byte = {"get_audio_file_stream_property_packet_to_byte", (PyCFunction)__pyx_pw_9coremusic_4capi_271get_audio_file_stream_property_packet_to_byte, METH_NOARGS, __pyx_doc_9coremusic_4capi_270get_audio_file_stream_property_packet_to_byte};
static PyObject *__pyx_pw_9coremusic_4capi_271get_audio_file_stream_property_packet_to_byte(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_packet_to_byte (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_270get_audio_file_stream_property_packet_to_byte(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_270get_audio_file_stream_property_packet_to_byte(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_packet_to_byte", 0);

  /* "coremusic/capi.pyx":3493
 * def get_audio_file_stream_property_packet_to_byte():
 *     """Get the packet to byte for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToByte             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_byte_to_packet():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_PacketToByte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3491
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     """Get the packet to byte for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToByte
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_packet_to_byte", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3495
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the byte to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ByteToPacket
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_273get_audio_file_stream_property_byte_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_272get_audio_file_stream_property_byte_to_packet, "get_audio_file_stream_property_byte_to_packet()\n\nGet the byte to packet for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_273get_audio_file_stream_property_byte_to_packet = {"get_audio_file_stream_property_byte_to_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_273get_audio_file_stream_property_byte_to_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_272get_audio_file_stream_property_byte_to_packet};
static PyObject *__pyx_pw_9coremusic_4capi_273get_audio_file_stream_property_byte_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_byte_to_packet (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_272get_audio_file_stream_property_byte_to_packet(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_272get_audio_file_stream_property_byte_to_packet(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_byte_to_packet", 0);

  /* "coremusic/capi.pyx":3497
 * def get_audio_file_stream_property_byte_to_packet():
 *     """Get the byte to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ByteToPacket             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_packet_table_info():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_ByteToPacket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3495
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the byte to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ByteToPacket
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_byte_to_packet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3499
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     """Get the packet table info for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketTableInfo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_275get_audio_file_stream_property_packet_table_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_274get_audio_file_stream_property_packet_table_info, "get_audio_file_stream_property_packet_table_info()\n\nGet the packet table info for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_275get_audio_file_stream_property_packet_table_info = {"get_audio_file_stream_property_packet_table_info", (PyCFunction)__pyx_pw_9coremusic_4capi_275get_audio_file_stream_property_packet_table_info, METH_NOARGS, __pyx_doc_9coremusic_4capi_274get_audio_file_stream_property_packet_table_info};
static PyObject *__pyx_pw_9coremusic_4capi_275get_audio_file_stream_property_packet_table_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_packet_table_info (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_274get_audio_file_stream_property_packet_table_info(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_274get_audio_file_stream_property_packet_table_info(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_packet_table_info", 0);

  /* "coremusic/capi.pyx":3501
 * def get_audio_file_stream_property_packet_table_info():
 *     """Get the packet table info for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketTableInfo             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_PacketTableInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3499
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     """Get the packet table info for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketTableInfo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_packet_table_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3503
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     """Get the packet size upper bound for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_277get_audio_file_stream_property_packet_size_upper_bound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_276get_audio_file_stream_property_packet_size_upper_bound, "get_audio_file_stream_property_packet_size_upper_bound()\n\nGet the packet size upper bound for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_277get_audio_file_stream_property_packet_size_upper_bound = {"get_audio_file_stream_property_packet_size_upper_bound", (PyCFunction)__pyx_pw_9coremusic_4capi_277get_audio_file_stream_property_packet_size_upper_bound, METH_NOARGS, __pyx_doc_9coremusic_4capi_276get_audio_file_stream_property_packet_size_upper_bound};
static PyObject *__pyx_pw_9coremusic_4capi_277get_audio_file_stream_property_packet_size_upper_bound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_packet_size_upper_bound (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_276get_audio_file_stream_property_packet_size_upper_bound(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_276get_audio_file_stream_property_packet_size_upper_bound(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_packet_size_upper_bound", 0);

  /* "coremusic/capi.pyx":3505
 * def get_audio_file_stream_property_packet_size_upper_bound():
 *     """Get the packet size upper bound for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_PacketSizeUpperBound); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3503
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     """Get the packet size upper bound for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_packet_size_upper_bound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3507
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     """Get the average bytes per packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_279get_audio_file_stream_property_average_bytes_per_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_278get_audio_file_stream_property_average_bytes_per_packet, "get_audio_file_stream_property_average_bytes_per_packet()\n\nGet the average bytes per packet for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_279get_audio_file_stream_property_average_bytes_per_packet = {"get_audio_file_stream_property_average_bytes_per_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_279get_audio_file_stream_property_average_bytes_per_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_278get_audio_file_stream_property_average_bytes_per_packet};
static PyObject *__pyx_pw_9coremusic_4capi_279get_audio_file_stream_property_average_bytes_per_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_average_bytes_per_packet (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_278get_audio_file_stream_property_average_bytes_per_packet(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_278get_audio_file_stream_property_average_bytes_per_packet(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_average_bytes_per_packet", 0);

  /* "coremusic/capi.pyx":3509
 * def get_audio_file_stream_property_average_bytes_per_packet():
 *     """Get the average bytes per packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_bit_rate():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_AverageBytesPerPacket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3507
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     """Get the average bytes per packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_average_bytes_per_packet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3511
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     """Get the bit rate for an audio file stream"""
 *     return at.kAudioFileStreamProperty_BitRate
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_281get_audio_file_stream_property_bit_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_280get_audio_file_stream_property_bit_rate, "get_audio_file_stream_property_bit_rate()\n\nGet the bit rate for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_281get_audio_file_stream_property_bit_rate = {"get_audio_file_stream_property_bit_rate", (PyCFunction)__pyx_pw_9coremusic_4capi_281get_audio_file_stream_property_bit_rate, METH_NOARGS, __pyx_doc_9coremusic_4capi_280get_audio_file_stream_property_bit_rate};
static PyObject *__pyx_pw_9coremusic_4capi_281get_audio_file_stream_property_bit_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_bit_rate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_280get_audio_file_stream_property_bit_rate(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_280get_audio_file_stream_property_bit_rate(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_bit_rate", 0);

  /* "coremusic/capi.pyx":3513
 * def get_audio_file_stream_property_bit_rate():
 *     """Get the bit rate for an audio file stream"""
 *     return at.kAudioFileStreamProperty_BitRate             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_info_dictionary():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_BitRate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3511
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     """Get the bit rate for an audio file stream"""
 *     return at.kAudioFileStreamProperty_BitRate
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_bit_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3515
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     """Get the info dictionary for an audio file stream"""
 *     return at.kAudioFileStreamProperty_InfoDictionary
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_283get_audio_file_stream_property_info_dictionary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_282get_audio_file_stream_property_info_dictionary, "get_audio_file_stream_property_info_dictionary()\n\nGet the info dictionary for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_283get_audio_file_stream_property_info_dictionary = {"get_audio_file_stream_property_info_dictionary", (PyCFunction)__pyx_pw_9coremusic_4capi_283get_audio_file_stream_property_info_dictionary, METH_NOARGS, __pyx_doc_9coremusic_4capi_282get_audio_file_stream_property_info_dictionary};
static PyObject *__pyx_pw_9coremusic_4capi_283get_audio_file_stream_property_info_dictionary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_info_dictionary (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_282get_audio_file_stream_property_info_dictionary(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_282get_audio_file_stream_property_info_dictionary(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_info_dictionary", 0);

  /* "coremusic/capi.pyx":3517
 * def get_audio_file_stream_property_info_dictionary():
 *     """Get the info dictionary for an audio file stream"""
 *     return at.kAudioFileStreamProperty_InfoDictionary             # <<<<<<<<<<<<<<
 * 
 * # AudioFileStream flag getter functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamProperty_InfoDictionary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3515
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     """Get the info dictionary for an audio file stream"""
 *     return at.kAudioFileStreamProperty_InfoDictionary
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_info_dictionary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3520
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     """Get the property is cached flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_285get_audio_file_stream_property_flag_property_is_cached(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_284get_audio_file_stream_property_flag_property_is_cached, "get_audio_file_stream_property_flag_property_is_cached()\n\nGet the property is cached flag for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_285get_audio_file_stream_property_flag_property_is_cached = {"get_audio_file_stream_property_flag_property_is_cached", (PyCFunction)__pyx_pw_9coremusic_4capi_285get_audio_file_stream_property_flag_property_is_cached, METH_NOARGS, __pyx_doc_9coremusic_4capi_284get_audio_file_stream_property_flag_property_is_cached};
static PyObject *__pyx_pw_9coremusic_4capi_285get_audio_file_stream_property_flag_property_is_cached(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_flag_property_is_cached (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_284get_audio_file_stream_property_flag_property_is_cached(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_284get_audio_file_stream_property_flag_property_is_cached(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_flag_property_is_cached", 0);

  /* "coremusic/capi.pyx":3522
 * def get_audio_file_stream_property_flag_property_is_cached():
 *     """Get the property is cached flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_property_flag_cache_property():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_AudioFileStreamPropertyFlags(kAudioFileStreamPropertyFlag_PropertyIsCached); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3520
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     """Get the property is cached flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_flag_property_is_cached", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3524
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     """Get the cache property flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_287get_audio_file_stream_property_flag_cache_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_286get_audio_file_stream_property_flag_cache_property, "get_audio_file_stream_property_flag_cache_property()\n\nGet the cache property flag for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_287get_audio_file_stream_property_flag_cache_property = {"get_audio_file_stream_property_flag_cache_property", (PyCFunction)__pyx_pw_9coremusic_4capi_287get_audio_file_stream_property_flag_cache_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_286get_audio_file_stream_property_flag_cache_property};
static PyObject *__pyx_pw_9coremusic_4capi_287get_audio_file_stream_property_flag_cache_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_property_flag_cache_property (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_286get_audio_file_stream_property_flag_cache_property(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_286get_audio_file_stream_property_flag_cache_property(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_property_flag_cache_property", 0);

  /* "coremusic/capi.pyx":3526
 * def get_audio_file_stream_property_flag_cache_property():
 *     """Get the cache property flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_AudioFileStreamPropertyFlags(kAudioFileStreamPropertyFlag_CacheProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3524
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     """Get the cache property flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_property_flag_cache_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3528
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity flag for an audio file stream"""
 *     return at.kAudioFileStreamParseFlag_Discontinuity
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_289get_audio_file_stream_parse_flag_discontinuity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_288get_audio_file_stream_parse_flag_discontinuity, "get_audio_file_stream_parse_flag_discontinuity()\n\nGet the discontinuity flag for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_289get_audio_file_stream_parse_flag_discontinuity = {"get_audio_file_stream_parse_flag_discontinuity", (PyCFunction)__pyx_pw_9coremusic_4capi_289get_audio_file_stream_parse_flag_discontinuity, METH_NOARGS, __pyx_doc_9coremusic_4capi_288get_audio_file_stream_parse_flag_discontinuity};
static PyObject *__pyx_pw_9coremusic_4capi_289get_audio_file_stream_parse_flag_discontinuity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_parse_flag_discontinuity (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_288get_audio_file_stream_parse_flag_discontinuity(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_288get_audio_file_stream_parse_flag_discontinuity(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_parse_flag_discontinuity", 0);

  /* "coremusic/capi.pyx":3530
 * def get_audio_file_stream_parse_flag_discontinuity():
 *     """Get the discontinuity flag for an audio file stream"""
 *     return at.kAudioFileStreamParseFlag_Discontinuity             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_AudioFileStreamParseFlags(kAudioFileStreamParseFlag_Discontinuity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3528
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity flag for an audio file stream"""
 *     return at.kAudioFileStreamParseFlag_Discontinuity
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_parse_flag_discontinuity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3532
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     """Get the offset is estimated flag for an audio file stream"""
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_291get_audio_file_stream_seek_flag_offset_is_estimated(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_290get_audio_file_stream_seek_flag_offset_is_estimated, "get_audio_file_stream_seek_flag_offset_is_estimated()\n\nGet the offset is estimated flag for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_291get_audio_file_stream_seek_flag_offset_is_estimated = {"get_audio_file_stream_seek_flag_offset_is_estimated", (PyCFunction)__pyx_pw_9coremusic_4capi_291get_audio_file_stream_seek_flag_offset_is_estimated, METH_NOARGS, __pyx_doc_9coremusic_4capi_290get_audio_file_stream_seek_flag_offset_is_estimated};
static PyObject *__pyx_pw_9coremusic_4capi_291get_audio_file_stream_seek_flag_offset_is_estimated(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_seek_flag_offset_is_estimated (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_290get_audio_file_stream_seek_flag_offset_is_estimated(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_290get_audio_file_stream_seek_flag_offset_is_estimated(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_seek_flag_offset_is_estimated", 0);

  /* "coremusic/capi.pyx":3534
 * def get_audio_file_stream_seek_flag_offset_is_estimated():
 *     """Get the offset is estimated flag for an audio file stream"""
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated             # <<<<<<<<<<<<<<
 * 
 * # AudioFileStream error code getter functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_AudioFileStreamSeekFlags(kAudioFileStreamSeekFlag_OffsetIsEstimated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3532
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     """Get the offset is estimated flag for an audio file stream"""
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_seek_flag_offset_is_estimated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3537
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     """Get the unsupported file type error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedFileType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_293get_audio_file_stream_error_unsupported_file_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_292get_audio_file_stream_error_unsupported_file_type, "get_audio_file_stream_error_unsupported_file_type()\n\nGet the unsupported file type error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_293get_audio_file_stream_error_unsupported_file_type = {"get_audio_file_stream_error_unsupported_file_type", (PyCFunction)__pyx_pw_9coremusic_4capi_293get_audio_file_stream_error_unsupported_file_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_292get_audio_file_stream_error_unsupported_file_type};
static PyObject *__pyx_pw_9coremusic_4capi_293get_audio_file_stream_error_unsupported_file_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_unsupported_file_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_292get_audio_file_stream_error_unsupported_file_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_292get_audio_file_stream_error_unsupported_file_type(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_unsupported_file_type", 0);

  /* "coremusic/capi.pyx":3539
 * def get_audio_file_stream_error_unsupported_file_type():
 *     """Get the unsupported file type error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedFileType             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_unsupported_data_format():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_UnsupportedFileType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3537
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     """Get the unsupported file type error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedFileType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_unsupported_file_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3541
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     """Get the unsupported data format error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_295get_audio_file_stream_error_unsupported_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_294get_audio_file_stream_error_unsupported_data_format, "get_audio_file_stream_error_unsupported_data_format()\n\nGet the unsupported data format error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_295get_audio_file_stream_error_unsupported_data_format = {"get_audio_file_stream_error_unsupported_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_295get_audio_file_stream_error_unsupported_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_294get_audio_file_stream_error_unsupported_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_295get_audio_file_stream_error_unsupported_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_unsupported_data_format (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_294get_audio_file_stream_error_unsupported_data_format(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_294get_audio_file_stream_error_unsupported_data_format(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_unsupported_data_format", 0);

  /* "coremusic/capi.pyx":3543
 * def get_audio_file_stream_error_unsupported_data_format():
 *     """Get the unsupported data format error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedDataFormat             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_unsupported_property():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_UnsupportedDataFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3541
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     """Get the unsupported data format error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_unsupported_data_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3545
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedProperty
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_297get_audio_file_stream_error_unsupported_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_296get_audio_file_stream_error_unsupported_property, "get_audio_file_stream_error_unsupported_property()\n\nGet the unsupported property error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_297get_audio_file_stream_error_unsupported_property = {"get_audio_file_stream_error_unsupported_property", (PyCFunction)__pyx_pw_9coremusic_4capi_297get_audio_file_stream_error_unsupported_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_296get_audio_file_stream_error_unsupported_property};
static PyObject *__pyx_pw_9coremusic_4capi_297get_audio_file_stream_error_unsupported_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_unsupported_property (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_296get_audio_file_stream_error_unsupported_property(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_296get_audio_file_stream_error_unsupported_property(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_unsupported_property", 0);

  /* "coremusic/capi.pyx":3547
 * def get_audio_file_stream_error_unsupported_property():
 *     """Get the unsupported property error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedProperty             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_bad_property_size():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_UnsupportedProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3545
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedProperty
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_unsupported_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3549
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio file stream"""
 *     return at.kAudioFileStreamError_BadPropertySize
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_299get_audio_file_stream_error_bad_property_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_298get_audio_file_stream_error_bad_property_size, "get_audio_file_stream_error_bad_property_size()\n\nGet the bad property size error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_299get_audio_file_stream_error_bad_property_size = {"get_audio_file_stream_error_bad_property_size", (PyCFunction)__pyx_pw_9coremusic_4capi_299get_audio_file_stream_error_bad_property_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_298get_audio_file_stream_error_bad_property_size};
static PyObject *__pyx_pw_9coremusic_4capi_299get_audio_file_stream_error_bad_property_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_bad_property_size (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_298get_audio_file_stream_error_bad_property_size(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_298get_audio_file_stream_error_bad_property_size(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_bad_property_size", 0);

  /* "coremusic/capi.pyx":3551
 * def get_audio_file_stream_error_bad_property_size():
 *     """Get the bad property size error for an audio file stream"""
 *     return at.kAudioFileStreamError_BadPropertySize             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_not_optimized():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_BadPropertySize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3549
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio file stream"""
 *     return at.kAudioFileStreamError_BadPropertySize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_bad_property_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3553
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     """Get the not optimized error for an audio file stream"""
 *     return at.kAudioFileStreamError_NotOptimized
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_301get_audio_file_stream_error_not_optimized(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_300get_audio_file_stream_error_not_optimized, "get_audio_file_stream_error_not_optimized()\n\nGet the not optimized error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_301get_audio_file_stream_error_not_optimized = {"get_audio_file_stream_error_not_optimized", (PyCFunction)__pyx_pw_9coremusic_4capi_301get_audio_file_stream_error_not_optimized, METH_NOARGS, __pyx_doc_9coremusic_4capi_300get_audio_file_stream_error_not_optimized};
static PyObject *__pyx_pw_9coremusic_4capi_301get_audio_file_stream_error_not_optimized(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_not_optimized (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_300get_audio_file_stream_error_not_optimized(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_300get_audio_file_stream_error_not_optimized(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_not_optimized", 0);

  /* "coremusic/capi.pyx":3555
 * def get_audio_file_stream_error_not_optimized():
 *     """Get the not optimized error for an audio file stream"""
 *     return at.kAudioFileStreamError_NotOptimized             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_NotOptimized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3553
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     """Get the not optimized error for an audio file stream"""
 *     return at.kAudioFileStreamError_NotOptimized
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_not_optimized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3557
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     """Get the invalid packet offset error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidPacketOffset
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_303get_audio_file_stream_error_invalid_packet_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_302get_audio_file_stream_error_invalid_packet_offset, "get_audio_file_stream_error_invalid_packet_offset()\n\nGet the invalid packet offset error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_303get_audio_file_stream_error_invalid_packet_offset = {"get_audio_file_stream_error_invalid_packet_offset", (PyCFunction)__pyx_pw_9coremusic_4capi_303get_audio_file_stream_error_invalid_packet_offset, METH_NOARGS, __pyx_doc_9coremusic_4capi_302get_audio_file_stream_error_invalid_packet_offset};
static PyObject *__pyx_pw_9coremusic_4capi_303get_audio_file_stream_error_invalid_packet_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_invalid_packet_offset (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_302get_audio_file_stream_error_invalid_packet_offset(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_302get_audio_file_stream_error_invalid_packet_offset(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_invalid_packet_offset", 0);

  /* "coremusic/capi.pyx":3559
 * def get_audio_file_stream_error_invalid_packet_offset():
 *     """Get the invalid packet offset error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidPacketOffset             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_invalid_file():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_InvalidPacketOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3557
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     """Get the invalid packet offset error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidPacketOffset
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_invalid_packet_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3561
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     """Get the invalid file error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidFile
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_305get_audio_file_stream_error_invalid_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_304get_audio_file_stream_error_invalid_file, "get_audio_file_stream_error_invalid_file()\n\nGet the invalid file error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_305get_audio_file_stream_error_invalid_file = {"get_audio_file_stream_error_invalid_file", (PyCFunction)__pyx_pw_9coremusic_4capi_305get_audio_file_stream_error_invalid_file, METH_NOARGS, __pyx_doc_9coremusic_4capi_304get_audio_file_stream_error_invalid_file};
static PyObject *__pyx_pw_9coremusic_4capi_305get_audio_file_stream_error_invalid_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_invalid_file (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_304get_audio_file_stream_error_invalid_file(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_304get_audio_file_stream_error_invalid_file(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_invalid_file", 0);

  /* "coremusic/capi.pyx":3563
 * def get_audio_file_stream_error_invalid_file():
 *     """Get the invalid file error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidFile             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_value_unknown():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_InvalidFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3561
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     """Get the invalid file error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidFile
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_invalid_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3565
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     """Get the value unknown error for an audio file stream"""
 *     return at.kAudioFileStreamError_ValueUnknown
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_307get_audio_file_stream_error_value_unknown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_306get_audio_file_stream_error_value_unknown, "get_audio_file_stream_error_value_unknown()\n\nGet the value unknown error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_307get_audio_file_stream_error_value_unknown = {"get_audio_file_stream_error_value_unknown", (PyCFunction)__pyx_pw_9coremusic_4capi_307get_audio_file_stream_error_value_unknown, METH_NOARGS, __pyx_doc_9coremusic_4capi_306get_audio_file_stream_error_value_unknown};
static PyObject *__pyx_pw_9coremusic_4capi_307get_audio_file_stream_error_value_unknown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_value_unknown (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_306get_audio_file_stream_error_value_unknown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_306get_audio_file_stream_error_value_unknown(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_value_unknown", 0);

  /* "coremusic/capi.pyx":3567
 * def get_audio_file_stream_error_value_unknown():
 *     """Get the value unknown error for an audio file stream"""
 *     return at.kAudioFileStreamError_ValueUnknown             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_data_unavailable():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_ValueUnknown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3565
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     """Get the value unknown error for an audio file stream"""
 *     return at.kAudioFileStreamError_ValueUnknown
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_value_unknown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3569
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     """Get the data unavailable error for an audio file stream"""
 *     return at.kAudioFileStreamError_DataUnavailable
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_309get_audio_file_stream_error_data_unavailable(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_308get_audio_file_stream_error_data_unavailable, "get_audio_file_stream_error_data_unavailable()\n\nGet the data unavailable error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_309get_audio_file_stream_error_data_unavailable = {"get_audio_file_stream_error_data_unavailable", (PyCFunction)__pyx_pw_9coremusic_4capi_309get_audio_file_stream_error_data_unavailable, METH_NOARGS, __pyx_doc_9coremusic_4capi_308get_audio_file_stream_error_data_unavailable};
static PyObject *__pyx_pw_9coremusic_4capi_309get_audio_file_stream_error_data_unavailable(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_data_unavailable (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_308get_audio_file_stream_error_data_unavailable(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_308get_audio_file_stream_error_data_unavailable(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_data_unavailable", 0);

  /* "coremusic/capi.pyx":3571
 * def get_audio_file_stream_error_data_unavailable():
 *     """Get the data unavailable error for an audio file stream"""
 *     return at.kAudioFileStreamError_DataUnavailable             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_illegal_operation():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_DataUnavailable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3569
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     """Get the data unavailable error for an audio file stream"""
 *     return at.kAudioFileStreamError_DataUnavailable
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_data_unavailable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3573
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     """Get the illegal operation error for an audio file stream"""
 *     return at.kAudioFileStreamError_IllegalOperation
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_311get_audio_file_stream_error_illegal_operation(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_310get_audio_file_stream_error_illegal_operation, "get_audio_file_stream_error_illegal_operation()\n\nGet the illegal operation error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_311get_audio_file_stream_error_illegal_operation = {"get_audio_file_stream_error_illegal_operation", (PyCFunction)__pyx_pw_9coremusic_4capi_311get_audio_file_stream_error_illegal_operation, METH_NOARGS, __pyx_doc_9coremusic_4capi_310get_audio_file_stream_error_illegal_operation};
static PyObject *__pyx_pw_9coremusic_4capi_311get_audio_file_stream_error_illegal_operation(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_illegal_operation (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_310get_audio_file_stream_error_illegal_operation(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_310get_audio_file_stream_error_illegal_operation(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_illegal_operation", 0);

  /* "coremusic/capi.pyx":3575
 * def get_audio_file_stream_error_illegal_operation():
 *     """Get the illegal operation error for an audio file stream"""
 *     return at.kAudioFileStreamError_IllegalOperation             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_unspecified_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_IllegalOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3573
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     """Get the illegal operation error for an audio file stream"""
 *     return at.kAudioFileStreamError_IllegalOperation
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_illegal_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3577
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the unspecified error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnspecifiedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_313get_audio_file_stream_error_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_312get_audio_file_stream_error_unspecified_error, "get_audio_file_stream_error_unspecified_error()\n\nGet the unspecified error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_313get_audio_file_stream_error_unspecified_error = {"get_audio_file_stream_error_unspecified_error", (PyCFunction)__pyx_pw_9coremusic_4capi_313get_audio_file_stream_error_unspecified_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_312get_audio_file_stream_error_unspecified_error};
static PyObject *__pyx_pw_9coremusic_4capi_313get_audio_file_stream_error_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_unspecified_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_312get_audio_file_stream_error_unspecified_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_312get_audio_file_stream_error_unspecified_error(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_unspecified_error", 0);

  /* "coremusic/capi.pyx":3579
 * def get_audio_file_stream_error_unspecified_error():
 *     """Get the unspecified error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnspecifiedError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_UnspecifiedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3577
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the unspecified error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnspecifiedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_unspecified_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3581
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity cant recover error for an audio file stream"""
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_315get_audio_file_stream_error_discontinuity_cant_recover(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_314get_audio_file_stream_error_discontinuity_cant_recover, "get_audio_file_stream_error_discontinuity_cant_recover()\n\nGet the discontinuity cant recover error for an audio file stream");
static PyMethodDef __pyx_mdef_9coremusic_4capi_315get_audio_file_stream_error_discontinuity_cant_recover = {"get_audio_file_stream_error_discontinuity_cant_recover", (PyCFunction)__pyx_pw_9coremusic_4capi_315get_audio_file_stream_error_discontinuity_cant_recover, METH_NOARGS, __pyx_doc_9coremusic_4capi_314get_audio_file_stream_error_discontinuity_cant_recover};
static PyObject *__pyx_pw_9coremusic_4capi_315get_audio_file_stream_error_discontinuity_cant_recover(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_file_stream_error_discontinuity_cant_recover (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_314get_audio_file_stream_error_discontinuity_cant_recover(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_314get_audio_file_stream_error_discontinuity_cant_recover(CYTHON_UNUSED PyObject *__pyx_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_audio_file_stream_error_discontinuity_cant_recover", 0);

  /* "coremusic/capi.pyx":3583
 * def get_audio_file_stream_error_discontinuity_cant_recover():
 *     """Get the discontinuity cant recover error for an audio file stream"""
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFileStreamError_DiscontinuityCantRecover); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3581
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity cant recover error for an audio file stream"""
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_file_stream_error_discontinuity_cant_recover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3587
 * 
 * # AudioServices Functions
 * def audio_services_create_system_sound_id(str file_path):             # <<<<<<<<<<<<<<
 *     """Create a SystemSoundID from an audio file path"""
 *     cdef at.SystemSoundID sound_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_317audio_services_create_system_sound_id(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_316audio_services_create_system_sound_id, "audio_services_create_system_sound_id(str file_path)\n\nCreate a SystemSoundID from an audio file path");
static PyMethodDef __pyx_mdef_9coremusic_4capi_317audio_services_create_system_sound_id = {"audio_services_create_system_sound_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_317audio_services_create_system_sound_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_316audio_services_create_system_sound_id};
static PyObject *__pyx_pw_9coremusic_4capi_317audio_services_create_system_sound_id(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_file_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_create_system_sound_id (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_path,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3587, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3587, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_create_system_sound_id", 0) < (0)) __PYX_ERR(0, 3587, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_create_system_sound_id", 1, 1, 1, i); __PYX_ERR(0, 3587, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3587, __pyx_L3_error)
    }
    __pyx_v_file_path = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_create_system_sound_id", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3587, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_create_system_sound_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 3587, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_316audio_services_create_system_sound_id(__pyx_self, __pyx_v_file_path);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_316audio_services_create_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path) {
  SystemSoundID __pyx_v_sound_id;
  CFURLRef __pyx_v_url_ref;
  PyObject *__pyx_v_path_bytes = 0;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt8 const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_services_create_system_sound_id", 0);

  /* "coremusic/capi.pyx":3591
 *     cdef at.SystemSoundID sound_id
 *     cdef cf.CFURLRef url_ref
 *     cdef bytes path_bytes = file_path.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 3591, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3595
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,             # <<<<<<<<<<<<<<
 *         len(path_bytes),
 *         False
*/
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_path_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3595, __pyx_L1_error)

  /* "coremusic/capi.pyx":3596
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
 *         len(path_bytes),             # <<<<<<<<<<<<<<
 *         False
 *     )
*/
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_path_bytes); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3596, __pyx_L1_error)

  /* "coremusic/capi.pyx":3593
 *     cdef bytes path_bytes = file_path.encode('utf-8')
 * 
 *     url_ref = cf.CFURLCreateFromFileSystemRepresentation(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
*/
  __pyx_v_url_ref = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, ((UInt8 const *)__pyx_t_2), __pyx_t_3, 0);

  /* "coremusic/capi.pyx":3600
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  __pyx_t_4 = (!(__pyx_v_url_ref != 0));
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":3601
 * 
 *     if not url_ref:
 *         raise ValueError("Could not create URL from file path")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioServicesCreateSystemSoundID(
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_from_file_p};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3601, __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_ERR(0, 3601, __pyx_L1_error)

    /* "coremusic/capi.pyx":3600
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  }

  /* "coremusic/capi.pyx":3603
 *         raise ValueError("Could not create URL from file path")
 * 
 *     cdef cf.OSStatus status = at.AudioServicesCreateSystemSoundID(             # <<<<<<<<<<<<<<
 *         url_ref,
 *         &sound_id
*/
  __pyx_v_status = AudioServicesCreateSystemSoundID(__pyx_v_url_ref, (&__pyx_v_sound_id));

  /* "coremusic/capi.pyx":3608
 *     )
 * 
 *     cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":3610
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesCreateSystemSoundID"))
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":3611
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesCreateSystemSoundID"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>sound_id
*/
    __pyx_t_5 = NULL;
    __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioServicesCreateSystemSoundID); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3611, __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_ERR(0, 3611, __pyx_L1_error)

    /* "coremusic/capi.pyx":3610
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesCreateSystemSoundID"))
 * 
*/
  }

  /* "coremusic/capi.pyx":3613
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesCreateSystemSoundID"))
 * 
 *     return <long>sound_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_sound_id)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3587
 * 
 * # AudioServices Functions
 * def audio_services_create_system_sound_id(str file_path):             # <<<<<<<<<<<<<<
 *     """Create a SystemSoundID from an audio file path"""
 *     cdef at.SystemSoundID sound_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.audio_services_create_system_sound_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3616
 * 
 * 
 * def audio_services_dispose_system_sound_id(long sound_id):             # <<<<<<<<<<<<<<
 *     """Dispose a SystemSoundID"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_319audio_services_dispose_system_sound_id(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_318audio_services_dispose_system_sound_id, "audio_services_dispose_system_sound_id(long sound_id)\n\nDispose a SystemSoundID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_319audio_services_dispose_system_sound_id = {"audio_services_dispose_system_sound_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_319audio_services_dispose_system_sound_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_318audio_services_dispose_system_sound_id};
static PyObject *__pyx_pw_9coremusic_4capi_319audio_services_dispose_system_sound_id(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sound_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_dispose_system_sound_id (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sound_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3616, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3616, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_dispose_system_sound_id", 0) < (0)) __PYX_ERR(0, 3616, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_dispose_system_sound_id", 1, 1, 1, i); __PYX_ERR(0, 3616, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3616, __pyx_L3_error)
    }
    __pyx_v_sound_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sound_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3616, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_dispose_system_sound_id", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3616, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_dispose_system_sound_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_318audio_services_dispose_system_sound_id(__pyx_self, __pyx_v_sound_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_318audio_services_dispose_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id) {
  SystemSoundID __pyx_v_system_sound_id;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_services_dispose_system_sound_id", 0);

  /* "coremusic/capi.pyx":3618
 * def audio_services_dispose_system_sound_id(long sound_id):
 *     """Dispose a SystemSoundID"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)
 * 
*/
  __pyx_v_system_sound_id = ((SystemSoundID)__pyx_v_sound_id);

  /* "coremusic/capi.pyx":3619
 *     """Dispose a SystemSoundID"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = AudioServicesDisposeSystemSoundID(__pyx_v_system_sound_id);

  /* "coremusic/capi.pyx":3621
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesDisposeSystemSoundID"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3622
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesDisposeSystemSoundID"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioServicesDisposeSystemSoundI); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3622, __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_ERR(0, 3622, __pyx_L1_error)

    /* "coremusic/capi.pyx":3621
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesDisposeSystemSoundID"))
 * 
*/
  }

  /* "coremusic/capi.pyx":3624
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesDisposeSystemSoundID"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3616
 * 
 * 
 * def audio_services_dispose_system_sound_id(long sound_id):             # <<<<<<<<<<<<<<
 *     """Dispose a SystemSoundID"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.audio_services_dispose_system_sound_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3627
 * 
 * 
 * def audio_services_play_system_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play a system sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_321audio_services_play_system_sound(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_320audio_services_play_system_sound, "audio_services_play_system_sound(long sound_id)\n\nPlay a system sound (deprecated but widely used)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_321audio_services_play_system_sound = {"audio_services_play_system_sound", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_321audio_services_play_system_sound, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_320audio_services_play_system_sound};
static PyObject *__pyx_pw_9coremusic_4capi_321audio_services_play_system_sound(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sound_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_play_system_sound (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sound_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3627, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3627, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_play_system_sound", 0) < (0)) __PYX_ERR(0, 3627, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_play_system_sound", 1, 1, 1, i); __PYX_ERR(0, 3627, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3627, __pyx_L3_error)
    }
    __pyx_v_sound_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sound_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3627, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_play_system_sound", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3627, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_play_system_sound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_320audio_services_play_system_sound(__pyx_self, __pyx_v_sound_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_320audio_services_play_system_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id) {
  SystemSoundID __pyx_v_system_sound_id;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_play_system_sound", 0);

  /* "coremusic/capi.pyx":3629
 * def audio_services_play_system_sound(long sound_id):
 *     """Play a system sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id             # <<<<<<<<<<<<<<
 *     at.AudioServicesPlaySystemSound(system_sound_id)
 * 
*/
  __pyx_v_system_sound_id = ((SystemSoundID)__pyx_v_sound_id);

  /* "coremusic/capi.pyx":3630
 *     """Play a system sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
 *     at.AudioServicesPlaySystemSound(system_sound_id)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  AudioServicesPlaySystemSound(__pyx_v_system_sound_id);

  /* "coremusic/capi.pyx":3627
 * 
 * 
 * def audio_services_play_system_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play a system sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3633
 * 
 * 
 * def audio_services_play_alert_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play an alert sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_323audio_services_play_alert_sound(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_322audio_services_play_alert_sound, "audio_services_play_alert_sound(long sound_id)\n\nPlay an alert sound (deprecated but widely used)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_323audio_services_play_alert_sound = {"audio_services_play_alert_sound", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_323audio_services_play_alert_sound, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_322audio_services_play_alert_sound};
static PyObject *__pyx_pw_9coremusic_4capi_323audio_services_play_alert_sound(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sound_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_play_alert_sound (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sound_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3633, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3633, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_play_alert_sound", 0) < (0)) __PYX_ERR(0, 3633, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_play_alert_sound", 1, 1, 1, i); __PYX_ERR(0, 3633, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3633, __pyx_L3_error)
    }
    __pyx_v_sound_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sound_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3633, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_play_alert_sound", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3633, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_play_alert_sound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_322audio_services_play_alert_sound(__pyx_self, __pyx_v_sound_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_322audio_services_play_alert_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id) {
  SystemSoundID __pyx_v_system_sound_id;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_play_alert_sound", 0);

  /* "coremusic/capi.pyx":3635
 * def audio_services_play_alert_sound(long sound_id):
 *     """Play an alert sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id             # <<<<<<<<<<<<<<
 *     at.AudioServicesPlayAlertSound(system_sound_id)
 * 
*/
  __pyx_v_system_sound_id = ((SystemSoundID)__pyx_v_sound_id);

  /* "coremusic/capi.pyx":3636
 *     """Play an alert sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
 *     at.AudioServicesPlayAlertSound(system_sound_id)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  AudioServicesPlayAlertSound(__pyx_v_system_sound_id);

  /* "coremusic/capi.pyx":3633
 * 
 * 
 * def audio_services_play_alert_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play an alert sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3639
 * 
 * 
 * def audio_services_get_property(int property_id, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Get an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_325audio_services_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_324audio_services_get_property, "audio_services_get_property(int property_id, long specifier_value=0)\n\nGet an AudioServices property");
static PyMethodDef __pyx_mdef_9coremusic_4capi_325audio_services_get_property = {"audio_services_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_325audio_services_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_324audio_services_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_325audio_services_get_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_property_id;
  long __pyx_v_specifier_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_get_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_specifier_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3639, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_get_property", 0) < (0)) __PYX_ERR(0, 3639, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_get_property", 0, 1, 2, i); __PYX_ERR(0, 3639, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3639, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3639, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_specifier_value = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_specifier_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3639, __pyx_L3_error)
    } else {
      __pyx_v_specifier_value = ((long)((long)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_get_property", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3639, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_324audio_services_get_property(__pyx_self, __pyx_v_property_id, __pyx_v_specifier_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_324audio_services_get_property(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_property_id, long __pyx_v_specifier_value) {
  AudioServicesPropertyID __pyx_v_prop_id;
  UInt32 __pyx_v_data_size;
  Boolean __pyx_v_writable;
  UInt32 __pyx_v_specifier;
  OSStatus __pyx_v_status;
  char *__pyx_v_buffer;
  UInt32 __pyx_v_actual_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  int __pyx_t_2;
  UInt32 *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("audio_services_get_property", 0);

  /* "coremusic/capi.pyx":3641
 * def audio_services_get_property(int property_id, long specifier_value=0):
 *     """Get an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = False
*/
  __pyx_v_prop_id = ((AudioServicesPropertyID)__pyx_v_property_id);

  /* "coremusic/capi.pyx":3642
 *     """Get an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
 *     cdef cf.UInt32 data_size = 0             # <<<<<<<<<<<<<<
 *     cdef cf.Boolean writable = False
 *     cdef cf.UInt32 specifier = <cf.UInt32>specifier_value
*/
  __pyx_v_data_size = 0;

  /* "coremusic/capi.pyx":3643
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = False             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 specifier = <cf.UInt32>specifier_value
 * 
*/
  __pyx_v_writable = 0;

  /* "coremusic/capi.pyx":3644
 *     cdef cf.UInt32 data_size = 0
 *     cdef cf.Boolean writable = False
 *     cdef cf.UInt32 specifier = <cf.UInt32>specifier_value             # <<<<<<<<<<<<<<
 * 
 *     # Get property info first
*/
  __pyx_v_specifier = ((UInt32)__pyx_v_specifier_value);

  /* "coremusic/capi.pyx":3649
 *     cdef cf.OSStatus status = at.AudioServicesGetPropertyInfo(
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,             # <<<<<<<<<<<<<<
 *         &specifier if specifier_value != 0 else NULL,
 *         &data_size,
*/
  __pyx_t_2 = (__pyx_v_specifier_value != 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (sizeof(UInt32));
  } else {
    __pyx_t_1 = 0;
  }

  /* "coremusic/capi.pyx":3650
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,
 *         &specifier if specifier_value != 0 else NULL,             # <<<<<<<<<<<<<<
 *         &data_size,
 *         &writable
*/
  __pyx_t_2 = (__pyx_v_specifier_value != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = (&__pyx_v_specifier);
  } else {
    __pyx_t_3 = NULL;
  }

  /* "coremusic/capi.pyx":3647
 * 
 *     # Get property info first
 *     cdef cf.OSStatus status = at.AudioServicesGetPropertyInfo(             # <<<<<<<<<<<<<<
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,
*/
  __pyx_v_status = AudioServicesGetPropertyInfo(__pyx_v_prop_id, __pyx_t_1, __pyx_t_3, (&__pyx_v_data_size), (&__pyx_v_writable));

  /* "coremusic/capi.pyx":3655
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesGetPropertyInfo"))
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3656
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesGetPropertyInfo"))             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get property data
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioServicesGetPropertyInfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (__pyx_t_1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3656, __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_ERR(0, 3656, __pyx_L1_error)

    /* "coremusic/capi.pyx":3655
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesGetPropertyInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":3659
 * 
 *     # Allocate buffer and get property data
 *     cdef char* buffer = <char*>malloc(data_size)             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 actual_size = data_size
 *     if not buffer:
*/
  __pyx_v_buffer = ((char *)malloc(__pyx_v_data_size));

  /* "coremusic/capi.pyx":3660
 *     # Allocate buffer and get property data
 *     cdef char* buffer = <char*>malloc(data_size)
 *     cdef cf.UInt32 actual_size = data_size             # <<<<<<<<<<<<<<
 *     if not buffer:
 *         raise MemoryError("Could not allocate memory for property data")
*/
  __pyx_v_actual_size = __pyx_v_data_size;

  /* "coremusic/capi.pyx":3661
 *     cdef char* buffer = <char*>malloc(data_size)
 *     cdef cf.UInt32 actual_size = data_size
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for property data")
 * 
*/
  __pyx_t_2 = (!(__pyx_v_buffer != 0));
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3662
 *     cdef cf.UInt32 actual_size = data_size
 *     if not buffer:
 *         raise MemoryError("Could not allocate memory for property data")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_6 = NULL;
    __pyx_t_1 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_memory_for_pr};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (__pyx_t_1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3662, __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_ERR(0, 3662, __pyx_L1_error)

    /* "coremusic/capi.pyx":3661
 *     cdef char* buffer = <char*>malloc(data_size)
 *     cdef cf.UInt32 actual_size = data_size
 *     if not buffer:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for property data")
 * 
*/
  }

  /* "coremusic/capi.pyx":3664
 *         raise MemoryError("Could not allocate memory for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioServicesGetProperty(
 *             prop_id,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3667
 *         status = at.AudioServicesGetProperty(
 *             prop_id,
 *             sizeof(cf.UInt32) if specifier_value != 0 else 0,             # <<<<<<<<<<<<<<
 *             &specifier if specifier_value != 0 else NULL,
 *             &actual_size,
*/
    __pyx_t_2 = (__pyx_v_specifier_value != 0);
    if (__pyx_t_2) {
      __pyx_t_1 = (sizeof(UInt32));
    } else {
      __pyx_t_1 = 0;
    }

    /* "coremusic/capi.pyx":3668
 *             prop_id,
 *             sizeof(cf.UInt32) if specifier_value != 0 else 0,
 *             &specifier if specifier_value != 0 else NULL,             # <<<<<<<<<<<<<<
 *             &actual_size,
 *             buffer
*/
    __pyx_t_2 = (__pyx_v_specifier_value != 0);
    if (__pyx_t_2) {
      __pyx_t_3 = (&__pyx_v_specifier);
    } else {
      __pyx_t_3 = NULL;
    }

    /* "coremusic/capi.pyx":3665
 * 
 *     try:
 *         status = at.AudioServicesGetProperty(             # <<<<<<<<<<<<<<
 *             prop_id,
 *             sizeof(cf.UInt32) if specifier_value != 0 else 0,
*/
    __pyx_v_status = AudioServicesGetProperty(__pyx_v_prop_id, __pyx_t_1, __pyx_t_3, (&__pyx_v_actual_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":3673
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioServicesGetProperty"))
 * 
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":3674
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "AudioServicesGetProperty"))             # <<<<<<<<<<<<<<
 * 
 *         # Return property value based on size
*/
      __pyx_t_6 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioServicesGetProperty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3674, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (__pyx_t_1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3674, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 3674, __pyx_L6_error)

      /* "coremusic/capi.pyx":3673
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "AudioServicesGetProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":3677
 * 
 *         # Return property value based on size
 *         if data_size == 4:             # <<<<<<<<<<<<<<
 *             return (<cf.UInt32*>buffer)[0]
 *         else:
*/
    __pyx_t_2 = (__pyx_v_data_size == 4);
    if (__pyx_t_2) {

      /* "coremusic/capi.pyx":3678
 *         # Return property value based on size
 *         if data_size == 4:
 *             return (<cf.UInt32*>buffer)[0]             # <<<<<<<<<<<<<<
 *         else:
 *             return buffer[:actual_size]
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyLong_From_UInt32((((UInt32 *)__pyx_v_buffer)[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3678, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":3677
 * 
 *         # Return property value based on size
 *         if data_size == 4:             # <<<<<<<<<<<<<<
 *             return (<cf.UInt32*>buffer)[0]
 *         else:
*/
    }

    /* "coremusic/capi.pyx":3680
 *             return (<cf.UInt32*>buffer)[0]
 *         else:
 *             return buffer[:actual_size]             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buffer + 0, __pyx_v_actual_size - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5_return;
    }
  }

  /* "coremusic/capi.pyx":3683
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buffer);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3639
 * 
 * 
 * def audio_services_get_property(int property_id, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Get an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.audio_services_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3686
 * 
 * 
 * def audio_services_set_property(int property_id, data, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Set an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_327audio_services_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_326audio_services_set_property, "audio_services_set_property(int property_id, data, long specifier_value=0)\n\nSet an AudioServices property");
static PyMethodDef __pyx_mdef_9coremusic_4capi_327audio_services_set_property = {"audio_services_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_327audio_services_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_326audio_services_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_327audio_services_set_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_property_id;
  PyObject *__pyx_v_data = 0;
  long __pyx_v_specifier_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("audio_services_set_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_property_id,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_specifier_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3686, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3686, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3686, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3686, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "audio_services_set_property", 0) < (0)) __PYX_ERR(0, 3686, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("audio_services_set_property", 0, 2, 3, i); __PYX_ERR(0, 3686, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3686, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3686, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3686, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_property_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_property_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3686, __pyx_L3_error)
    __pyx_v_data = values[1];
    if (values[2]) {
      __pyx_v_specifier_value = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_specifier_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3686, __pyx_L3_error)
    } else {
      __pyx_v_specifier_value = ((long)((long)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_services_set_property", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3686, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.audio_services_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_326audio_services_set_property(__pyx_self, __pyx_v_property_id, __pyx_v_data, __pyx_v_specifier_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_326audio_services_set_property(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_property_id, PyObject *__pyx_v_data, long __pyx_v_specifier_value) {
  AudioServicesPropertyID __pyx_v_prop_id;
  UInt32 __pyx_v_specifier;
  UInt32 __pyx_v_uint_data;
  PyObject *__pyx_v_byte_data = 0;
  void const *__pyx_v_data_ptr;
  UInt32 __pyx_v_data_size;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  UInt32 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  UInt32 *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_services_set_property", 0);

  /* "coremusic/capi.pyx":3688
 * def audio_services_set_property(int property_id, data, long specifier_value=0):
 *     """Set an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 specifier = <cf.UInt32>specifier_value
 *     cdef cf.UInt32 uint_data
*/
  __pyx_v_prop_id = ((AudioServicesPropertyID)__pyx_v_property_id);

  /* "coremusic/capi.pyx":3689
 *     """Set an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
 *     cdef cf.UInt32 specifier = <cf.UInt32>specifier_value             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 uint_data
 *     cdef bytes byte_data
*/
  __pyx_v_specifier = ((UInt32)__pyx_v_specifier_value);

  /* "coremusic/capi.pyx":3696
 * 
 *     # Handle different data types
 *     if isinstance(data, int):             # <<<<<<<<<<<<<<
 *         uint_data = <cf.UInt32>data
 *         data_ptr = <const void*>&uint_data
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_data); 
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3697
 *     # Handle different data types
 *     if isinstance(data, int):
 *         uint_data = <cf.UInt32>data             # <<<<<<<<<<<<<<
 *         data_ptr = <const void*>&uint_data
 *         data_size = sizeof(cf.UInt32)
*/
    __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_v_data); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3697, __pyx_L1_error)
    __pyx_v_uint_data = ((UInt32)__pyx_t_2);

    /* "coremusic/capi.pyx":3698
 *     if isinstance(data, int):
 *         uint_data = <cf.UInt32>data
 *         data_ptr = <const void*>&uint_data             # <<<<<<<<<<<<<<
 *         data_size = sizeof(cf.UInt32)
 *     elif isinstance(data, bytes):
*/
    __pyx_v_data_ptr = ((void const *)(&__pyx_v_uint_data));

    /* "coremusic/capi.pyx":3699
 *         uint_data = <cf.UInt32>data
 *         data_ptr = <const void*>&uint_data
 *         data_size = sizeof(cf.UInt32)             # <<<<<<<<<<<<<<
 *     elif isinstance(data, bytes):
 *         byte_data = data
*/
    __pyx_v_data_size = (sizeof(UInt32));

    /* "coremusic/capi.pyx":3696
 * 
 *     # Handle different data types
 *     if isinstance(data, int):             # <<<<<<<<<<<<<<
 *         uint_data = <cf.UInt32>data
 *         data_ptr = <const void*>&uint_data
*/
    goto __pyx_L3;
  }

  /* "coremusic/capi.pyx":3700
 *         data_ptr = <const void*>&uint_data
 *         data_size = sizeof(cf.UInt32)
 *     elif isinstance(data, bytes):             # <<<<<<<<<<<<<<
 *         byte_data = data
 *         data_ptr = <const void*>byte_data
*/
  __pyx_t_1 = PyBytes_Check(__pyx_v_data); 
  if (likely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3701
 *         data_size = sizeof(cf.UInt32)
 *     elif isinstance(data, bytes):
 *         byte_data = data             # <<<<<<<<<<<<<<
 *         data_ptr = <const void*>byte_data
 *         data_size = len(byte_data)
*/
    __pyx_t_3 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_3);
    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 3701, __pyx_L1_error)
    __pyx_v_byte_data = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":3702
 *     elif isinstance(data, bytes):
 *         byte_data = data
 *         data_ptr = <const void*>byte_data             # <<<<<<<<<<<<<<
 *         data_size = len(byte_data)
 *     else:
*/
    __pyx_v_data_ptr = ((void const *)__pyx_v_byte_data);

    /* "coremusic/capi.pyx":3703
 *         byte_data = data
 *         data_ptr = <const void*>byte_data
 *         data_size = len(byte_data)             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Data must be int or bytes")
*/
    if (unlikely(__pyx_v_byte_data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 3703, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_byte_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3703, __pyx_L1_error)
    __pyx_v_data_size = __pyx_t_4;

    /* "coremusic/capi.pyx":3700
 *         data_ptr = <const void*>&uint_data
 *         data_size = sizeof(cf.UInt32)
 *     elif isinstance(data, bytes):             # <<<<<<<<<<<<<<
 *         byte_data = data
 *         data_ptr = <const void*>byte_data
*/
    goto __pyx_L3;
  }

  /* "coremusic/capi.pyx":3705
 *         data_size = len(byte_data)
 *     else:
 *         raise TypeError("Data must be int or bytes")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioServicesSetProperty(
*/
  /*else*/ {
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Data_must_be_int_or_bytes};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3705, __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_ERR(0, 3705, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "coremusic/capi.pyx":3709
 *     cdef cf.OSStatus status = at.AudioServicesSetProperty(
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,             # <<<<<<<<<<<<<<
 *         &specifier if specifier_value != 0 else NULL,
 *         data_size,
*/
  __pyx_t_1 = (__pyx_v_specifier_value != 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (sizeof(UInt32));
  } else {
    __pyx_t_6 = 0;
  }

  /* "coremusic/capi.pyx":3710
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,
 *         &specifier if specifier_value != 0 else NULL,             # <<<<<<<<<<<<<<
 *         data_size,
 *         data_ptr
*/
  __pyx_t_1 = (__pyx_v_specifier_value != 0);
  if (__pyx_t_1) {
    __pyx_t_7 = (&__pyx_v_specifier);
  } else {
    __pyx_t_7 = NULL;
  }

  /* "coremusic/capi.pyx":3707
 *         raise TypeError("Data must be int or bytes")
 * 
 *     cdef cf.OSStatus status = at.AudioServicesSetProperty(             # <<<<<<<<<<<<<<
 *         prop_id,
 *         sizeof(cf.UInt32) if specifier_value != 0 else 0,
*/
  __pyx_v_status = AudioServicesSetProperty(__pyx_v_prop_id, __pyx_t_6, __pyx_t_7, __pyx_v_data_size, __pyx_v_data_ptr);

  /* "coremusic/capi.pyx":3715
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesSetProperty"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3716
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesSetProperty"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_5 = NULL;
    __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AudioServicesSetProperty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3716, __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_ERR(0, 3716, __pyx_L1_error)

    /* "coremusic/capi.pyx":3715
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesSetProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":3718
 *         raise RuntimeError(format_osstatus_error(status, "AudioServicesSetProperty"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3686
 * 
 * 
 * def audio_services_set_property(int property_id, data, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Set an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.audio_services_set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byte_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3722
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     """Get the no error for an audio services"""
 *     return at.kAudioServicesNoError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_329get_audio_services_no_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_328get_audio_services_no_error, "get_audio_services_no_error()\n\nGet the no error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_329get_audio_services_no_error = {"get_audio_services_no_error", (PyCFunction)__pyx_pw_9coremusic_4capi_329get_audio_services_no_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_328get_audio_services_no_error};
static PyObject *__pyx_pw_9coremusic_4capi_329get_audio_services_no_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_no_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_328get_audio_services_no_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_328get_audio_services_no_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_no_error", 0);

  /* "coremusic/capi.pyx":3724
 * def get_audio_services_no_error():
 *     """Get the no error for an audio services"""
 *     return at.kAudioServicesNoError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_unsupported_property_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesNoError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3722
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     """Get the no error for an audio services"""
 *     return at.kAudioServicesNoError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_no_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3726
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio services"""
 *     return at.kAudioServicesUnsupportedPropertyError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_331get_audio_services_unsupported_property_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_330get_audio_services_unsupported_property_error, "get_audio_services_unsupported_property_error()\n\nGet the unsupported property error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_331get_audio_services_unsupported_property_error = {"get_audio_services_unsupported_property_error", (PyCFunction)__pyx_pw_9coremusic_4capi_331get_audio_services_unsupported_property_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_330get_audio_services_unsupported_property_error};
static PyObject *__pyx_pw_9coremusic_4capi_331get_audio_services_unsupported_property_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_unsupported_property_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_330get_audio_services_unsupported_property_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_330get_audio_services_unsupported_property_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_unsupported_property_error", 0);

  /* "coremusic/capi.pyx":3728
 * def get_audio_services_unsupported_property_error():
 *     """Get the unsupported property error for an audio services"""
 *     return at.kAudioServicesUnsupportedPropertyError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_bad_property_size_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesUnsupportedPropertyError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3726
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio services"""
 *     return at.kAudioServicesUnsupportedPropertyError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_unsupported_property_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3730
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio services"""
 *     return at.kAudioServicesBadPropertySizeError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_333get_audio_services_bad_property_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_332get_audio_services_bad_property_size_error, "get_audio_services_bad_property_size_error()\n\nGet the bad property size error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_333get_audio_services_bad_property_size_error = {"get_audio_services_bad_property_size_error", (PyCFunction)__pyx_pw_9coremusic_4capi_333get_audio_services_bad_property_size_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_332get_audio_services_bad_property_size_error};
static PyObject *__pyx_pw_9coremusic_4capi_333get_audio_services_bad_property_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_bad_property_size_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_332get_audio_services_bad_property_size_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_332get_audio_services_bad_property_size_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_bad_property_size_error", 0);

  /* "coremusic/capi.pyx":3732
 * def get_audio_services_bad_property_size_error():
 *     """Get the bad property size error for an audio services"""
 *     return at.kAudioServicesBadPropertySizeError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_bad_specifier_size_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesBadPropertySizeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3730
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio services"""
 *     return at.kAudioServicesBadPropertySizeError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_bad_property_size_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3734
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad specifier size error for an audio services"""
 *     return at.kAudioServicesBadSpecifierSizeError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_335get_audio_services_bad_specifier_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_334get_audio_services_bad_specifier_size_error, "get_audio_services_bad_specifier_size_error()\n\nGet the bad specifier size error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_335get_audio_services_bad_specifier_size_error = {"get_audio_services_bad_specifier_size_error", (PyCFunction)__pyx_pw_9coremusic_4capi_335get_audio_services_bad_specifier_size_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_334get_audio_services_bad_specifier_size_error};
static PyObject *__pyx_pw_9coremusic_4capi_335get_audio_services_bad_specifier_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_bad_specifier_size_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_334get_audio_services_bad_specifier_size_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_334get_audio_services_bad_specifier_size_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_bad_specifier_size_error", 0);

  /* "coremusic/capi.pyx":3736
 * def get_audio_services_bad_specifier_size_error():
 *     """Get the bad specifier size error for an audio services"""
 *     return at.kAudioServicesBadSpecifierSizeError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_system_sound_unspecified_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesBadSpecifierSizeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3734
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad specifier size error for an audio services"""
 *     return at.kAudioServicesBadSpecifierSizeError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_bad_specifier_size_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3738
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound unspecified error for an audio services"""
 *     return at.kAudioServicesSystemSoundUnspecifiedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_337get_audio_services_system_sound_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_336get_audio_services_system_sound_unspecified_error, "get_audio_services_system_sound_unspecified_error()\n\nGet the system sound unspecified error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_337get_audio_services_system_sound_unspecified_error = {"get_audio_services_system_sound_unspecified_error", (PyCFunction)__pyx_pw_9coremusic_4capi_337get_audio_services_system_sound_unspecified_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_336get_audio_services_system_sound_unspecified_error};
static PyObject *__pyx_pw_9coremusic_4capi_337get_audio_services_system_sound_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_system_sound_unspecified_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_336get_audio_services_system_sound_unspecified_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_336get_audio_services_system_sound_unspecified_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_system_sound_unspecified_error", 0);

  /* "coremusic/capi.pyx":3740
 * def get_audio_services_system_sound_unspecified_error():
 *     """Get the system sound unspecified error for an audio services"""
 *     return at.kAudioServicesSystemSoundUnspecifiedError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_system_sound_client_timed_out_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesSystemSoundUnspecifiedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3738
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound unspecified error for an audio services"""
 *     return at.kAudioServicesSystemSoundUnspecifiedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_system_sound_unspecified_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3742
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound client timed out error for an audio services"""
 *     return at.kAudioServicesSystemSoundClientTimedOutError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_339get_audio_services_system_sound_client_timed_out_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_338get_audio_services_system_sound_client_timed_out_error, "get_audio_services_system_sound_client_timed_out_error()\n\nGet the system sound client timed out error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_339get_audio_services_system_sound_client_timed_out_error = {"get_audio_services_system_sound_client_timed_out_error", (PyCFunction)__pyx_pw_9coremusic_4capi_339get_audio_services_system_sound_client_timed_out_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_338get_audio_services_system_sound_client_timed_out_error};
static PyObject *__pyx_pw_9coremusic_4capi_339get_audio_services_system_sound_client_timed_out_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_system_sound_client_timed_out_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_338get_audio_services_system_sound_client_timed_out_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_338get_audio_services_system_sound_client_timed_out_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_system_sound_client_timed_out_error", 0);

  /* "coremusic/capi.pyx":3744
 * def get_audio_services_system_sound_client_timed_out_error():
 *     """Get the system sound client timed out error for an audio services"""
 *     return at.kAudioServicesSystemSoundClientTimedOutError             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesSystemSoundClientTimedOutError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3742
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound client timed out error for an audio services"""
 *     return at.kAudioServicesSystemSoundClientTimedOutError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_system_sound_client_timed_out_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3746
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound exceeded maximum duration error for an audio services"""
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_341get_audio_services_system_sound_exceeded_maximum_duration_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_340get_audio_services_system_sound_exceeded_maximum_duration_error, "get_audio_services_system_sound_exceeded_maximum_duration_error()\n\nGet the system sound exceeded maximum duration error for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_341get_audio_services_system_sound_exceeded_maximum_duration_error = {"get_audio_services_system_sound_exceeded_maximum_duration_error", (PyCFunction)__pyx_pw_9coremusic_4capi_341get_audio_services_system_sound_exceeded_maximum_duration_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_340get_audio_services_system_sound_exceeded_maximum_duration_error};
static PyObject *__pyx_pw_9coremusic_4capi_341get_audio_services_system_sound_exceeded_maximum_duration_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_system_sound_exceeded_maximum_duration_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_340get_audio_services_system_sound_exceeded_maximum_duration_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_340get_audio_services_system_sound_exceeded_maximum_duration_error(CYTHON_UNUSED PyObject *__pyx_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_audio_services_system_sound_exceeded_maximum_duration_error", 0);

  /* "coremusic/capi.pyx":3748
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():
 *     """Get the system sound exceeded maximum duration error for an audio services"""
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError             # <<<<<<<<<<<<<<
 * 
 * def get_system_sound_id_user_preferred_alert():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesSystemSoundExceededMaximumDurationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3746
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound exceeded maximum duration error for an audio services"""
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_system_sound_exceeded_maximum_duration_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3750
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kSystemSoundID_UserPreferredAlert
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_343get_system_sound_id_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_342get_system_sound_id_user_preferred_alert, "get_system_sound_id_user_preferred_alert()\n\nGet the user preferred alert for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_343get_system_sound_id_user_preferred_alert = {"get_system_sound_id_user_preferred_alert", (PyCFunction)__pyx_pw_9coremusic_4capi_343get_system_sound_id_user_preferred_alert, METH_NOARGS, __pyx_doc_9coremusic_4capi_342get_system_sound_id_user_preferred_alert};
static PyObject *__pyx_pw_9coremusic_4capi_343get_system_sound_id_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_system_sound_id_user_preferred_alert (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_342get_system_sound_id_user_preferred_alert(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_342get_system_sound_id_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_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_system_sound_id_user_preferred_alert", 0);

  /* "coremusic/capi.pyx":3752
 * def get_system_sound_id_user_preferred_alert():
 *     """Get the user preferred alert for an audio services"""
 *     return at.kSystemSoundID_UserPreferredAlert             # <<<<<<<<<<<<<<
 * 
 * def get_system_sound_id_flash_screen():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSystemSoundID_UserPreferredAlert); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3750
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kSystemSoundID_UserPreferredAlert
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_system_sound_id_user_preferred_alert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3754
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     """Get the flash screen for an audio services"""
 *     return at.kSystemSoundID_FlashScreen
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_345get_system_sound_id_flash_screen(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_344get_system_sound_id_flash_screen, "get_system_sound_id_flash_screen()\n\nGet the flash screen for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_345get_system_sound_id_flash_screen = {"get_system_sound_id_flash_screen", (PyCFunction)__pyx_pw_9coremusic_4capi_345get_system_sound_id_flash_screen, METH_NOARGS, __pyx_doc_9coremusic_4capi_344get_system_sound_id_flash_screen};
static PyObject *__pyx_pw_9coremusic_4capi_345get_system_sound_id_flash_screen(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_system_sound_id_flash_screen (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_344get_system_sound_id_flash_screen(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_344get_system_sound_id_flash_screen(CYTHON_UNUSED PyObject *__pyx_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_system_sound_id_flash_screen", 0);

  /* "coremusic/capi.pyx":3756
 * def get_system_sound_id_flash_screen():
 *     """Get the flash screen for an audio services"""
 *     return at.kSystemSoundID_FlashScreen             # <<<<<<<<<<<<<<
 * 
 * def get_system_sound_id_vibrate():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSystemSoundID_FlashScreen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3754
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     """Get the flash screen for an audio services"""
 *     return at.kSystemSoundID_FlashScreen
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_system_sound_id_flash_screen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3758
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     """Get the vibrate for an audio services"""
 *     return at.kSystemSoundID_Vibrate
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_347get_system_sound_id_vibrate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_346get_system_sound_id_vibrate, "get_system_sound_id_vibrate()\n\nGet the vibrate for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_347get_system_sound_id_vibrate = {"get_system_sound_id_vibrate", (PyCFunction)__pyx_pw_9coremusic_4capi_347get_system_sound_id_vibrate, METH_NOARGS, __pyx_doc_9coremusic_4capi_346get_system_sound_id_vibrate};
static PyObject *__pyx_pw_9coremusic_4capi_347get_system_sound_id_vibrate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_system_sound_id_vibrate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_346get_system_sound_id_vibrate(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_346get_system_sound_id_vibrate(CYTHON_UNUSED PyObject *__pyx_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_system_sound_id_vibrate", 0);

  /* "coremusic/capi.pyx":3760
 * def get_system_sound_id_vibrate():
 *     """Get the vibrate for an audio services"""
 *     return at.kSystemSoundID_Vibrate             # <<<<<<<<<<<<<<
 * 
 * def get_user_preferred_alert():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSystemSoundID_Vibrate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3758
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     """Get the vibrate for an audio services"""
 *     return at.kSystemSoundID_Vibrate
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_system_sound_id_vibrate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3762
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kUserPreferredAlert
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_349get_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_348get_user_preferred_alert, "get_user_preferred_alert()\n\nGet the user preferred alert for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_349get_user_preferred_alert = {"get_user_preferred_alert", (PyCFunction)__pyx_pw_9coremusic_4capi_349get_user_preferred_alert, METH_NOARGS, __pyx_doc_9coremusic_4capi_348get_user_preferred_alert};
static PyObject *__pyx_pw_9coremusic_4capi_349get_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_preferred_alert (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_348get_user_preferred_alert(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_348get_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_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_user_preferred_alert", 0);

  /* "coremusic/capi.pyx":3764
 * def get_user_preferred_alert():
 *     """Get the user preferred alert for an audio services"""
 *     return at.kUserPreferredAlert             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_property_is_ui_sound():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kUserPreferredAlert); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3762
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kUserPreferredAlert
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_user_preferred_alert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3766
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     """Get the is ui sound for an audio services"""
 *     return at.kAudioServicesPropertyIsUISound
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_351get_audio_services_property_is_ui_sound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_350get_audio_services_property_is_ui_sound, "get_audio_services_property_is_ui_sound()\n\nGet the is ui sound for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_351get_audio_services_property_is_ui_sound = {"get_audio_services_property_is_ui_sound", (PyCFunction)__pyx_pw_9coremusic_4capi_351get_audio_services_property_is_ui_sound, METH_NOARGS, __pyx_doc_9coremusic_4capi_350get_audio_services_property_is_ui_sound};
static PyObject *__pyx_pw_9coremusic_4capi_351get_audio_services_property_is_ui_sound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_property_is_ui_sound (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_350get_audio_services_property_is_ui_sound(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_350get_audio_services_property_is_ui_sound(CYTHON_UNUSED PyObject *__pyx_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_audio_services_property_is_ui_sound", 0);

  /* "coremusic/capi.pyx":3768
 * def get_audio_services_property_is_ui_sound():
 *     """Get the is ui sound for an audio services"""
 *     return at.kAudioServicesPropertyIsUISound             # <<<<<<<<<<<<<<
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesPropertyIsUISound); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3766
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     """Get the is ui sound for an audio services"""
 *     return at.kAudioServicesPropertyIsUISound
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_property_is_ui_sound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3770
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     """Get the complete playback if app dies for an audio services"""
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_353get_audio_services_property_complete_playback_if_app_dies(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_352get_audio_services_property_complete_playback_if_app_dies, "get_audio_services_property_complete_playback_if_app_dies()\n\nGet the complete playback if app dies for an audio services");
static PyMethodDef __pyx_mdef_9coremusic_4capi_353get_audio_services_property_complete_playback_if_app_dies = {"get_audio_services_property_complete_playback_if_app_dies", (PyCFunction)__pyx_pw_9coremusic_4capi_353get_audio_services_property_complete_playback_if_app_dies, METH_NOARGS, __pyx_doc_9coremusic_4capi_352get_audio_services_property_complete_playback_if_app_dies};
static PyObject *__pyx_pw_9coremusic_4capi_353get_audio_services_property_complete_playback_if_app_dies(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_audio_services_property_complete_playback_if_app_dies (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_352get_audio_services_property_complete_playback_if_app_dies(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_352get_audio_services_property_complete_playback_if_app_dies(CYTHON_UNUSED PyObject *__pyx_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_audio_services_property_complete_playback_if_app_dies", 0);

  /* "coremusic/capi.pyx":3772
 * def get_audio_services_property_complete_playback_if_app_dies():
 *     """Get the complete playback if app dies for an audio services"""
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioServicesPropertyCompletePlaybackIfAppDies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3770
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     """Get the complete playback if app dies for an audio services"""
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_audio_services_property_complete_playback_if_app_dies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3775
 * 
 * 
 * def test_error() -> int:             # <<<<<<<<<<<<<<
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_355test_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_354test_error, "test_error() -> int\n\nTest function to verify the module works");
static PyMethodDef __pyx_mdef_9coremusic_4capi_355test_error = {"test_error", (PyCFunction)__pyx_pw_9coremusic_4capi_355test_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_354test_error};
static PyObject *__pyx_pw_9coremusic_4capi_355test_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_354test_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_354test_error(CYTHON_UNUSED PyObject *__pyx_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("test_error", 0);

  /* "coremusic/capi.pyx":3777
 * def test_error() -> int:
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudio_UnimplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 3777, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3775
 * 
 * 
 * def test_error() -> int:             # <<<<<<<<<<<<<<
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.test_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3782
 * # ===== MusicDevice API =====
 * 
 * def music_device_midi_event(long unit, int status, int data1, int data2, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Send a MIDI channel message to a music device audio unit.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_357music_device_midi_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_356music_device_midi_event, "music_device_midi_event(long unit, int status, int data1, int data2, int offset_sample_frame=0)\n\nSend a MIDI channel message to a music device audio unit.\n\nArgs:\n    unit: The MusicDeviceComponent (AudioComponentInstance)\n    status: MIDI status byte (includes channel and command)\n    data1: First MIDI data byte (0-127)\n    data2: Second MIDI data byte (0-127), or 0 if not needed\n    offset_sample_frame: Sample offset for scheduling (default 0)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If the MIDI event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_357music_device_midi_event = {"music_device_midi_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_357music_device_midi_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_356music_device_midi_event};
static PyObject *__pyx_pw_9coremusic_4capi_357music_device_midi_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_unit;
  int __pyx_v_status;
  int __pyx_v_data1;
  int __pyx_v_data2;
  int __pyx_v_offset_sample_frame;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_device_midi_event (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_data1,&__pyx_mstate_global->__pyx_n_u_data2,&__pyx_mstate_global->__pyx_n_u_offset_sample_frame,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3782, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_device_midi_event", 0) < (0)) __PYX_ERR(0, 3782, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_device_midi_event", 0, 4, 5, i); __PYX_ERR(0, 3782, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3782, __pyx_L3_error)
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3782, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3782, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3782, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_unit = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_unit == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_offset_sample_frame = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_offset_sample_frame == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L3_error)
    } else {
      __pyx_v_offset_sample_frame = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_device_midi_event", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 3782, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_device_midi_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_356music_device_midi_event(__pyx_self, __pyx_v_unit, __pyx_v_status, __pyx_v_data1, __pyx_v_data2, __pyx_v_offset_sample_frame);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_356music_device_midi_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2, int __pyx_v_offset_sample_frame) {
  OSStatus __pyx_v_status_result;
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_device_midi_event", 0);

  /* "coremusic/capi.pyx":3798
 *         RuntimeError: If the MIDI event fails
 *     """
 *     cdef cf.OSStatus status_result = at.MusicDeviceMIDIEvent(             # <<<<<<<<<<<<<<
 *         <at.MusicDeviceComponent>unit,
 *         <cf.UInt32>status,
*/
  __pyx_v_status_result = MusicDeviceMIDIEvent(((MusicDeviceComponent)__pyx_v_unit), ((UInt32)__pyx_v_status), ((UInt32)__pyx_v_data1), ((UInt32)__pyx_v_data2), ((UInt32)__pyx_v_offset_sample_frame));

  /* "coremusic/capi.pyx":3805
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")
 *     return status_result
*/
  __pyx_t_1 = (__pyx_v_status_result != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3806
 * 
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")             # <<<<<<<<<<<<<<
 *     return status_result
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status_result, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicDeviceMIDIEvent_failed_with, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3806, __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_ERR(0, 3806, __pyx_L1_error)

    /* "coremusic/capi.pyx":3805
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")
 *     return status_result
*/
  }

  /* "coremusic/capi.pyx":3807
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")
 *     return status_result             # <<<<<<<<<<<<<<
 * 
 * def music_device_sysex(long unit, bytes data):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3782
 * # ===== MusicDevice API =====
 * 
 * def music_device_midi_event(long unit, int status, int data1, int data2, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Send a MIDI channel message to a music device audio unit.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.music_device_midi_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3809
 *     return status_result
 * 
 * def music_device_sysex(long unit, bytes data):             # <<<<<<<<<<<<<<
 *     """Send a System Exclusive MIDI message to a music device audio unit.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_359music_device_sysex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_358music_device_sysex, "music_device_sysex(long unit, bytes data)\n\nSend a System Exclusive MIDI message to a music device audio unit.\n\nArgs:\n    unit: The MusicDeviceComponent (AudioComponentInstance)\n    data: Complete MIDI SysEx message including F0 and F7 bytes\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If the SysEx message fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_359music_device_sysex = {"music_device_sysex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_359music_device_sysex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_358music_device_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_359music_device_sysex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_unit;
  PyObject *__pyx_v_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_device_sysex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3809, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3809, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3809, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_device_sysex", 0) < (0)) __PYX_ERR(0, 3809, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_device_sysex", 1, 2, 2, i); __PYX_ERR(0, 3809, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3809, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3809, __pyx_L3_error)
    }
    __pyx_v_unit = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_unit == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3809, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_device_sysex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3809, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_device_sysex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 3809, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_358music_device_sysex(__pyx_self, __pyx_v_unit, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_358music_device_sysex(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, PyObject *__pyx_v_data) {
  UInt8 const *__pyx_v_data_ptr;
  UInt32 __pyx_v_length;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_device_sysex", 0);

  /* "coremusic/capi.pyx":3822
 *         RuntimeError: If the SysEx message fails
 *     """
 *     cdef const cf.UInt8* data_ptr = <const cf.UInt8*><char*>data             # <<<<<<<<<<<<<<
 *     cdef cf.UInt32 length = len(data)
 * 
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 3822, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 3822, __pyx_L1_error)
  __pyx_v_data_ptr = ((UInt8 const *)((char *)__pyx_t_1));

  /* "coremusic/capi.pyx":3823
 *     """
 *     cdef const cf.UInt8* data_ptr = <const cf.UInt8*><char*>data
 *     cdef cf.UInt32 length = len(data)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.MusicDeviceSysEx(
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3823, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3823, __pyx_L1_error)
  __pyx_v_length = __pyx_t_2;

  /* "coremusic/capi.pyx":3825
 *     cdef cf.UInt32 length = len(data)
 * 
 *     cdef cf.OSStatus status = at.MusicDeviceSysEx(             # <<<<<<<<<<<<<<
 *         <at.MusicDeviceComponent>unit,
 *         data_ptr,
*/
  __pyx_v_status = MusicDeviceSysEx(((MusicDeviceComponent)__pyx_v_unit), __pyx_v_data_ptr, __pyx_v_length);

  /* "coremusic/capi.pyx":3830
 *         length)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceSysEx"))
 *     return status
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":3831
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceSysEx"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicDeviceSysEx); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3831, __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_ERR(0, 3831, __pyx_L1_error)

    /* "coremusic/capi.pyx":3830
 *         length)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceSysEx"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3832
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceSysEx"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_device_start_note(long unit, int instrument_id, int group_id, float pitch, float velocity, int offset_sample_frame=0, list controls=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3809
 *     return status_result
 * 
 * def music_device_sysex(long unit, bytes data):             # <<<<<<<<<<<<<<
 *     """Send a System Exclusive MIDI message to a music device audio unit.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.music_device_sysex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3834
 *     return status
 * 
 * def music_device_start_note(long unit, int instrument_id, int group_id, float pitch, float velocity, int offset_sample_frame=0, list controls=None):             # <<<<<<<<<<<<<<
 *     """Start a note on a music device audio unit.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_361music_device_start_note(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_360music_device_start_note, "music_device_start_note(long unit, int instrument_id, int group_id, float pitch, float velocity, int offset_sample_frame=0, list controls=None)\n\nStart a note on a music device audio unit.\n\nArgs:\n    unit: The MusicDeviceComponent (AudioComponentInstance)\n    instrument_id: Instrument ID (use kMusicNoteEvent_Unused for current patch)\n    group_id: Group/channel ID (0-based)\n    pitch: MIDI pitch (0-127, can be fractional)\n    velocity: MIDI velocity (0-127, can be fractional)\n    offset_sample_frame: Sample offset for scheduling (default 0)\n    controls: Optional list of (parameter_id, value) tuples for additional controls\n\nReturns:\n    NoteInstanceID token for stopping the note\n\nRaises:\n    RuntimeError: If starting the note fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_361music_device_start_note = {"music_device_start_note", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_361music_device_start_note, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_360music_device_start_note};
static PyObject *__pyx_pw_9coremusic_4capi_361music_device_start_note(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_unit;
  int __pyx_v_instrument_id;
  int __pyx_v_group_id;
  float __pyx_v_pitch;
  float __pyx_v_velocity;
  int __pyx_v_offset_sample_frame;
  PyObject *__pyx_v_controls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_device_start_note (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_instrument_id,&__pyx_mstate_global->__pyx_n_u_group_id,&__pyx_mstate_global->__pyx_n_u_pitch,&__pyx_mstate_global->__pyx_n_u_velocity,&__pyx_mstate_global->__pyx_n_u_offset_sample_frame,&__pyx_mstate_global->__pyx_n_u_controls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3834, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_device_start_note", 0) < (0)) __PYX_ERR(0, 3834, __pyx_L3_error)
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_device_start_note", 0, 5, 7, i); __PYX_ERR(0, 3834, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3834, __pyx_L3_error)
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3834, __pyx_L3_error)
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3834, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3834, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3834, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)Py_None));
    }
    __pyx_v_unit = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_unit == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    __pyx_v_instrument_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_instrument_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    __pyx_v_group_id = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_group_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    if (values[5]) {
      __pyx_v_offset_sample_frame = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_offset_sample_frame == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3834, __pyx_L3_error)
    } else {
      __pyx_v_offset_sample_frame = ((int)((int)0));
    }
    __pyx_v_controls = ((PyObject*)values[6]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_device_start_note", 0, 5, 7, __pyx_nargs); __PYX_ERR(0, 3834, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_device_start_note", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controls), (&PyList_Type), 1, "controls", 1))) __PYX_ERR(0, 3834, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_360music_device_start_note(__pyx_self, __pyx_v_unit, __pyx_v_instrument_id, __pyx_v_group_id, __pyx_v_pitch, __pyx_v_velocity, __pyx_v_offset_sample_frame, __pyx_v_controls);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_360music_device_start_note(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_instrument_id, int __pyx_v_group_id, float __pyx_v_pitch, float __pyx_v_velocity, int __pyx_v_offset_sample_frame, PyObject *__pyx_v_controls) {
  NoteInstanceID __pyx_v_note_instance_id;
  MusicDeviceNoteParams *__pyx_v_params;
  UInt32 __pyx_v_arg_count;
  int __pyx_v_num_controls;
  OSStatus __pyx_v_status;
  size_t __pyx_v_params_size;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_param_id = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  AudioUnitParameterID __pyx_t_11;
  AudioUnitParameterValue __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  char const *__pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_device_start_note", 0);

  /* "coremusic/capi.pyx":3854
 *     cdef at.NoteInstanceID note_instance_id
 *     cdef at.MusicDeviceNoteParams* params
 *     cdef cf.UInt32 arg_count = 2  # pitch + velocity             # <<<<<<<<<<<<<<
 *     cdef int num_controls = 0
 *     cdef cf.OSStatus status
*/
  __pyx_v_arg_count = 2;

  /* "coremusic/capi.pyx":3855
 *     cdef at.MusicDeviceNoteParams* params
 *     cdef cf.UInt32 arg_count = 2  # pitch + velocity
 *     cdef int num_controls = 0             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_v_num_controls = 0;

  /* "coremusic/capi.pyx":3858
 *     cdef cf.OSStatus status
 * 
 *     if controls:             # <<<<<<<<<<<<<<
 *         num_controls = len(controls)
 *         arg_count += num_controls
*/
  if (__pyx_v_controls == Py_None) __pyx_t_1 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_controls);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 3858, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":3859
 * 
 *     if controls:
 *         num_controls = len(controls)             # <<<<<<<<<<<<<<
 *         arg_count += num_controls
 * 
*/
    if (unlikely(__pyx_v_controls == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 3859, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_controls); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3859, __pyx_L1_error)
    __pyx_v_num_controls = __pyx_t_2;

    /* "coremusic/capi.pyx":3860
 *     if controls:
 *         num_controls = len(controls)
 *         arg_count += num_controls             # <<<<<<<<<<<<<<
 * 
 *     # Allocate memory for note parameters
*/
    __pyx_v_arg_count = (__pyx_v_arg_count + __pyx_v_num_controls);

    /* "coremusic/capi.pyx":3858
 *     cdef cf.OSStatus status
 * 
 *     if controls:             # <<<<<<<<<<<<<<
 *         num_controls = len(controls)
 *         arg_count += num_controls
*/
  }

  /* "coremusic/capi.pyx":3863
 * 
 *     # Allocate memory for note parameters
 *     cdef size_t params_size = sizeof(at.MusicDeviceNoteParams) + (num_controls - 1) * sizeof(at.NoteParamsControlValue)             # <<<<<<<<<<<<<<
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)
 *     if not params:
*/
  __pyx_v_params_size = ((sizeof(MusicDeviceNoteParams)) + ((__pyx_v_num_controls - 1) * (sizeof(NoteParamsControlValue))));

  /* "coremusic/capi.pyx":3864
 *     # Allocate memory for note parameters
 *     cdef size_t params_size = sizeof(at.MusicDeviceNoteParams) + (num_controls - 1) * sizeof(at.NoteParamsControlValue)
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)             # <<<<<<<<<<<<<<
 *     if not params:
 *         raise MemoryError("Could not allocate memory for note parameters")
*/
  __pyx_v_params = ((MusicDeviceNoteParams *)malloc(__pyx_v_params_size));

  /* "coremusic/capi.pyx":3865
 *     cdef size_t params_size = sizeof(at.MusicDeviceNoteParams) + (num_controls - 1) * sizeof(at.NoteParamsControlValue)
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)
 *     if not params:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for note parameters")
 * 
*/
  __pyx_t_1 = (!(__pyx_v_params != 0));
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3866
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)
 *     if not params:
 *         raise MemoryError("Could not allocate memory for note parameters")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_memory_for_no};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3866, __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_ERR(0, 3866, __pyx_L1_error)

    /* "coremusic/capi.pyx":3865
 *     cdef size_t params_size = sizeof(at.MusicDeviceNoteParams) + (num_controls - 1) * sizeof(at.NoteParamsControlValue)
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)
 *     if not params:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate memory for note parameters")
 * 
*/
  }

  /* "coremusic/capi.pyx":3868
 *         raise MemoryError("Could not allocate memory for note parameters")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         params.argCount = arg_count
 *         params.mPitch = pitch
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3869
 * 
 *     try:
 *         params.argCount = arg_count             # <<<<<<<<<<<<<<
 *         params.mPitch = pitch
 *         params.mVelocity = velocity
*/
    __pyx_v_params->argCount = __pyx_v_arg_count;

    /* "coremusic/capi.pyx":3870
 *     try:
 *         params.argCount = arg_count
 *         params.mPitch = pitch             # <<<<<<<<<<<<<<
 *         params.mVelocity = velocity
 * 
*/
    __pyx_v_params->mPitch = __pyx_v_pitch;

    /* "coremusic/capi.pyx":3871
 *         params.argCount = arg_count
 *         params.mPitch = pitch
 *         params.mVelocity = velocity             # <<<<<<<<<<<<<<
 * 
 *         # Add control parameters if provided
*/
    __pyx_v_params->mVelocity = __pyx_v_velocity;

    /* "coremusic/capi.pyx":3874
 * 
 *         # Add control parameters if provided
 *         if controls:             # <<<<<<<<<<<<<<
 *             for i, (param_id, value) in enumerate(controls):
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id
*/
    if (__pyx_v_controls == Py_None) __pyx_t_1 = 0;
    else
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_controls);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 3874, __pyx_L6_error)
      __pyx_t_1 = (__pyx_temp != 0);
    }

    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":3875
 *         # Add control parameters if provided
 *         if controls:
 *             for i, (param_id, value) in enumerate(controls):             # <<<<<<<<<<<<<<
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id
 *                 params.mControls[i].mValue = <at.AudioUnitParameterValue>value
*/
      __pyx_t_2 = 0;
      __pyx_t_3 = __pyx_v_controls; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3875, __pyx_L6_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_6;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 3875, __pyx_L6_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_7);
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_8);
          } else {
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3875, __pyx_L6_error)
            __Pyx_XGOTREF(__pyx_t_7);
            __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3875, __pyx_L6_error)
            __Pyx_XGOTREF(__pyx_t_8);
          }
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3875, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3875, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3875, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
          index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 3875, __pyx_L6_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L12_unpacking_done;
          __pyx_L11_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 3875, __pyx_L6_error)
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_param_id, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_v_i = __pyx_t_2;
        __pyx_t_2 = (__pyx_t_2 + 1);

        /* "coremusic/capi.pyx":3876
 *         if controls:
 *             for i, (param_id, value) in enumerate(controls):
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id             # <<<<<<<<<<<<<<
 *                 params.mControls[i].mValue = <at.AudioUnitParameterValue>value
 * 
*/
        __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_v_param_id); if (unlikely((__pyx_t_11 == ((AudioUnitParameterID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3876, __pyx_L6_error)
        (__pyx_v_params->mControls[__pyx_v_i]).mID = ((AudioUnitParameterID)__pyx_t_11);

        /* "coremusic/capi.pyx":3877
 *             for i, (param_id, value) in enumerate(controls):
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id
 *                 params.mControls[i].mValue = <at.AudioUnitParameterValue>value             # <<<<<<<<<<<<<<
 * 
 *         status = at.MusicDeviceStartNote(
*/
        __pyx_t_12 = __Pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_12 == ((AudioUnitParameterValue)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3877, __pyx_L6_error)
        (__pyx_v_params->mControls[__pyx_v_i]).mValue = ((AudioUnitParameterValue)__pyx_t_12);

        /* "coremusic/capi.pyx":3875
 *         # Add control parameters if provided
 *         if controls:
 *             for i, (param_id, value) in enumerate(controls):             # <<<<<<<<<<<<<<
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id
 *                 params.mControls[i].mValue = <at.AudioUnitParameterValue>value
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "coremusic/capi.pyx":3874
 * 
 *         # Add control parameters if provided
 *         if controls:             # <<<<<<<<<<<<<<
 *             for i, (param_id, value) in enumerate(controls):
 *                 params.mControls[i].mID = <at.AudioUnitParameterID>param_id
*/
    }

    /* "coremusic/capi.pyx":3879
 *                 params.mControls[i].mValue = <at.AudioUnitParameterValue>value
 * 
 *         status = at.MusicDeviceStartNote(             # <<<<<<<<<<<<<<
 *             <at.MusicDeviceComponent>unit,
 *             <at.MusicDeviceInstrumentID>instrument_id,
*/
    __pyx_v_status = MusicDeviceStartNote(((MusicDeviceComponent)__pyx_v_unit), ((MusicDeviceInstrumentID)__pyx_v_instrument_id), ((MusicDeviceGroupID)__pyx_v_group_id), (&__pyx_v_note_instance_id), ((UInt32)__pyx_v_offset_sample_frame), __pyx_v_params);

    /* "coremusic/capi.pyx":3887
 *             params)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MusicDeviceStartNote"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":3888
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MusicDeviceStartNote"))             # <<<<<<<<<<<<<<
 * 
 *         return <long>note_instance_id
*/
      __pyx_t_4 = NULL;
      __pyx_t_8 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicDeviceStartNote); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3888, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3888, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 3888, __pyx_L6_error)

      /* "coremusic/capi.pyx":3887
 *             params)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MusicDeviceStartNote"))
 * 
*/
    }

    /* "coremusic/capi.pyx":3890
 *             raise RuntimeError(format_osstatus_error(status, "MusicDeviceStartNote"))
 * 
 *         return <long>note_instance_id             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_note_instance_id)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3890, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":3893
 * 
 *     finally:
 *         free(params)             # <<<<<<<<<<<<<<
 * 
 * def music_device_stop_note(long unit, int group_id, long note_instance_id, int offset_sample_frame=0):
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
      {
        free(__pyx_v_params);
      }
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
      __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
      __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_params);
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3834
 *     return status
 * 
 * def music_device_start_note(long unit, int instrument_id, int group_id, float pitch, float velocity, int offset_sample_frame=0, list controls=None):             # <<<<<<<<<<<<<<
 *     """Start a note on a music device audio unit.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.music_device_start_note", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_param_id);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3895
 *         free(params)
 * 
 * def music_device_stop_note(long unit, int group_id, long note_instance_id, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Stop a note that was started with music_device_start_note.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_363music_device_stop_note(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_362music_device_stop_note, "music_device_stop_note(long unit, int group_id, long note_instance_id, int offset_sample_frame=0)\n\nStop a note that was started with music_device_start_note.\n\nArgs:\n    unit: The MusicDeviceComponent (AudioComponentInstance)\n    group_id: Group/channel ID that the note was started on\n    note_instance_id: Token returned by music_device_start_note\n    offset_sample_frame: Sample offset for scheduling (default 0)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If stopping the note fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_363music_device_stop_note = {"music_device_stop_note", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_363music_device_stop_note, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_362music_device_stop_note};
static PyObject *__pyx_pw_9coremusic_4capi_363music_device_stop_note(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_unit;
  int __pyx_v_group_id;
  long __pyx_v_note_instance_id;
  int __pyx_v_offset_sample_frame;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_device_stop_note (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_group_id,&__pyx_mstate_global->__pyx_n_u_note_instance_id,&__pyx_mstate_global->__pyx_n_u_offset_sample_frame,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3895, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_device_stop_note", 0) < (0)) __PYX_ERR(0, 3895, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_device_stop_note", 0, 3, 4, i); __PYX_ERR(0, 3895, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3895, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3895, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3895, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_unit = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_unit == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
    __pyx_v_group_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_group_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
    __pyx_v_note_instance_id = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_note_instance_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_offset_sample_frame = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_offset_sample_frame == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
    } else {
      __pyx_v_offset_sample_frame = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_device_stop_note", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 3895, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_device_stop_note", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_362music_device_stop_note(__pyx_self, __pyx_v_unit, __pyx_v_group_id, __pyx_v_note_instance_id, __pyx_v_offset_sample_frame);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_362music_device_stop_note(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, int __pyx_v_group_id, long __pyx_v_note_instance_id, int __pyx_v_offset_sample_frame) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_device_stop_note", 0);

  /* "coremusic/capi.pyx":3910
 *         RuntimeError: If stopping the note fails
 *     """
 *     cdef cf.OSStatus status = at.MusicDeviceStopNote(             # <<<<<<<<<<<<<<
 *         <at.MusicDeviceComponent>unit,
 *         <at.MusicDeviceGroupID>group_id,
*/
  __pyx_v_status = MusicDeviceStopNote(((MusicDeviceComponent)__pyx_v_unit), ((MusicDeviceGroupID)__pyx_v_group_id), ((NoteInstanceID)__pyx_v_note_instance_id), ((UInt32)__pyx_v_offset_sample_frame));

  /* "coremusic/capi.pyx":3916
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceStopNote"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3917
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceStopNote"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicDeviceStopNote); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3917, __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_ERR(0, 3917, __pyx_L1_error)

    /* "coremusic/capi.pyx":3916
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceStopNote"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3918
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicDeviceStopNote"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * # Convenience functions for creating standard note parameters
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3895
 *         free(params)
 * 
 * def music_device_stop_note(long unit, int group_id, long note_instance_id, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Stop a note that was started with music_device_start_note.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_device_stop_note", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3922
 * # Convenience functions for creating standard note parameters
 * 
 * def create_music_device_std_note_params(float pitch, float velocity):             # <<<<<<<<<<<<<<
 *     """Create standard note parameters with just pitch and velocity.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_365create_music_device_std_note_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_364create_music_device_std_note_params, "create_music_device_std_note_params(float pitch, float velocity)\n\nCreate standard note parameters with just pitch and velocity.\n\nArgs:\n    pitch: MIDI pitch (0-127, can be fractional)\n    velocity: MIDI velocity (0-127, can be fractional)\n\nReturns:\n    Dictionary with argCount, pitch, and velocity");
static PyMethodDef __pyx_mdef_9coremusic_4capi_365create_music_device_std_note_params = {"create_music_device_std_note_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_365create_music_device_std_note_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_364create_music_device_std_note_params};
static PyObject *__pyx_pw_9coremusic_4capi_365create_music_device_std_note_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  float __pyx_v_pitch;
  float __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_music_device_std_note_params (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pitch,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3922, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3922, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3922, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_music_device_std_note_params", 0) < (0)) __PYX_ERR(0, 3922, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_music_device_std_note_params", 1, 2, 2, i); __PYX_ERR(0, 3922, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3922, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3922, __pyx_L3_error)
    }
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3922, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3922, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_music_device_std_note_params", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3922, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.create_music_device_std_note_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_364create_music_device_std_note_params(__pyx_self, __pyx_v_pitch, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_364create_music_device_std_note_params(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_pitch, float __pyx_v_velocity) {
  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("create_music_device_std_note_params", 0);

  /* "coremusic/capi.pyx":3932
 *         Dictionary with argCount, pitch, and velocity
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'argCount': 2,
 *         'pitch': pitch,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":3933
 *     """
 *     return {
 *         'argCount': 2,             # <<<<<<<<<<<<<<
 *         'pitch': pitch,
 *         'velocity': velocity
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_argCount, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 3933, __pyx_L1_error)

  /* "coremusic/capi.pyx":3934
 *     return {
 *         'argCount': 2,
 *         'pitch': pitch,             # <<<<<<<<<<<<<<
 *         'velocity': velocity
 *     }
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_pitch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pitch, __pyx_t_2) < (0)) __PYX_ERR(0, 3933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":3935
 *         'argCount': 2,
 *         'pitch': pitch,
 *         'velocity': velocity             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_velocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_2) < (0)) __PYX_ERR(0, 3933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3922
 * # Convenience functions for creating standard note parameters
 * 
 * def create_music_device_std_note_params(float pitch, float velocity):             # <<<<<<<<<<<<<<
 *     """Create standard note parameters with just pitch and velocity.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.create_music_device_std_note_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3938
 *     }
 * 
 * def create_music_device_note_params(float pitch, float velocity, list controls):             # <<<<<<<<<<<<<<
 *     """Create note parameters with pitch, velocity, and additional controls.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_367create_music_device_note_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_366create_music_device_note_params, "create_music_device_note_params(float pitch, float velocity, list controls)\n\nCreate note parameters with pitch, velocity, and additional controls.\n\nArgs:\n    pitch: MIDI pitch (0-127, can be fractional)\n    velocity: MIDI velocity (0-127, can be fractional)\n    controls: List of (parameter_id, value) tuples\n\nReturns:\n    Dictionary with all note parameters");
static PyMethodDef __pyx_mdef_9coremusic_4capi_367create_music_device_note_params = {"create_music_device_note_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_367create_music_device_note_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_366create_music_device_note_params};
static PyObject *__pyx_pw_9coremusic_4capi_367create_music_device_note_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  float __pyx_v_pitch;
  float __pyx_v_velocity;
  PyObject *__pyx_v_controls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_music_device_note_params (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pitch,&__pyx_mstate_global->__pyx_n_u_velocity,&__pyx_mstate_global->__pyx_n_u_controls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3938, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3938, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3938, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3938, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_music_device_note_params", 0) < (0)) __PYX_ERR(0, 3938, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_music_device_note_params", 1, 3, 3, i); __PYX_ERR(0, 3938, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3938, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3938, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3938, __pyx_L3_error)
    }
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3938, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3938, __pyx_L3_error)
    __pyx_v_controls = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_music_device_note_params", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3938, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.create_music_device_note_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controls), (&PyList_Type), 1, "controls", 1))) __PYX_ERR(0, 3938, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_366create_music_device_note_params(__pyx_self, __pyx_v_pitch, __pyx_v_velocity, __pyx_v_controls);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_366create_music_device_note_params(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_pitch, float __pyx_v_velocity, PyObject *__pyx_v_controls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_music_device_note_params", 0);

  /* "coremusic/capi.pyx":3949
 *         Dictionary with all note parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'argCount': 2 + len(controls),
 *         'pitch': pitch,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":3950
 *     """
 *     return {
 *         'argCount': 2 + len(controls),             # <<<<<<<<<<<<<<
 *         'pitch': pitch,
 *         'velocity': velocity,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_v_controls == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3950, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_controls); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3950, __pyx_L1_error)
  __pyx_t_3 = PyLong_FromSsize_t((2 + __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_argCount, __pyx_t_3) < (0)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3951
 *     return {
 *         'argCount': 2 + len(controls),
 *         'pitch': pitch,             # <<<<<<<<<<<<<<
 *         'velocity': velocity,
 *         'controls': controls
*/
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pitch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pitch, __pyx_t_3) < (0)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3952
 *         'argCount': 2 + len(controls),
 *         'pitch': pitch,
 *         'velocity': velocity,             # <<<<<<<<<<<<<<
 *         'controls': controls
 *     }
*/
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_velocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_3) < (0)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3953
 *         'pitch': pitch,
 *         'velocity': velocity,
 *         'controls': controls             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_controls, __pyx_v_controls) < (0)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3938
 *     }
 * 
 * def create_music_device_note_params(float pitch, float velocity, list controls):             # <<<<<<<<<<<<<<
 *     """Create note parameters with pitch, velocity, and additional controls.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.create_music_device_note_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3958
 * # MusicDevice constants
 * 
 * def get_music_note_event_use_group_instrument():             # <<<<<<<<<<<<<<
 *     """Get the constant for using the current patch for a group."""
 *     return at.kMusicNoteEvent_UseGroupInstrument
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_369get_music_note_event_use_group_instrument(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_368get_music_note_event_use_group_instrument, "get_music_note_event_use_group_instrument()\n\nGet the constant for using the current patch for a group.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_369get_music_note_event_use_group_instrument = {"get_music_note_event_use_group_instrument", (PyCFunction)__pyx_pw_9coremusic_4capi_369get_music_note_event_use_group_instrument, METH_NOARGS, __pyx_doc_9coremusic_4capi_368get_music_note_event_use_group_instrument};
static PyObject *__pyx_pw_9coremusic_4capi_369get_music_note_event_use_group_instrument(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_note_event_use_group_instrument (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_368get_music_note_event_use_group_instrument(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_368get_music_note_event_use_group_instrument(CYTHON_UNUSED PyObject *__pyx_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_music_note_event_use_group_instrument", 0);

  /* "coremusic/capi.pyx":3960
 * def get_music_note_event_use_group_instrument():
 *     """Get the constant for using the current patch for a group."""
 *     return at.kMusicNoteEvent_UseGroupInstrument             # <<<<<<<<<<<<<<
 * 
 * def get_music_note_event_unused():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicNoteEvent_UseGroupInstrument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3958
 * # MusicDevice constants
 * 
 * def get_music_note_event_use_group_instrument():             # <<<<<<<<<<<<<<
 *     """Get the constant for using the current patch for a group."""
 *     return at.kMusicNoteEvent_UseGroupInstrument
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_note_event_use_group_instrument", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3962
 *     return at.kMusicNoteEvent_UseGroupInstrument
 * 
 * def get_music_note_event_unused():             # <<<<<<<<<<<<<<
 *     """Get the constant for unused instrument ID."""
 *     return at.kMusicNoteEvent_Unused
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_371get_music_note_event_unused(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_370get_music_note_event_unused, "get_music_note_event_unused()\n\nGet the constant for unused instrument ID.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_371get_music_note_event_unused = {"get_music_note_event_unused", (PyCFunction)__pyx_pw_9coremusic_4capi_371get_music_note_event_unused, METH_NOARGS, __pyx_doc_9coremusic_4capi_370get_music_note_event_unused};
static PyObject *__pyx_pw_9coremusic_4capi_371get_music_note_event_unused(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_note_event_unused (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_370get_music_note_event_unused(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_370get_music_note_event_unused(CYTHON_UNUSED PyObject *__pyx_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_music_note_event_unused", 0);

  /* "coremusic/capi.pyx":3964
 * def get_music_note_event_unused():
 *     """Get the constant for unused instrument ID."""
 *     return at.kMusicNoteEvent_Unused             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_range():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicNoteEvent_Unused); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3962
 *     return at.kMusicNoteEvent_UseGroupInstrument
 * 
 * def get_music_note_event_unused():             # <<<<<<<<<<<<<<
 *     """Get the constant for unused instrument ID."""
 *     return at.kMusicNoteEvent_Unused
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_note_event_unused", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3966
 *     return at.kMusicNoteEvent_Unused
 * 
 * def get_music_device_range():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice selector range start."""
 *     return at.kMusicDeviceRange
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_373get_music_device_range(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_372get_music_device_range, "get_music_device_range()\n\nGet the MusicDevice selector range start.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_373get_music_device_range = {"get_music_device_range", (PyCFunction)__pyx_pw_9coremusic_4capi_373get_music_device_range, METH_NOARGS, __pyx_doc_9coremusic_4capi_372get_music_device_range};
static PyObject *__pyx_pw_9coremusic_4capi_373get_music_device_range(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_range (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_372get_music_device_range(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_372get_music_device_range(CYTHON_UNUSED PyObject *__pyx_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_music_device_range", 0);

  /* "coremusic/capi.pyx":3968
 * def get_music_device_range():
 *     """Get the MusicDevice selector range start."""
 *     return at.kMusicDeviceRange             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_midi_event_select():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceRange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3966
 *     return at.kMusicNoteEvent_Unused
 * 
 * def get_music_device_range():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice selector range start."""
 *     return at.kMusicDeviceRange
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3970
 *     return at.kMusicDeviceRange
 * 
 * def get_music_device_midi_event_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event selector."""
 *     return at.kMusicDeviceMIDIEventSelect
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_375get_music_device_midi_event_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_374get_music_device_midi_event_select, "get_music_device_midi_event_select()\n\nGet the MusicDevice MIDI event selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_375get_music_device_midi_event_select = {"get_music_device_midi_event_select", (PyCFunction)__pyx_pw_9coremusic_4capi_375get_music_device_midi_event_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_374get_music_device_midi_event_select};
static PyObject *__pyx_pw_9coremusic_4capi_375get_music_device_midi_event_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_midi_event_select (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_374get_music_device_midi_event_select(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_374get_music_device_midi_event_select(CYTHON_UNUSED PyObject *__pyx_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_music_device_midi_event_select", 0);

  /* "coremusic/capi.pyx":3972
 * def get_music_device_midi_event_select():
 *     """Get the MusicDevice MIDI event selector."""
 *     return at.kMusicDeviceMIDIEventSelect             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_sysex_select():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceMIDIEventSelect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3970
 *     return at.kMusicDeviceRange
 * 
 * def get_music_device_midi_event_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event selector."""
 *     return at.kMusicDeviceMIDIEventSelect
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_midi_event_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3974
 *     return at.kMusicDeviceMIDIEventSelect
 * 
 * def get_music_device_sysex_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice SysEx selector."""
 *     return at.kMusicDeviceSysExSelect
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_377get_music_device_sysex_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_376get_music_device_sysex_select, "get_music_device_sysex_select()\n\nGet the MusicDevice SysEx selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_377get_music_device_sysex_select = {"get_music_device_sysex_select", (PyCFunction)__pyx_pw_9coremusic_4capi_377get_music_device_sysex_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_376get_music_device_sysex_select};
static PyObject *__pyx_pw_9coremusic_4capi_377get_music_device_sysex_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_sysex_select (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_376get_music_device_sysex_select(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_376get_music_device_sysex_select(CYTHON_UNUSED PyObject *__pyx_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_music_device_sysex_select", 0);

  /* "coremusic/capi.pyx":3976
 * def get_music_device_sysex_select():
 *     """Get the MusicDevice SysEx selector."""
 *     return at.kMusicDeviceSysExSelect             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_start_note_select():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceSysExSelect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3974
 *     return at.kMusicDeviceMIDIEventSelect
 * 
 * def get_music_device_sysex_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice SysEx selector."""
 *     return at.kMusicDeviceSysExSelect
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_sysex_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3978
 *     return at.kMusicDeviceSysExSelect
 * 
 * def get_music_device_start_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice start note selector."""
 *     return at.kMusicDeviceStartNoteSelect
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_379get_music_device_start_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_378get_music_device_start_note_select, "get_music_device_start_note_select()\n\nGet the MusicDevice start note selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_379get_music_device_start_note_select = {"get_music_device_start_note_select", (PyCFunction)__pyx_pw_9coremusic_4capi_379get_music_device_start_note_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_378get_music_device_start_note_select};
static PyObject *__pyx_pw_9coremusic_4capi_379get_music_device_start_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_start_note_select (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_378get_music_device_start_note_select(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_378get_music_device_start_note_select(CYTHON_UNUSED PyObject *__pyx_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_music_device_start_note_select", 0);

  /* "coremusic/capi.pyx":3980
 * def get_music_device_start_note_select():
 *     """Get the MusicDevice start note selector."""
 *     return at.kMusicDeviceStartNoteSelect             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_stop_note_select():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceStartNoteSelect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3978
 *     return at.kMusicDeviceSysExSelect
 * 
 * def get_music_device_start_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice start note selector."""
 *     return at.kMusicDeviceStartNoteSelect
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_start_note_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3982
 *     return at.kMusicDeviceStartNoteSelect
 * 
 * def get_music_device_stop_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice stop note selector."""
 *     return at.kMusicDeviceStopNoteSelect
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_381get_music_device_stop_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_380get_music_device_stop_note_select, "get_music_device_stop_note_select()\n\nGet the MusicDevice stop note selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_381get_music_device_stop_note_select = {"get_music_device_stop_note_select", (PyCFunction)__pyx_pw_9coremusic_4capi_381get_music_device_stop_note_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_380get_music_device_stop_note_select};
static PyObject *__pyx_pw_9coremusic_4capi_381get_music_device_stop_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_stop_note_select (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_380get_music_device_stop_note_select(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_380get_music_device_stop_note_select(CYTHON_UNUSED PyObject *__pyx_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_music_device_stop_note_select", 0);

  /* "coremusic/capi.pyx":3984
 * def get_music_device_stop_note_select():
 *     """Get the MusicDevice stop note selector."""
 *     return at.kMusicDeviceStopNoteSelect             # <<<<<<<<<<<<<<
 * 
 * def get_music_device_midi_event_list_select():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceStopNoteSelect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3982
 *     return at.kMusicDeviceStartNoteSelect
 * 
 * def get_music_device_stop_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice stop note selector."""
 *     return at.kMusicDeviceStopNoteSelect
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_stop_note_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3986
 *     return at.kMusicDeviceStopNoteSelect
 * 
 * def get_music_device_midi_event_list_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event list selector."""
 *     return at.kMusicDeviceMIDIEventListSelect
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_383get_music_device_midi_event_list_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_382get_music_device_midi_event_list_select, "get_music_device_midi_event_list_select()\n\nGet the MusicDevice MIDI event list selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_383get_music_device_midi_event_list_select = {"get_music_device_midi_event_list_select", (PyCFunction)__pyx_pw_9coremusic_4capi_383get_music_device_midi_event_list_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_382get_music_device_midi_event_list_select};
static PyObject *__pyx_pw_9coremusic_4capi_383get_music_device_midi_event_list_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_device_midi_event_list_select (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_382get_music_device_midi_event_list_select(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_382get_music_device_midi_event_list_select(CYTHON_UNUSED PyObject *__pyx_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_music_device_midi_event_list_select", 0);

  /* "coremusic/capi.pyx":3988
 * def get_music_device_midi_event_list_select():
 *     """Get the MusicDevice MIDI event list selector."""
 *     return at.kMusicDeviceMIDIEventListSelect             # <<<<<<<<<<<<<<
 * 
 * # Helper functions for MIDI data
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicDeviceMIDIEventListSelect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3986
 *     return at.kMusicDeviceStopNoteSelect
 * 
 * def get_music_device_midi_event_list_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event list selector."""
 *     return at.kMusicDeviceMIDIEventListSelect
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_device_midi_event_list_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":3992
 * # Helper functions for MIDI data
 * 
 * def midi_note_on(int channel, int note, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note On status byte.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_385midi_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_384midi_note_on, "midi_note_on(int channel, int note, int velocity)\n\nCreate a MIDI Note On status byte.\n\nArgs:\n    channel: MIDI channel (0-15)\n    note: MIDI note number (0-127)\n    velocity: MIDI velocity (0-127)\n\nReturns:\n    Tuple of (status, data1, data2)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_385midi_note_on = {"midi_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_385midi_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_384midi_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_385midi_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_note;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_note_on (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3992, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3992, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3992, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3992, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_note_on", 0) < (0)) __PYX_ERR(0, 3992, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_note_on", 1, 3, 3, i); __PYX_ERR(0, 3992, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3992, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3992, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3992, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3992, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3992, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3992, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_note_on", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3992, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_384midi_note_on(__pyx_self, __pyx_v_channel, __pyx_v_note, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_384midi_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity) {
  long __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_note_on", 0);

  /* "coremusic/capi.pyx":4003
 *         Tuple of (status, data1, data2)
 *     """
 *     status = 0x90 | (channel & 0x0F)  # Note On + channel             # <<<<<<<<<<<<<<
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
*/
  __pyx_v_status = (0x90 | (__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4004
 *     """
 *     status = 0x90 | (channel & 0x0F)  # Note On + channel
 *     return (status, note & 0x7F, velocity & 0x7F)             # <<<<<<<<<<<<<<
 * 
 * def midi_note_off(int channel, int note, int velocity=0):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_note & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_velocity & 0x7F)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4004, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4004, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 4004, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3992
 * # Helper functions for MIDI data
 * 
 * def midi_note_on(int channel, int note, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note On status byte.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4006
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_note_off(int channel, int note, int velocity=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note Off status byte.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_387midi_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_386midi_note_off, "midi_note_off(int channel, int note, int velocity=0)\n\nCreate a MIDI Note Off status byte.\n\nArgs:\n    channel: MIDI channel (0-15)\n    note: MIDI note number (0-127)\n    velocity: MIDI velocity (0-127, default 0)\n\nReturns:\n    Tuple of (status, data1, data2)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_387midi_note_off = {"midi_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_387midi_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_386midi_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_387midi_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_note;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_note_off (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4006, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_note_off", 0) < (0)) __PYX_ERR(0, 4006, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_note_off", 0, 2, 3, i); __PYX_ERR(0, 4006, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4006, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4006, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4006, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_velocity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    } else {
      __pyx_v_velocity = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_note_off", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4006, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_386midi_note_off(__pyx_self, __pyx_v_channel, __pyx_v_note, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_386midi_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity) {
  long __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_note_off", 0);

  /* "coremusic/capi.pyx":4017
 *         Tuple of (status, data1, data2)
 *     """
 *     status = 0x80 | (channel & 0x0F)  # Note Off + channel             # <<<<<<<<<<<<<<
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
*/
  __pyx_v_status = (0x80 | (__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4018
 *     """
 *     status = 0x80 | (channel & 0x0F)  # Note Off + channel
 *     return (status, note & 0x7F, velocity & 0x7F)             # <<<<<<<<<<<<<<
 * 
 * def midi_control_change(int channel, int controller, int value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_note & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_velocity & 0x7F)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4018, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4018, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 4018, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4006
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_note_off(int channel, int note, int velocity=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note Off status byte.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4020
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_control_change(int channel, int controller, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Control Change message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_389midi_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_388midi_control_change, "midi_control_change(int channel, int controller, int value)\n\nCreate a MIDI Control Change message.\n\nArgs:\n    channel: MIDI channel (0-15)\n    controller: Controller number (0-127)\n    value: Controller value (0-127)\n\nReturns:\n    Tuple of (status, data1, data2)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_389midi_control_change = {"midi_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_389midi_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_388midi_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_389midi_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_controller;
  int __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_control_change (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_controller,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4020, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4020, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4020, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4020, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_control_change", 0) < (0)) __PYX_ERR(0, 4020, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_control_change", 1, 3, 3, i); __PYX_ERR(0, 4020, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4020, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4020, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4020, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4020, __pyx_L3_error)
    __pyx_v_controller = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4020, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4020, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_control_change", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4020, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_388midi_control_change(__pyx_self, __pyx_v_channel, __pyx_v_controller, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_388midi_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_controller, int __pyx_v_value) {
  long __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_control_change", 0);

  /* "coremusic/capi.pyx":4031
 *         Tuple of (status, data1, data2)
 *     """
 *     status = 0xB0 | (channel & 0x0F)  # Control Change + channel             # <<<<<<<<<<<<<<
 *     return (status, controller & 0x7F, value & 0x7F)
 * 
*/
  __pyx_v_status = (0xB0 | (__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4032
 *     """
 *     status = 0xB0 | (channel & 0x0F)  # Control Change + channel
 *     return (status, controller & 0x7F, value & 0x7F)             # <<<<<<<<<<<<<<
 * 
 * def midi_program_change(int channel, int program):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_controller & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_value & 0x7F)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4032, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4032, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 4032, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4020
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_control_change(int channel, int controller, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Control Change message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4034
 *     return (status, controller & 0x7F, value & 0x7F)
 * 
 * def midi_program_change(int channel, int program):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Program Change message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_391midi_program_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_390midi_program_change, "midi_program_change(int channel, int program)\n\nCreate a MIDI Program Change message.\n\nArgs:\n    channel: MIDI channel (0-15)\n    program: Program number (0-127)\n\nReturns:\n    Tuple of (status, data1, data2)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_391midi_program_change = {"midi_program_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_391midi_program_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_390midi_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_391midi_program_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_program;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_program_change (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_program,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4034, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4034, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4034, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_program_change", 0) < (0)) __PYX_ERR(0, 4034, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_program_change", 1, 2, 2, i); __PYX_ERR(0, 4034, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4034, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4034, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4034, __pyx_L3_error)
    __pyx_v_program = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_program == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4034, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_program_change", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4034, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_program_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_390midi_program_change(__pyx_self, __pyx_v_channel, __pyx_v_program);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_390midi_program_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_program) {
  long __pyx_v_status;
  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("midi_program_change", 0);

  /* "coremusic/capi.pyx":4044
 *         Tuple of (status, data1, data2)
 *     """
 *     status = 0xC0 | (channel & 0x0F)  # Program Change + channel             # <<<<<<<<<<<<<<
 *     return (status, program & 0x7F, 0)
 * 
*/
  __pyx_v_status = (0xC0 | (__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4045
 *     """
 *     status = 0xC0 | (channel & 0x0F)  # Program Change + channel
 *     return (status, program & 0x7F, 0)             # <<<<<<<<<<<<<<
 * 
 * def midi_pitch_bend(int channel, int value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_program & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4045, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4045, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 4045, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4034
 *     return (status, controller & 0x7F, value & 0x7F)
 * 
 * def midi_program_change(int channel, int program):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Program Change message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi_program_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4047
 *     return (status, program & 0x7F, 0)
 * 
 * def midi_pitch_bend(int channel, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Pitch Bend message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_393midi_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_392midi_pitch_bend, "midi_pitch_bend(int channel, int value)\n\nCreate a MIDI Pitch Bend message.\n\nArgs:\n    channel: MIDI channel (0-15)\n    value: Pitch bend value (0-16383, 8192 = center)\n\nReturns:\n    Tuple of (status, data1, data2)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_393midi_pitch_bend = {"midi_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_393midi_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_392midi_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_393midi_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_pitch_bend (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4047, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4047, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4047, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_pitch_bend", 0) < (0)) __PYX_ERR(0, 4047, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_pitch_bend", 1, 2, 2, i); __PYX_ERR(0, 4047, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4047, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4047, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4047, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4047, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_pitch_bend", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4047, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_392midi_pitch_bend(__pyx_self, __pyx_v_channel, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_392midi_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_value) {
  long __pyx_v_status;
  long __pyx_v_lsb;
  long __pyx_v_msb;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_pitch_bend", 0);

  /* "coremusic/capi.pyx":4057
 *         Tuple of (status, data1, data2)
 *     """
 *     status = 0xE0 | (channel & 0x0F)  # Pitch Bend + channel             # <<<<<<<<<<<<<<
 *     lsb = value & 0x7F
 *     msb = (value >> 7) & 0x7F
*/
  __pyx_v_status = (0xE0 | (__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4058
 *     """
 *     status = 0xE0 | (channel & 0x0F)  # Pitch Bend + channel
 *     lsb = value & 0x7F             # <<<<<<<<<<<<<<
 *     msb = (value >> 7) & 0x7F
 *     return (status, lsb, msb)
*/
  __pyx_v_lsb = (__pyx_v_value & 0x7F);

  /* "coremusic/capi.pyx":4059
 *     status = 0xE0 | (channel & 0x0F)  # Pitch Bend + channel
 *     lsb = value & 0x7F
 *     msb = (value >> 7) & 0x7F             # <<<<<<<<<<<<<<
 *     return (status, lsb, msb)
 * 
*/
  __pyx_v_msb = ((__pyx_v_value >> 7) & 0x7F);

  /* "coremusic/capi.pyx":4060
 *     lsb = value & 0x7F
 *     msb = (value >> 7) & 0x7F
 *     return (status, lsb, msb)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_v_lsb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_msb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4060, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4060, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 4060, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4047
 *     return (status, program & 0x7F, 0)
 * 
 * def midi_pitch_bend(int channel, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Pitch Bend message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4067
 * # MusicPlayer functions
 * 
 * def new_music_player():             # <<<<<<<<<<<<<<
 *     """Create a new music player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_395new_music_player(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_394new_music_player, "new_music_player()\n\nCreate a new music player.\n\nReturns:\n    MusicPlayer handle\n\nRaises:\n    RuntimeError: If player creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_395new_music_player = {"new_music_player", (PyCFunction)__pyx_pw_9coremusic_4capi_395new_music_player, METH_NOARGS, __pyx_doc_9coremusic_4capi_394new_music_player};
static PyObject *__pyx_pw_9coremusic_4capi_395new_music_player(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_music_player (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_394new_music_player(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_394new_music_player(CYTHON_UNUSED PyObject *__pyx_self) {
  MusicPlayer __pyx_v_player;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_music_player", 0);

  /* "coremusic/capi.pyx":4077
 *     """
 *     cdef at.MusicPlayer player
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = NewMusicPlayer((&__pyx_v_player));

  /* "coremusic/capi.pyx":4079
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicPlayer"))
 *     return <long>player
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4080
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicPlayer"))             # <<<<<<<<<<<<<<
 *     return <long>player
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_NewMusicPlayer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4080, __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_ERR(0, 4080, __pyx_L1_error)

    /* "coremusic/capi.pyx":4079
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicPlayer"))
 *     return <long>player
*/
  }

  /* "coremusic/capi.pyx":4081
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicPlayer"))
 *     return <long>player             # <<<<<<<<<<<<<<
 * 
 * def dispose_music_player(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_player)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4067
 * # MusicPlayer functions
 * 
 * def new_music_player():             # <<<<<<<<<<<<<<
 *     """Create a new music player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.new_music_player", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4083
 *     return <long>player
 * 
 * def dispose_music_player(long player):             # <<<<<<<<<<<<<<
 *     """Dispose a music player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_397dispose_music_player(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_396dispose_music_player, "dispose_music_player(long player)\n\nDispose a music player.\n\nArgs:\n    player: The MusicPlayer handle to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_397dispose_music_player = {"dispose_music_player", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_397dispose_music_player, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_396dispose_music_player};
static PyObject *__pyx_pw_9coremusic_4capi_397dispose_music_player(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispose_music_player (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4083, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4083, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dispose_music_player", 0) < (0)) __PYX_ERR(0, 4083, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dispose_music_player", 1, 1, 1, i); __PYX_ERR(0, 4083, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4083, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4083, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispose_music_player", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4083, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.dispose_music_player", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_396dispose_music_player(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_396dispose_music_player(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dispose_music_player", 0);

  /* "coremusic/capi.pyx":4095
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = at.DisposeMusicPlayer(<at.MusicPlayer>player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = DisposeMusicPlayer(((MusicPlayer)__pyx_v_player));

  /* "coremusic/capi.pyx":4097
 *     cdef cf.OSStatus status = at.DisposeMusicPlayer(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicPlayer"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4098
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicPlayer"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_DisposeMusicPlayer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __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_ERR(0, 4098, __pyx_L1_error)

    /* "coremusic/capi.pyx":4097
 *     cdef cf.OSStatus status = at.DisposeMusicPlayer(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicPlayer"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4099
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicPlayer"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_set_sequence(long player, long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4083
 *     return <long>player
 * 
 * def dispose_music_player(long player):             # <<<<<<<<<<<<<<
 *     """Dispose a music player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.dispose_music_player", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4101
 *     return status
 * 
 * def music_player_set_sequence(long player, long sequence):             # <<<<<<<<<<<<<<
 *     """Set the sequence for the player to play.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_399music_player_set_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_398music_player_set_sequence, "music_player_set_sequence(long player, long sequence)\n\nSet the sequence for the player to play.\n\nArgs:\n    player: The MusicPlayer handle\n    sequence: The MusicSequence handle (or 0 for NULL)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting sequence fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_399music_player_set_sequence = {"music_player_set_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_399music_player_set_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_398music_player_set_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_399music_player_set_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_set_sequence (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4101, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4101, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4101, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_set_sequence", 0) < (0)) __PYX_ERR(0, 4101, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_set_sequence", 1, 2, 2, i); __PYX_ERR(0, 4101, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4101, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4101, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4101, __pyx_L3_error)
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4101, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_set_sequence", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4101, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_set_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_398music_player_set_sequence(__pyx_self, __pyx_v_player, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_398music_player_set_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, long __pyx_v_sequence) {
  MusicSequence __pyx_v_seq;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MusicSequence __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_set_sequence", 0);

  /* "coremusic/capi.pyx":4114
 *         RuntimeError: If setting sequence fails
 *     """
 *     cdef at.MusicSequence seq = <at.MusicSequence>sequence if sequence != 0 else NULL             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)
 * 
*/
  __pyx_t_2 = (__pyx_v_sequence != 0);
  if (__pyx_t_2) {
    __pyx_t_1 = ((MusicSequence)__pyx_v_sequence);
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_seq = __pyx_t_1;

  /* "coremusic/capi.pyx":4115
 *     """
 *     cdef at.MusicSequence seq = <at.MusicSequence>sequence if sequence != 0 else NULL
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerSetSequence(((MusicPlayer)__pyx_v_player), __pyx_v_seq);

  /* "coremusic/capi.pyx":4117
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetSequence"))
 *     return status
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":4118
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetSequence"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerSetSequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4118, __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_ERR(0, 4118, __pyx_L1_error)

    /* "coremusic/capi.pyx":4117
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetSequence"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4119
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetSequence"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_get_sequence(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4101
 *     return status
 * 
 * def music_player_set_sequence(long player, long sequence):             # <<<<<<<<<<<<<<
 *     """Set the sequence for the player to play.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.music_player_set_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4121
 *     return status
 * 
 * def music_player_get_sequence(long player):             # <<<<<<<<<<<<<<
 *     """Get the sequence attached to a player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_401music_player_get_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_400music_player_get_sequence, "music_player_get_sequence(long player)\n\nGet the sequence attached to a player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    MusicSequence handle\n\nRaises:\n    RuntimeError: If getting sequence fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_401music_player_get_sequence = {"music_player_get_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_401music_player_get_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_400music_player_get_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_401music_player_get_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_get_sequence (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4121, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4121, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_get_sequence", 0) < (0)) __PYX_ERR(0, 4121, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_get_sequence", 1, 1, 1, i); __PYX_ERR(0, 4121, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4121, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4121, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_get_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4121, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_400music_player_get_sequence(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_400music_player_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  MusicSequence __pyx_v_sequence;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_get_sequence", 0);

  /* "coremusic/capi.pyx":4134
 *     """
 *     cdef at.MusicSequence sequence
 *     cdef cf.OSStatus status = at.MusicPlayerGetSequence(<at.MusicPlayer>player, &sequence)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerGetSequence(((MusicPlayer)__pyx_v_player), (&__pyx_v_sequence));

  /* "coremusic/capi.pyx":4136
 *     cdef cf.OSStatus status = at.MusicPlayerGetSequence(<at.MusicPlayer>player, &sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetSequence"))
 *     return <long>sequence
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4137
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetSequence"))             # <<<<<<<<<<<<<<
 *     return <long>sequence
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerGetSequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4137, __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_ERR(0, 4137, __pyx_L1_error)

    /* "coremusic/capi.pyx":4136
 *     cdef cf.OSStatus status = at.MusicPlayerGetSequence(<at.MusicPlayer>player, &sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetSequence"))
 *     return <long>sequence
*/
  }

  /* "coremusic/capi.pyx":4138
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetSequence"))
 *     return <long>sequence             # <<<<<<<<<<<<<<
 * 
 * def music_player_set_time(long player, double time):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_sequence)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4121
 *     return status
 * 
 * def music_player_get_sequence(long player):             # <<<<<<<<<<<<<<
 *     """Get the sequence attached to a player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_get_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4140
 *     return <long>sequence
 * 
 * def music_player_set_time(long player, double time):             # <<<<<<<<<<<<<<
 *     """Set the current time on the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_403music_player_set_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_402music_player_set_time, "music_player_set_time(long player, double time)\n\nSet the current time on the player.\n\nArgs:\n    player: The MusicPlayer handle\n    time: The new time value in beats\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting time fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_403music_player_set_time = {"music_player_set_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_403music_player_set_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_402music_player_set_time};
static PyObject *__pyx_pw_9coremusic_4capi_403music_player_set_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  double __pyx_v_time;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_set_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,&__pyx_mstate_global->__pyx_n_u_time,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4140, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4140, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4140, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_set_time", 0) < (0)) __PYX_ERR(0, 4140, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_set_time", 1, 2, 2, i); __PYX_ERR(0, 4140, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4140, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4140, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4140, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4140, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_set_time", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4140, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_set_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_402music_player_set_time(__pyx_self, __pyx_v_player, __pyx_v_time);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_402music_player_set_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, double __pyx_v_time) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_set_time", 0);

  /* "coremusic/capi.pyx":4153
 *         RuntimeError: If setting time fails
 *     """
 *     cdef cf.OSStatus status = at.MusicPlayerSetTime(<at.MusicPlayer>player, <at.MusicTimeStamp>time)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerSetTime(((MusicPlayer)__pyx_v_player), ((MusicTimeStamp)__pyx_v_time));

  /* "coremusic/capi.pyx":4155
 *     cdef cf.OSStatus status = at.MusicPlayerSetTime(<at.MusicPlayer>player, <at.MusicTimeStamp>time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetTime"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4156
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetTime"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerSetTime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4156, __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_ERR(0, 4156, __pyx_L1_error)

    /* "coremusic/capi.pyx":4155
 *     cdef cf.OSStatus status = at.MusicPlayerSetTime(<at.MusicPlayer>player, <at.MusicTimeStamp>time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetTime"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4157
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetTime"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_get_time(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4140
 *     return <long>sequence
 * 
 * def music_player_set_time(long player, double time):             # <<<<<<<<<<<<<<
 *     """Set the current time on the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_set_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4159
 *     return status
 * 
 * def music_player_get_time(long player):             # <<<<<<<<<<<<<<
 *     """Get the current time of the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_405music_player_get_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_404music_player_get_time, "music_player_get_time(long player)\n\nGet the current time of the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    Current time value in beats\n\nRaises:\n    RuntimeError: If getting time fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_405music_player_get_time = {"music_player_get_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_405music_player_get_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_404music_player_get_time};
static PyObject *__pyx_pw_9coremusic_4capi_405music_player_get_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_get_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4159, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_get_time", 0) < (0)) __PYX_ERR(0, 4159, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_get_time", 1, 1, 1, i); __PYX_ERR(0, 4159, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4159, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4159, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_get_time", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4159, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_get_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_404music_player_get_time(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_404music_player_get_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  MusicTimeStamp __pyx_v_time;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_get_time", 0);

  /* "coremusic/capi.pyx":4172
 *     """
 *     cdef at.MusicTimeStamp time
 *     cdef cf.OSStatus status = at.MusicPlayerGetTime(<at.MusicPlayer>player, &time)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerGetTime(((MusicPlayer)__pyx_v_player), (&__pyx_v_time));

  /* "coremusic/capi.pyx":4174
 *     cdef cf.OSStatus status = at.MusicPlayerGetTime(<at.MusicPlayer>player, &time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetTime"))
 *     return <double>time
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4175
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetTime"))             # <<<<<<<<<<<<<<
 *     return <double>time
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerGetTime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4175, __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_ERR(0, 4175, __pyx_L1_error)

    /* "coremusic/capi.pyx":4174
 *     cdef cf.OSStatus status = at.MusicPlayerGetTime(<at.MusicPlayer>player, &time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetTime"))
 *     return <double>time
*/
  }

  /* "coremusic/capi.pyx":4176
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetTime"))
 *     return <double>time             # <<<<<<<<<<<<<<
 * 
 * def music_player_preroll(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(((double)__pyx_v_time)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4159
 *     return status
 * 
 * def music_player_get_time(long player):             # <<<<<<<<<<<<<<
 *     """Get the current time of the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_get_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4178
 *     return <double>time
 * 
 * def music_player_preroll(long player):             # <<<<<<<<<<<<<<
 *     """Prepare the player for playing.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_407music_player_preroll(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_406music_player_preroll, "music_player_preroll(long player)\n\nPrepare the player for playing.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If preroll fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_407music_player_preroll = {"music_player_preroll", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_407music_player_preroll, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_406music_player_preroll};
static PyObject *__pyx_pw_9coremusic_4capi_407music_player_preroll(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_preroll (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4178, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4178, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_preroll", 0) < (0)) __PYX_ERR(0, 4178, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_preroll", 1, 1, 1, i); __PYX_ERR(0, 4178, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4178, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4178, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_preroll", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4178, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_preroll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_406music_player_preroll(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_406music_player_preroll(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_preroll", 0);

  /* "coremusic/capi.pyx":4190
 *         RuntimeError: If preroll fails
 *     """
 *     cdef cf.OSStatus status = at.MusicPlayerPreroll(<at.MusicPlayer>player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerPreroll(((MusicPlayer)__pyx_v_player));

  /* "coremusic/capi.pyx":4192
 *     cdef cf.OSStatus status = at.MusicPlayerPreroll(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerPreroll"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4193
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerPreroll"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerPreroll); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4193, __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_ERR(0, 4193, __pyx_L1_error)

    /* "coremusic/capi.pyx":4192
 *     cdef cf.OSStatus status = at.MusicPlayerPreroll(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerPreroll"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4194
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerPreroll"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_start(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4178
 *     return <double>time
 * 
 * def music_player_preroll(long player):             # <<<<<<<<<<<<<<
 *     """Prepare the player for playing.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_preroll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4196
 *     return status
 * 
 * def music_player_start(long player):             # <<<<<<<<<<<<<<
 *     """Start the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_409music_player_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_408music_player_start, "music_player_start(long player)\n\nStart the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If start fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_409music_player_start = {"music_player_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_409music_player_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_408music_player_start};
static PyObject *__pyx_pw_9coremusic_4capi_409music_player_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4196, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4196, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_start", 0) < (0)) __PYX_ERR(0, 4196, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_start", 1, 1, 1, i); __PYX_ERR(0, 4196, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4196, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4196, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4196, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_408music_player_start(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_408music_player_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_start", 0);

  /* "coremusic/capi.pyx":4208
 *         RuntimeError: If start fails
 *     """
 *     cdef cf.OSStatus status = at.MusicPlayerStart(<at.MusicPlayer>player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerStart(((MusicPlayer)__pyx_v_player));

  /* "coremusic/capi.pyx":4210
 *     cdef cf.OSStatus status = at.MusicPlayerStart(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStart"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4211
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStart"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerStart); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4211, __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_ERR(0, 4211, __pyx_L1_error)

    /* "coremusic/capi.pyx":4210
 *     cdef cf.OSStatus status = at.MusicPlayerStart(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStart"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4212
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStart"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_stop(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4196
 *     return status
 * 
 * def music_player_start(long player):             # <<<<<<<<<<<<<<
 *     """Start the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4214
 *     return status
 * 
 * def music_player_stop(long player):             # <<<<<<<<<<<<<<
 *     """Stop the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_411music_player_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_410music_player_stop, "music_player_stop(long player)\n\nStop the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If stop fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_411music_player_stop = {"music_player_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_411music_player_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_410music_player_stop};
static PyObject *__pyx_pw_9coremusic_4capi_411music_player_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4214, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4214, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_stop", 0) < (0)) __PYX_ERR(0, 4214, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_stop", 1, 1, 1, i); __PYX_ERR(0, 4214, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4214, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4214, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4214, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_410music_player_stop(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_410music_player_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_stop", 0);

  /* "coremusic/capi.pyx":4226
 *         RuntimeError: If stop fails
 *     """
 *     cdef cf.OSStatus status = at.MusicPlayerStop(<at.MusicPlayer>player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerStop(((MusicPlayer)__pyx_v_player));

  /* "coremusic/capi.pyx":4228
 *     cdef cf.OSStatus status = at.MusicPlayerStop(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStop"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4229
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStop"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerStop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4229, __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_ERR(0, 4229, __pyx_L1_error)

    /* "coremusic/capi.pyx":4228
 *     cdef cf.OSStatus status = at.MusicPlayerStop(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStop"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4230
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerStop"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_is_playing(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4214
 *     return status
 * 
 * def music_player_stop(long player):             # <<<<<<<<<<<<<<
 *     """Stop the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4232
 *     return status
 * 
 * def music_player_is_playing(long player):             # <<<<<<<<<<<<<<
 *     """Check if the player is playing.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_413music_player_is_playing(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_412music_player_is_playing, "music_player_is_playing(long player)\n\nCheck if the player is playing.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    True if playing, False if not\n\nRaises:\n    RuntimeError: If check fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_413music_player_is_playing = {"music_player_is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_413music_player_is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_412music_player_is_playing};
static PyObject *__pyx_pw_9coremusic_4capi_413music_player_is_playing(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_is_playing (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4232, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_is_playing", 0) < (0)) __PYX_ERR(0, 4232, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_is_playing", 1, 1, 1, i); __PYX_ERR(0, 4232, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4232, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4232, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_is_playing", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_is_playing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_412music_player_is_playing(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_412music_player_is_playing(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  Boolean __pyx_v_is_playing;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_is_playing", 0);

  /* "coremusic/capi.pyx":4245
 *     """
 *     cdef cf.Boolean is_playing
 *     cdef cf.OSStatus status = at.MusicPlayerIsPlaying(<at.MusicPlayer>player, &is_playing)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerIsPlaying(((MusicPlayer)__pyx_v_player), (&__pyx_v_is_playing));

  /* "coremusic/capi.pyx":4247
 *     cdef cf.OSStatus status = at.MusicPlayerIsPlaying(<at.MusicPlayer>player, &is_playing)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerIsPlaying"))
 *     return bool(is_playing)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4248
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerIsPlaying"))             # <<<<<<<<<<<<<<
 *     return bool(is_playing)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerIsPlaying); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4248, __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_ERR(0, 4248, __pyx_L1_error)

    /* "coremusic/capi.pyx":4247
 *     cdef cf.OSStatus status = at.MusicPlayerIsPlaying(<at.MusicPlayer>player, &is_playing)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerIsPlaying"))
 *     return bool(is_playing)
*/
  }

  /* "coremusic/capi.pyx":4249
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerIsPlaying"))
 *     return bool(is_playing)             # <<<<<<<<<<<<<<
 * 
 * def music_player_set_play_rate_scalar(long player, double scale_rate):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_playing != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4232
 *     return status
 * 
 * def music_player_is_playing(long player):             # <<<<<<<<<<<<<<
 *     """Check if the player is playing.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_is_playing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4251
 *     return bool(is_playing)
 * 
 * def music_player_set_play_rate_scalar(long player, double scale_rate):             # <<<<<<<<<<<<<<
 *     """Scale the playback rate of the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_415music_player_set_play_rate_scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_414music_player_set_play_rate_scalar, "music_player_set_play_rate_scalar(long player, double scale_rate)\n\nScale the playback rate of the player.\n\nArgs:\n    player: The MusicPlayer handle\n    scale_rate: Playback rate scalar (e.g., 2.0 = double speed, 0.5 = half speed)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting rate fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_415music_player_set_play_rate_scalar = {"music_player_set_play_rate_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_415music_player_set_play_rate_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_414music_player_set_play_rate_scalar};
static PyObject *__pyx_pw_9coremusic_4capi_415music_player_set_play_rate_scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  double __pyx_v_scale_rate;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_set_play_rate_scalar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,&__pyx_mstate_global->__pyx_n_u_scale_rate,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4251, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4251, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_set_play_rate_scalar", 0) < (0)) __PYX_ERR(0, 4251, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_set_play_rate_scalar", 1, 2, 2, i); __PYX_ERR(0, 4251, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4251, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4251, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4251, __pyx_L3_error)
    __pyx_v_scale_rate = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_scale_rate == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4251, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_set_play_rate_scalar", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4251, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_set_play_rate_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_414music_player_set_play_rate_scalar(__pyx_self, __pyx_v_player, __pyx_v_scale_rate);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_414music_player_set_play_rate_scalar(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, double __pyx_v_scale_rate) {
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_set_play_rate_scalar", 0);

  /* "coremusic/capi.pyx":4264
 *         RuntimeError: If setting rate fails
 *     """
 *     if scale_rate <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("Scale rate must be greater than zero")
 * 
*/
  __pyx_t_1 = (__pyx_v_scale_rate <= 0.0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4265
 *     """
 *     if scale_rate <= 0:
 *         raise ValueError("Scale rate must be greater than zero")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Scale_rate_must_be_greater_than};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4265, __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_ERR(0, 4265, __pyx_L1_error)

    /* "coremusic/capi.pyx":4264
 *         RuntimeError: If setting rate fails
 *     """
 *     if scale_rate <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("Scale rate must be greater than zero")
 * 
*/
  }

  /* "coremusic/capi.pyx":4267
 *         raise ValueError("Scale rate must be greater than zero")
 * 
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerSetPlayRateScalar(((MusicPlayer)__pyx_v_player), ((Float64)__pyx_v_scale_rate));

  /* "coremusic/capi.pyx":4269
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetPlayRateScalar"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4270
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetPlayRateScalar"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerSetPlayRateScalar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4270, __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_ERR(0, 4270, __pyx_L1_error)

    /* "coremusic/capi.pyx":4269
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetPlayRateScalar"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4271
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerSetPlayRateScalar"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_player_get_play_rate_scalar(long player):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4251
 *     return bool(is_playing)
 * 
 * def music_player_set_play_rate_scalar(long player, double scale_rate):             # <<<<<<<<<<<<<<
 *     """Scale the playback rate of the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.music_player_set_play_rate_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4273
 *     return status
 * 
 * def music_player_get_play_rate_scalar(long player):             # <<<<<<<<<<<<<<
 *     """Get the playback rate scalar of the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_417music_player_get_play_rate_scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_416music_player_get_play_rate_scalar, "music_player_get_play_rate_scalar(long player)\n\nGet the playback rate scalar of the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n    Current playback rate scalar\n\nRaises:\n    RuntimeError: If getting rate fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_417music_player_get_play_rate_scalar = {"music_player_get_play_rate_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_417music_player_get_play_rate_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_416music_player_get_play_rate_scalar};
static PyObject *__pyx_pw_9coremusic_4capi_417music_player_get_play_rate_scalar(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_player;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_player_get_play_rate_scalar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_player,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_player_get_play_rate_scalar", 0) < (0)) __PYX_ERR(0, 4273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_player_get_play_rate_scalar", 1, 1, 1, i); __PYX_ERR(0, 4273, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4273, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4273, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_get_play_rate_scalar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_player_get_play_rate_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_416music_player_get_play_rate_scalar(__pyx_self, __pyx_v_player);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_416music_player_get_play_rate_scalar(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player) {
  Float64 __pyx_v_scale_rate;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_player_get_play_rate_scalar", 0);

  /* "coremusic/capi.pyx":4286
 *     """
 *     cdef ca.Float64 scale_rate
 *     cdef cf.OSStatus status = at.MusicPlayerGetPlayRateScalar(<at.MusicPlayer>player, &scale_rate)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicPlayerGetPlayRateScalar(((MusicPlayer)__pyx_v_player), (&__pyx_v_scale_rate));

  /* "coremusic/capi.pyx":4288
 *     cdef cf.OSStatus status = at.MusicPlayerGetPlayRateScalar(<at.MusicPlayer>player, &scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetPlayRateScalar"))
 *     return <double>scale_rate
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4289
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetPlayRateScalar"))             # <<<<<<<<<<<<<<
 *     return <double>scale_rate
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicPlayerGetPlayRateScalar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4289, __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_ERR(0, 4289, __pyx_L1_error)

    /* "coremusic/capi.pyx":4288
 *     cdef cf.OSStatus status = at.MusicPlayerGetPlayRateScalar(<at.MusicPlayer>player, &scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetPlayRateScalar"))
 *     return <double>scale_rate
*/
  }

  /* "coremusic/capi.pyx":4290
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicPlayerGetPlayRateScalar"))
 *     return <double>scale_rate             # <<<<<<<<<<<<<<
 * 
 * # MusicSequence functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(((double)__pyx_v_scale_rate)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4273
 *     return status
 * 
 * def music_player_get_play_rate_scalar(long player):             # <<<<<<<<<<<<<<
 *     """Get the playback rate scalar of the player.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_player_get_play_rate_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4294
 * # MusicSequence functions
 * 
 * def new_music_sequence():             # <<<<<<<<<<<<<<
 *     """Create a new empty music sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_419new_music_sequence(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_418new_music_sequence, "new_music_sequence()\n\nCreate a new empty music sequence.\n\nReturns:\n    MusicSequence handle\n\nRaises:\n    RuntimeError: If sequence creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_419new_music_sequence = {"new_music_sequence", (PyCFunction)__pyx_pw_9coremusic_4capi_419new_music_sequence, METH_NOARGS, __pyx_doc_9coremusic_4capi_418new_music_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_419new_music_sequence(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_music_sequence (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_418new_music_sequence(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_418new_music_sequence(CYTHON_UNUSED PyObject *__pyx_self) {
  MusicSequence __pyx_v_sequence;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_music_sequence", 0);

  /* "coremusic/capi.pyx":4304
 *     """
 *     cdef at.MusicSequence sequence
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = NewMusicSequence((&__pyx_v_sequence));

  /* "coremusic/capi.pyx":4306
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicSequence"))
 *     return <long>sequence
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4307
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicSequence"))             # <<<<<<<<<<<<<<
 *     return <long>sequence
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_NewMusicSequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4307, __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_ERR(0, 4307, __pyx_L1_error)

    /* "coremusic/capi.pyx":4306
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicSequence"))
 *     return <long>sequence
*/
  }

  /* "coremusic/capi.pyx":4308
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewMusicSequence"))
 *     return <long>sequence             # <<<<<<<<<<<<<<
 * 
 * def dispose_music_sequence(long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_sequence)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4294
 * # MusicSequence functions
 * 
 * def new_music_sequence():             # <<<<<<<<<<<<<<
 *     """Create a new empty music sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.new_music_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4310
 *     return <long>sequence
 * 
 * def dispose_music_sequence(long sequence):             # <<<<<<<<<<<<<<
 *     """Dispose a music sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_421dispose_music_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_420dispose_music_sequence, "dispose_music_sequence(long sequence)\n\nDispose a music sequence.\n\nArgs:\n    sequence: The MusicSequence handle to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_421dispose_music_sequence = {"dispose_music_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_421dispose_music_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_420dispose_music_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_421dispose_music_sequence(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispose_music_sequence (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4310, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4310, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dispose_music_sequence", 0) < (0)) __PYX_ERR(0, 4310, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dispose_music_sequence", 1, 1, 1, i); __PYX_ERR(0, 4310, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4310, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4310, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispose_music_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4310, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.dispose_music_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_420dispose_music_sequence(__pyx_self, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_420dispose_music_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dispose_music_sequence", 0);

  /* "coremusic/capi.pyx":4322
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = at.DisposeMusicSequence(<at.MusicSequence>sequence)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = DisposeMusicSequence(((MusicSequence)__pyx_v_sequence));

  /* "coremusic/capi.pyx":4324
 *     cdef cf.OSStatus status = at.DisposeMusicSequence(<at.MusicSequence>sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicSequence"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4325
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicSequence"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_DisposeMusicSequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4325, __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_ERR(0, 4325, __pyx_L1_error)

    /* "coremusic/capi.pyx":4324
 *     cdef cf.OSStatus status = at.DisposeMusicSequence(<at.MusicSequence>sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicSequence"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4326
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeMusicSequence"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_new_track(long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4310
 *     return <long>sequence
 * 
 * def dispose_music_sequence(long sequence):             # <<<<<<<<<<<<<<
 *     """Dispose a music sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.dispose_music_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4328
 *     return status
 * 
 * def music_sequence_new_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Add a new track to the sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_423music_sequence_new_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_422music_sequence_new_track, "music_sequence_new_track(long sequence)\n\nAdd a new track to the sequence.\n\nArgs:\n    sequence: The MusicSequence handle\n\nReturns:\n    MusicTrack handle\n\nRaises:\n    RuntimeError: If track creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_423music_sequence_new_track = {"music_sequence_new_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_423music_sequence_new_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_422music_sequence_new_track};
static PyObject *__pyx_pw_9coremusic_4capi_423music_sequence_new_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_new_track (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4328, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4328, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_new_track", 0) < (0)) __PYX_ERR(0, 4328, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_new_track", 1, 1, 1, i); __PYX_ERR(0, 4328, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4328, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4328, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_new_track", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4328, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_new_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_422music_sequence_new_track(__pyx_self, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_422music_sequence_new_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence) {
  MusicTrack __pyx_v_track;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_new_track", 0);

  /* "coremusic/capi.pyx":4341
 *     """
 *     cdef at.MusicTrack track
 *     cdef cf.OSStatus status = at.MusicSequenceNewTrack(<at.MusicSequence>sequence, &track)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceNewTrack(((MusicSequence)__pyx_v_sequence), (&__pyx_v_track));

  /* "coremusic/capi.pyx":4343
 *     cdef cf.OSStatus status = at.MusicSequenceNewTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceNewTrack"))
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4344
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceNewTrack"))             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceNewTrack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4344, __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_ERR(0, 4344, __pyx_L1_error)

    /* "coremusic/capi.pyx":4343
 *     cdef cf.OSStatus status = at.MusicSequenceNewTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceNewTrack"))
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":4345
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceNewTrack"))
 *     return <long>track             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_dispose_track(long sequence, long track):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_track)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4328
 *     return status
 * 
 * def music_sequence_new_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Add a new track to the sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_new_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4347
 *     return <long>track
 * 
 * def music_sequence_dispose_track(long sequence, long track):             # <<<<<<<<<<<<<<
 *     """Remove and dispose a track from a sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_425music_sequence_dispose_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_424music_sequence_dispose_track, "music_sequence_dispose_track(long sequence, long track)\n\nRemove and dispose a track from a sequence.\n\nArgs:\n    sequence: The MusicSequence handle\n    track: The MusicTrack handle to remove\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If track disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_425music_sequence_dispose_track = {"music_sequence_dispose_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_425music_sequence_dispose_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_424music_sequence_dispose_track};
static PyObject *__pyx_pw_9coremusic_4capi_425music_sequence_dispose_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  long __pyx_v_track;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_dispose_track (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,&__pyx_mstate_global->__pyx_n_u_track,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4347, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4347, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4347, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_dispose_track", 0) < (0)) __PYX_ERR(0, 4347, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_dispose_track", 1, 2, 2, i); __PYX_ERR(0, 4347, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4347, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4347, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4347, __pyx_L3_error)
    __pyx_v_track = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4347, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_dispose_track", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4347, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_dispose_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_424music_sequence_dispose_track(__pyx_self, __pyx_v_sequence, __pyx_v_track);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_424music_sequence_dispose_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, long __pyx_v_track) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_dispose_track", 0);

  /* "coremusic/capi.pyx":4360
 *         RuntimeError: If track disposal fails
 *     """
 *     cdef cf.OSStatus status = at.MusicSequenceDisposeTrack(<at.MusicSequence>sequence, <at.MusicTrack>track)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceDisposeTrack(((MusicSequence)__pyx_v_sequence), ((MusicTrack)__pyx_v_track));

  /* "coremusic/capi.pyx":4362
 *     cdef cf.OSStatus status = at.MusicSequenceDisposeTrack(<at.MusicSequence>sequence, <at.MusicTrack>track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceDisposeTrack"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4363
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceDisposeTrack"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceDisposeTrack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4363, __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_ERR(0, 4363, __pyx_L1_error)

    /* "coremusic/capi.pyx":4362
 *     cdef cf.OSStatus status = at.MusicSequenceDisposeTrack(<at.MusicSequence>sequence, <at.MusicTrack>track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceDisposeTrack"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4364
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceDisposeTrack"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_get_track_count(long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4347
 *     return <long>track
 * 
 * def music_sequence_dispose_track(long sequence, long track):             # <<<<<<<<<<<<<<
 *     """Remove and dispose a track from a sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_dispose_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4366
 *     return status
 * 
 * def music_sequence_get_track_count(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the number of tracks in a sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_427music_sequence_get_track_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_426music_sequence_get_track_count, "music_sequence_get_track_count(long sequence)\n\nGet the number of tracks in a sequence.\n\nArgs:\n    sequence: The MusicSequence handle\n\nReturns:\n    Number of tracks\n\nRaises:\n    RuntimeError: If getting track count fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_427music_sequence_get_track_count = {"music_sequence_get_track_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_427music_sequence_get_track_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_426music_sequence_get_track_count};
static PyObject *__pyx_pw_9coremusic_4capi_427music_sequence_get_track_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_get_track_count (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4366, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4366, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_get_track_count", 0) < (0)) __PYX_ERR(0, 4366, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_get_track_count", 1, 1, 1, i); __PYX_ERR(0, 4366, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4366, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_get_track_count", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4366, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_track_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_426music_sequence_get_track_count(__pyx_self, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_426music_sequence_get_track_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence) {
  UInt32 __pyx_v_track_count;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_get_track_count", 0);

  /* "coremusic/capi.pyx":4379
 *     """
 *     cdef cf.UInt32 track_count
 *     cdef cf.OSStatus status = at.MusicSequenceGetTrackCount(<at.MusicSequence>sequence, &track_count)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceGetTrackCount(((MusicSequence)__pyx_v_sequence), (&__pyx_v_track_count));

  /* "coremusic/capi.pyx":4381
 *     cdef cf.OSStatus status = at.MusicSequenceGetTrackCount(<at.MusicSequence>sequence, &track_count)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTrackCount"))
 *     return track_count
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4382
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTrackCount"))             # <<<<<<<<<<<<<<
 *     return track_count
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceGetTrackCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4382, __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_ERR(0, 4382, __pyx_L1_error)

    /* "coremusic/capi.pyx":4381
 *     cdef cf.OSStatus status = at.MusicSequenceGetTrackCount(<at.MusicSequence>sequence, &track_count)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTrackCount"))
 *     return track_count
*/
  }

  /* "coremusic/capi.pyx":4383
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTrackCount"))
 *     return track_count             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_get_ind_track(long sequence, int track_index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_track_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4366
 *     return status
 * 
 * def music_sequence_get_track_count(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the number of tracks in a sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_track_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4385
 *     return track_count
 * 
 * def music_sequence_get_ind_track(long sequence, int track_index):             # <<<<<<<<<<<<<<
 *     """Get a track at the specified index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_429music_sequence_get_ind_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_428music_sequence_get_ind_track, "music_sequence_get_ind_track(long sequence, int track_index)\n\nGet a track at the specified index.\n\nArgs:\n    sequence: The MusicSequence handle\n    track_index: Zero-based track index\n\nReturns:\n    MusicTrack handle\n\nRaises:\n    RuntimeError: If getting track fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_429music_sequence_get_ind_track = {"music_sequence_get_ind_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_429music_sequence_get_ind_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_428music_sequence_get_ind_track};
static PyObject *__pyx_pw_9coremusic_4capi_429music_sequence_get_ind_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  int __pyx_v_track_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_get_ind_track (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,&__pyx_mstate_global->__pyx_n_u_track_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4385, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4385, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_get_ind_track", 0) < (0)) __PYX_ERR(0, 4385, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_get_ind_track", 1, 2, 2, i); __PYX_ERR(0, 4385, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4385, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4385, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4385, __pyx_L3_error)
    __pyx_v_track_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_track_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4385, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_get_ind_track", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4385, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_ind_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_428music_sequence_get_ind_track(__pyx_self, __pyx_v_sequence, __pyx_v_track_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_428music_sequence_get_ind_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, int __pyx_v_track_index) {
  MusicTrack __pyx_v_track;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_get_ind_track", 0);

  /* "coremusic/capi.pyx":4399
 *     """
 *     cdef at.MusicTrack track
 *     cdef cf.OSStatus status = at.MusicSequenceGetIndTrack(<at.MusicSequence>sequence, <cf.UInt32>track_index, &track)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceGetIndTrack(((MusicSequence)__pyx_v_sequence), ((UInt32)__pyx_v_track_index), (&__pyx_v_track));

  /* "coremusic/capi.pyx":4401
 *     cdef cf.OSStatus status = at.MusicSequenceGetIndTrack(<at.MusicSequence>sequence, <cf.UInt32>track_index, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetIndTrack"))
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4402
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetIndTrack"))             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceGetIndTrack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4402, __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_ERR(0, 4402, __pyx_L1_error)

    /* "coremusic/capi.pyx":4401
 *     cdef cf.OSStatus status = at.MusicSequenceGetIndTrack(<at.MusicSequence>sequence, <cf.UInt32>track_index, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetIndTrack"))
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":4403
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetIndTrack"))
 *     return <long>track             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_get_tempo_track(long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_track)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4385
 *     return track_count
 * 
 * def music_sequence_get_ind_track(long sequence, int track_index):             # <<<<<<<<<<<<<<
 *     """Get a track at the specified index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_ind_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4405
 *     return <long>track
 * 
 * def music_sequence_get_tempo_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the tempo track of the sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_431music_sequence_get_tempo_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_430music_sequence_get_tempo_track, "music_sequence_get_tempo_track(long sequence)\n\nGet the tempo track of the sequence.\n\nArgs:\n    sequence: The MusicSequence handle\n\nReturns:\n    MusicTrack handle for the tempo track\n\nRaises:\n    RuntimeError: If getting tempo track fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_431music_sequence_get_tempo_track = {"music_sequence_get_tempo_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_431music_sequence_get_tempo_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_430music_sequence_get_tempo_track};
static PyObject *__pyx_pw_9coremusic_4capi_431music_sequence_get_tempo_track(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_get_tempo_track (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4405, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4405, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_get_tempo_track", 0) < (0)) __PYX_ERR(0, 4405, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_get_tempo_track", 1, 1, 1, i); __PYX_ERR(0, 4405, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4405, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4405, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_get_tempo_track", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4405, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_tempo_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_430music_sequence_get_tempo_track(__pyx_self, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_430music_sequence_get_tempo_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence) {
  MusicTrack __pyx_v_track;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_get_tempo_track", 0);

  /* "coremusic/capi.pyx":4418
 *     """
 *     cdef at.MusicTrack track
 *     cdef cf.OSStatus status = at.MusicSequenceGetTempoTrack(<at.MusicSequence>sequence, &track)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceGetTempoTrack(((MusicSequence)__pyx_v_sequence), (&__pyx_v_track));

  /* "coremusic/capi.pyx":4420
 *     cdef cf.OSStatus status = at.MusicSequenceGetTempoTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTempoTrack"))
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4421
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTempoTrack"))             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceGetTempoTrack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4421, __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_ERR(0, 4421, __pyx_L1_error)

    /* "coremusic/capi.pyx":4420
 *     cdef cf.OSStatus status = at.MusicSequenceGetTempoTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTempoTrack"))
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":4422
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetTempoTrack"))
 *     return <long>track             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_set_sequence_type(long sequence, int sequence_type):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_track)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4405
 *     return <long>track
 * 
 * def music_sequence_get_tempo_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the tempo track of the sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_tempo_track", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4424
 *     return <long>track
 * 
 * def music_sequence_set_sequence_type(long sequence, int sequence_type):             # <<<<<<<<<<<<<<
 *     """Set the sequence type.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_433music_sequence_set_sequence_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_432music_sequence_set_sequence_type, "music_sequence_set_sequence_type(long sequence, int sequence_type)\n\nSet the sequence type.\n\nArgs:\n    sequence: The MusicSequence handle\n    sequence_type: The sequence type (beats, seconds, or samples)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting sequence type fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_433music_sequence_set_sequence_type = {"music_sequence_set_sequence_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_433music_sequence_set_sequence_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_432music_sequence_set_sequence_type};
static PyObject *__pyx_pw_9coremusic_4capi_433music_sequence_set_sequence_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  int __pyx_v_sequence_type;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_set_sequence_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,&__pyx_mstate_global->__pyx_n_u_sequence_type,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4424, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4424, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4424, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_set_sequence_type", 0) < (0)) __PYX_ERR(0, 4424, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_set_sequence_type", 1, 2, 2, i); __PYX_ERR(0, 4424, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4424, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4424, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4424, __pyx_L3_error)
    __pyx_v_sequence_type = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_sequence_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4424, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_set_sequence_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4424, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_set_sequence_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_432music_sequence_set_sequence_type(__pyx_self, __pyx_v_sequence, __pyx_v_sequence_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_432music_sequence_set_sequence_type(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, int __pyx_v_sequence_type) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_set_sequence_type", 0);

  /* "coremusic/capi.pyx":4437
 *         RuntimeError: If setting sequence type fails
 *     """
 *     cdef cf.OSStatus status = at.MusicSequenceSetSequenceType(<at.MusicSequence>sequence, <cf.UInt32>sequence_type)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceSetSequenceType(((MusicSequence)__pyx_v_sequence), ((UInt32)__pyx_v_sequence_type));

  /* "coremusic/capi.pyx":4439
 *     cdef cf.OSStatus status = at.MusicSequenceSetSequenceType(<at.MusicSequence>sequence, <cf.UInt32>sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceSetSequenceType"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4440
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceSetSequenceType"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceSetSequenceType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4440, __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_ERR(0, 4440, __pyx_L1_error)

    /* "coremusic/capi.pyx":4439
 *     cdef cf.OSStatus status = at.MusicSequenceSetSequenceType(<at.MusicSequence>sequence, <cf.UInt32>sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceSetSequenceType"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4441
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceSetSequenceType"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_get_sequence_type(long sequence):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4424
 *     return <long>track
 * 
 * def music_sequence_set_sequence_type(long sequence, int sequence_type):             # <<<<<<<<<<<<<<
 *     """Set the sequence type.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_set_sequence_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4443
 *     return status
 * 
 * def music_sequence_get_sequence_type(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the sequence type.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_435music_sequence_get_sequence_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_434music_sequence_get_sequence_type, "music_sequence_get_sequence_type(long sequence)\n\nGet the sequence type.\n\nArgs:\n    sequence: The MusicSequence handle\n\nReturns:\n    Sequence type constant\n\nRaises:\n    RuntimeError: If getting sequence type fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_435music_sequence_get_sequence_type = {"music_sequence_get_sequence_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_435music_sequence_get_sequence_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_434music_sequence_get_sequence_type};
static PyObject *__pyx_pw_9coremusic_4capi_435music_sequence_get_sequence_type(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_get_sequence_type (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4443, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4443, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_get_sequence_type", 0) < (0)) __PYX_ERR(0, 4443, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_get_sequence_type", 1, 1, 1, i); __PYX_ERR(0, 4443, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4443, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4443, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_get_sequence_type", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4443, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_sequence_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_434music_sequence_get_sequence_type(__pyx_self, __pyx_v_sequence);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_434music_sequence_get_sequence_type(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence) {
  UInt32 __pyx_v_sequence_type;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_get_sequence_type", 0);

  /* "coremusic/capi.pyx":4456
 *     """
 *     cdef cf.UInt32 sequence_type
 *     cdef cf.OSStatus status = at.MusicSequenceGetSequenceType(<at.MusicSequence>sequence, &sequence_type)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MusicSequenceGetSequenceType(((MusicSequence)__pyx_v_sequence), (&__pyx_v_sequence_type));

  /* "coremusic/capi.pyx":4458
 *     cdef cf.OSStatus status = at.MusicSequenceGetSequenceType(<at.MusicSequence>sequence, &sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetSequenceType"))
 *     return sequence_type
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4459
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetSequenceType"))             # <<<<<<<<<<<<<<
 *     return sequence_type
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceGetSequenceType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4459, __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_ERR(0, 4459, __pyx_L1_error)

    /* "coremusic/capi.pyx":4458
 *     cdef cf.OSStatus status = at.MusicSequenceGetSequenceType(<at.MusicSequence>sequence, &sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetSequenceType"))
 *     return sequence_type
*/
  }

  /* "coremusic/capi.pyx":4460
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicSequenceGetSequenceType"))
 *     return sequence_type             # <<<<<<<<<<<<<<
 * 
 * def music_sequence_file_load(long sequence, str file_path, int file_type_hint=0, int flags=0):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_sequence_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4443
 *     return status
 * 
 * def music_sequence_get_sequence_type(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the sequence type.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_get_sequence_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4462
 *     return sequence_type
 * 
 * def music_sequence_file_load(long sequence, str file_path, int file_type_hint=0, int flags=0):             # <<<<<<<<<<<<<<
 *     """Load a file into the sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_437music_sequence_file_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_436music_sequence_file_load, "music_sequence_file_load(long sequence, str file_path, int file_type_hint=0, int flags=0)\n\nLoad a file into the sequence.\n\nArgs:\n    sequence: The MusicSequence handle\n    file_path: Path to the file to load\n    file_type_hint: File type hint (default 0 for auto-detect)\n    flags: Load flags (default 0)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If file loading fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_437music_sequence_file_load = {"music_sequence_file_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_437music_sequence_file_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_436music_sequence_file_load};
static PyObject *__pyx_pw_9coremusic_4capi_437music_sequence_file_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_sequence;
  PyObject *__pyx_v_file_path = 0;
  int __pyx_v_file_type_hint;
  int __pyx_v_flags;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_sequence_file_load (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sequence,&__pyx_mstate_global->__pyx_n_u_file_path,&__pyx_mstate_global->__pyx_n_u_file_type_hint,&__pyx_mstate_global->__pyx_n_u_flags,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4462, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_sequence_file_load", 0) < (0)) __PYX_ERR(0, 4462, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_sequence_file_load", 0, 2, 4, i); __PYX_ERR(0, 4462, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4462, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4462, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4462, __pyx_L3_error)
    __pyx_v_file_path = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_file_type_hint = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_file_type_hint == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4462, __pyx_L3_error)
    } else {
      __pyx_v_file_type_hint = ((int)((int)0));
    }
    if (values[3]) {
      __pyx_v_flags = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4462, __pyx_L3_error)
    } else {
      __pyx_v_flags = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_sequence_file_load", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 4462, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_sequence_file_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_path), (&PyUnicode_Type), 1, "file_path", 1))) __PYX_ERR(0, 4462, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_436music_sequence_file_load(__pyx_self, __pyx_v_sequence, __pyx_v_file_path, __pyx_v_file_type_hint, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_436music_sequence_file_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, PyObject *__pyx_v_file_path, int __pyx_v_file_type_hint, int __pyx_v_flags) {
  PyObject *__pyx_v_path_bytes = 0;
  CFURLRef __pyx_v_url_ref;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt8 const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_sequence_file_load", 0);

  /* "coremusic/capi.pyx":4477
 *         RuntimeError: If file loading fails
 *     """
 *     cdef bytes path_bytes = file_path.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFURLRef url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *         cf.kCFAllocatorDefault,
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4477, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4480
 *     cdef cf.CFURLRef url_ref = cf.CFURLCreateFromFileSystemRepresentation(
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,             # <<<<<<<<<<<<<<
 *         len(path_bytes),
 *         False
*/
  __pyx_t_2 = __Pyx_PyBytes_AsUString(__pyx_v_path_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4480, __pyx_L1_error)

  /* "coremusic/capi.pyx":4481
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
 *         len(path_bytes),             # <<<<<<<<<<<<<<
 *         False
 *     )
*/
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_path_bytes); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4481, __pyx_L1_error)

  /* "coremusic/capi.pyx":4478
 *     """
 *     cdef bytes path_bytes = file_path.encode('utf-8')
 *     cdef cf.CFURLRef url_ref = cf.CFURLCreateFromFileSystemRepresentation(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         <const cf.UInt8*>path_bytes,
*/
  __pyx_v_url_ref = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, ((UInt8 const *)__pyx_t_2), __pyx_t_3, 0);

  /* "coremusic/capi.pyx":4486
 *     cdef cf.OSStatus status
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Could not create URL from file path: {file_path}")
 * 
*/
  __pyx_t_4 = (!(__pyx_v_url_ref != 0));
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":4487
 * 
 *     if not url_ref:
 *         raise ValueError(f"Could not create URL from file path: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_from_file_p_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4487, __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_ERR(0, 4487, __pyx_L1_error)

    /* "coremusic/capi.pyx":4486
 *     cdef cf.OSStatus status
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Could not create URL from file path: {file_path}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4489
 *         raise ValueError(f"Could not create URL from file path: {file_path}")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.MusicSequenceFileLoad(
 *             <at.MusicSequence>sequence,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4490
 * 
 *     try:
 *         status = at.MusicSequenceFileLoad(             # <<<<<<<<<<<<<<
 *             <at.MusicSequence>sequence,
 *             url_ref,
*/
    __pyx_v_status = MusicSequenceFileLoad(((MusicSequence)__pyx_v_sequence), __pyx_v_url_ref, ((UInt32)__pyx_v_file_type_hint), ((UInt32)__pyx_v_flags));

    /* "coremusic/capi.pyx":4497
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MusicSequenceFileLoad"))
 *         return status
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":4498
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MusicSequenceFileLoad"))             # <<<<<<<<<<<<<<
 *         return status
 * 
*/
      __pyx_t_7 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicSequenceFileLoad); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4498, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4498, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 4498, __pyx_L5_error)

      /* "coremusic/capi.pyx":4497
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MusicSequenceFileLoad"))
 *         return status
*/
    }

    /* "coremusic/capi.pyx":4499
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MusicSequenceFileLoad"))
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4499, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":4502
 * 
 *     finally:
 *         cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 * # MusicTrack functions
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
      {
        CFRelease(__pyx_v_url_ref);
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_url_ref);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4462
 *     return sequence_type
 * 
 * def music_sequence_file_load(long sequence, str file_path, int file_type_hint=0, int flags=0):             # <<<<<<<<<<<<<<
 *     """Load a file into the sequence.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.music_sequence_file_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4506
 * # MusicTrack functions
 * 
 * def music_track_new_midi_note_event(long track, double timestamp, int channel, int note, int velocity, int release_velocity, double duration):             # <<<<<<<<<<<<<<
 *     """Add a MIDI note event to a track.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_439music_track_new_midi_note_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_438music_track_new_midi_note_event, "music_track_new_midi_note_event(long track, double timestamp, int channel, int note, int velocity, int release_velocity, double duration)\n\nAdd a MIDI note event to a track.\n\nArgs:\n    track: The MusicTrack handle\n    timestamp: The time stamp in beats\n    channel: MIDI channel (0-15)\n    note: MIDI note number (0-127)\n    velocity: Note on velocity (0-127)\n    release_velocity: Note off velocity (0-127)\n    duration: Note duration in beats\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_439music_track_new_midi_note_event = {"music_track_new_midi_note_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_439music_track_new_midi_note_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_438music_track_new_midi_note_event};
static PyObject *__pyx_pw_9coremusic_4capi_439music_track_new_midi_note_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_track;
  double __pyx_v_timestamp;
  int __pyx_v_channel;
  int __pyx_v_note;
  int __pyx_v_velocity;
  int __pyx_v_release_velocity;
  double __pyx_v_duration;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_track_new_midi_note_event (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_track,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note,&__pyx_mstate_global->__pyx_n_u_velocity,&__pyx_mstate_global->__pyx_n_u_release_velocity,&__pyx_mstate_global->__pyx_n_u_duration,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4506, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4506, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_track_new_midi_note_event", 0) < (0)) __PYX_ERR(0, 4506, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_track_new_midi_note_event", 1, 7, 7, i); __PYX_ERR(0, 4506, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 7)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4506, __pyx_L3_error)
      values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4506, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_release_velocity = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_release_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
    __pyx_v_duration = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_duration == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_track_new_midi_note_event", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 4506, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_track_new_midi_note_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_438music_track_new_midi_note_event(__pyx_self, __pyx_v_track, __pyx_v_timestamp, __pyx_v_channel, __pyx_v_note, __pyx_v_velocity, __pyx_v_release_velocity, __pyx_v_duration);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_438music_track_new_midi_note_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity, int __pyx_v_release_velocity, double __pyx_v_duration) {
  MIDINoteMessage __pyx_v_message;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_track_new_midi_note_event", 0);

  /* "coremusic/capi.pyx":4525
 *     """
 *     cdef at.MIDINoteMessage message
 *     message.channel = <cf.UInt8>(channel & 0x0F)             # <<<<<<<<<<<<<<
 *     message.note = <cf.UInt8>(note & 0x7F)
 *     message.velocity = <cf.UInt8>(velocity & 0x7F)
*/
  __pyx_v_message.channel = ((UInt8)(__pyx_v_channel & 0x0F));

  /* "coremusic/capi.pyx":4526
 *     cdef at.MIDINoteMessage message
 *     message.channel = <cf.UInt8>(channel & 0x0F)
 *     message.note = <cf.UInt8>(note & 0x7F)             # <<<<<<<<<<<<<<
 *     message.velocity = <cf.UInt8>(velocity & 0x7F)
 *     message.releaseVelocity = <cf.UInt8>(release_velocity & 0x7F)
*/
  __pyx_v_message.note = ((UInt8)(__pyx_v_note & 0x7F));

  /* "coremusic/capi.pyx":4527
 *     message.channel = <cf.UInt8>(channel & 0x0F)
 *     message.note = <cf.UInt8>(note & 0x7F)
 *     message.velocity = <cf.UInt8>(velocity & 0x7F)             # <<<<<<<<<<<<<<
 *     message.releaseVelocity = <cf.UInt8>(release_velocity & 0x7F)
 *     message.duration = <ca.Float32>duration
*/
  __pyx_v_message.velocity = ((UInt8)(__pyx_v_velocity & 0x7F));

  /* "coremusic/capi.pyx":4528
 *     message.note = <cf.UInt8>(note & 0x7F)
 *     message.velocity = <cf.UInt8>(velocity & 0x7F)
 *     message.releaseVelocity = <cf.UInt8>(release_velocity & 0x7F)             # <<<<<<<<<<<<<<
 *     message.duration = <ca.Float32>duration
 * 
*/
  __pyx_v_message.releaseVelocity = ((UInt8)(__pyx_v_release_velocity & 0x7F));

  /* "coremusic/capi.pyx":4529
 *     message.velocity = <cf.UInt8>(velocity & 0x7F)
 *     message.releaseVelocity = <cf.UInt8>(release_velocity & 0x7F)
 *     message.duration = <ca.Float32>duration             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.MusicTrackNewMIDINoteEvent(
*/
  __pyx_v_message.duration = ((Float32)__pyx_v_duration);

  /* "coremusic/capi.pyx":4531
 *     message.duration = <ca.Float32>duration
 * 
 *     cdef cf.OSStatus status = at.MusicTrackNewMIDINoteEvent(             # <<<<<<<<<<<<<<
 *         <at.MusicTrack>track,
 *         <at.MusicTimeStamp>timestamp,
*/
  __pyx_v_status = MusicTrackNewMIDINoteEvent(((MusicTrack)__pyx_v_track), ((MusicTimeStamp)__pyx_v_timestamp), (&__pyx_v_message));

  /* "coremusic/capi.pyx":4537
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewMIDINoteEvent"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4538
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewMIDINoteEvent"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicTrackNewMIDINoteEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4538, __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_ERR(0, 4538, __pyx_L1_error)

    /* "coremusic/capi.pyx":4537
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewMIDINoteEvent"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4539
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewMIDINoteEvent"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def music_track_new_midi_channel_event(long track, double timestamp, int status, int data1, int data2):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4506
 * # MusicTrack functions
 * 
 * def music_track_new_midi_note_event(long track, double timestamp, int channel, int note, int velocity, int release_velocity, double duration):             # <<<<<<<<<<<<<<
 *     """Add a MIDI note event to a track.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.music_track_new_midi_note_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4541
 *     return status
 * 
 * def music_track_new_midi_channel_event(long track, double timestamp, int status, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Add a MIDI channel event to a track.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_441music_track_new_midi_channel_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_440music_track_new_midi_channel_event, "music_track_new_midi_channel_event(long track, double timestamp, int status, int data1, int data2)\n\nAdd a MIDI channel event to a track.\n\nArgs:\n    track: The MusicTrack handle\n    timestamp: The time stamp in beats\n    status: MIDI status byte\n    data1: First data byte\n    data2: Second data byte\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_441music_track_new_midi_channel_event = {"music_track_new_midi_channel_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_441music_track_new_midi_channel_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_440music_track_new_midi_channel_event};
static PyObject *__pyx_pw_9coremusic_4capi_441music_track_new_midi_channel_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_track;
  double __pyx_v_timestamp;
  int __pyx_v_status;
  int __pyx_v_data1;
  int __pyx_v_data2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_track_new_midi_channel_event (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_track,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_data1,&__pyx_mstate_global->__pyx_n_u_data2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4541, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_track_new_midi_channel_event", 0) < (0)) __PYX_ERR(0, 4541, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_track_new_midi_channel_event", 1, 5, 5, i); __PYX_ERR(0, 4541, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4541, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4541, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4541, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4541, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4541, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4541, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_track_new_midi_channel_event", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 4541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_track_new_midi_channel_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_440music_track_new_midi_channel_event(__pyx_self, __pyx_v_track, __pyx_v_timestamp, __pyx_v_status, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_440music_track_new_midi_channel_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2) {
  MIDIChannelMessage __pyx_v_message;
  OSStatus __pyx_v_status_result;
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_track_new_midi_channel_event", 0);

  /* "coremusic/capi.pyx":4558
 *     """
 *     cdef at.MIDIChannelMessage message
 *     message.status = <cf.UInt8>status             # <<<<<<<<<<<<<<
 *     message.data1 = <cf.UInt8>data1
 *     message.data2 = <cf.UInt8>data2
*/
  __pyx_v_message.status = ((UInt8)__pyx_v_status);

  /* "coremusic/capi.pyx":4559
 *     cdef at.MIDIChannelMessage message
 *     message.status = <cf.UInt8>status
 *     message.data1 = <cf.UInt8>data1             # <<<<<<<<<<<<<<
 *     message.data2 = <cf.UInt8>data2
 *     message.reserved = 0
*/
  __pyx_v_message.data1 = ((UInt8)__pyx_v_data1);

  /* "coremusic/capi.pyx":4560
 *     message.status = <cf.UInt8>status
 *     message.data1 = <cf.UInt8>data1
 *     message.data2 = <cf.UInt8>data2             # <<<<<<<<<<<<<<
 *     message.reserved = 0
 * 
*/
  __pyx_v_message.data2 = ((UInt8)__pyx_v_data2);

  /* "coremusic/capi.pyx":4561
 *     message.data1 = <cf.UInt8>data1
 *     message.data2 = <cf.UInt8>data2
 *     message.reserved = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status_result = at.MusicTrackNewMIDIChannelEvent(
*/
  __pyx_v_message.reserved = 0;

  /* "coremusic/capi.pyx":4563
 *     message.reserved = 0
 * 
 *     cdef cf.OSStatus status_result = at.MusicTrackNewMIDIChannelEvent(             # <<<<<<<<<<<<<<
 *         <at.MusicTrack>track,
 *         <at.MusicTimeStamp>timestamp,
*/
  __pyx_v_status_result = MusicTrackNewMIDIChannelEvent(((MusicTrack)__pyx_v_track), ((MusicTimeStamp)__pyx_v_timestamp), (&__pyx_v_message));

  /* "coremusic/capi.pyx":4569
 *     )
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")
 *     return status_result
*/
  __pyx_t_1 = (__pyx_v_status_result != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4570
 * 
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")             # <<<<<<<<<<<<<<
 *     return status_result
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_OSStatus(__pyx_v_status_result, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicTrackNewMIDIChannelEvent_fa, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4570, __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_ERR(0, 4570, __pyx_L1_error)

    /* "coremusic/capi.pyx":4569
 *     )
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")
 *     return status_result
*/
  }

  /* "coremusic/capi.pyx":4571
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")
 *     return status_result             # <<<<<<<<<<<<<<
 * 
 * def music_track_new_extended_tempo_event(long track, double timestamp, double bpm):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4541
 *     return status
 * 
 * def music_track_new_midi_channel_event(long track, double timestamp, int status, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Add a MIDI channel event to a track.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.music_track_new_midi_channel_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4573
 *     return status_result
 * 
 * def music_track_new_extended_tempo_event(long track, double timestamp, double bpm):             # <<<<<<<<<<<<<<
 *     """Add a tempo event to a track.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_443music_track_new_extended_tempo_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_442music_track_new_extended_tempo_event, "music_track_new_extended_tempo_event(long track, double timestamp, double bpm)\n\nAdd a tempo event to a track.\n\nArgs:\n    track: The MusicTrack handle\n    timestamp: The time stamp in beats\n    bpm: Beats per minute\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_443music_track_new_extended_tempo_event = {"music_track_new_extended_tempo_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_443music_track_new_extended_tempo_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_442music_track_new_extended_tempo_event};
static PyObject *__pyx_pw_9coremusic_4capi_443music_track_new_extended_tempo_event(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_track;
  double __pyx_v_timestamp;
  double __pyx_v_bpm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("music_track_new_extended_tempo_event (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_track,&__pyx_mstate_global->__pyx_n_u_timestamp,&__pyx_mstate_global->__pyx_n_u_bpm,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4573, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4573, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4573, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4573, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "music_track_new_extended_tempo_event", 0) < (0)) __PYX_ERR(0, 4573, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("music_track_new_extended_tempo_event", 1, 3, 3, i); __PYX_ERR(0, 4573, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4573, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4573, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4573, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4573, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4573, __pyx_L3_error)
    __pyx_v_bpm = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_bpm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4573, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_track_new_extended_tempo_event", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4573, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.music_track_new_extended_tempo_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_442music_track_new_extended_tempo_event(__pyx_self, __pyx_v_track, __pyx_v_timestamp, __pyx_v_bpm);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_442music_track_new_extended_tempo_event(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_track, double __pyx_v_timestamp, double __pyx_v_bpm) {
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("music_track_new_extended_tempo_event", 0);

  /* "coremusic/capi.pyx":4587
 *         RuntimeError: If adding event fails
 *     """
 *     if bpm <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("BPM must be greater than zero")
 * 
*/
  __pyx_t_1 = (__pyx_v_bpm <= 0.0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4588
 *     """
 *     if bpm <= 0:
 *         raise ValueError("BPM must be greater than zero")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.MusicTrackNewExtendedTempoEvent(
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_BPM_must_be_greater_than_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4588, __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_ERR(0, 4588, __pyx_L1_error)

    /* "coremusic/capi.pyx":4587
 *         RuntimeError: If adding event fails
 *     """
 *     if bpm <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("BPM must be greater than zero")
 * 
*/
  }

  /* "coremusic/capi.pyx":4590
 *         raise ValueError("BPM must be greater than zero")
 * 
 *     cdef cf.OSStatus status = at.MusicTrackNewExtendedTempoEvent(             # <<<<<<<<<<<<<<
 *         <at.MusicTrack>track,
 *         <at.MusicTimeStamp>timestamp,
*/
  __pyx_v_status = MusicTrackNewExtendedTempoEvent(((MusicTrack)__pyx_v_track), ((MusicTimeStamp)__pyx_v_timestamp), ((Float64)__pyx_v_bpm));

  /* "coremusic/capi.pyx":4596
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewExtendedTempoEvent"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4597
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewExtendedTempoEvent"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MusicTrackNewExtendedTempoEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4597, __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_ERR(0, 4597, __pyx_L1_error)

    /* "coremusic/capi.pyx":4596
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewExtendedTempoEvent"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4598
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MusicTrackNewExtendedTempoEvent"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * # MusicPlayer constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4573
 *     return status_result
 * 
 * def music_track_new_extended_tempo_event(long track, double timestamp, double bpm):             # <<<<<<<<<<<<<<
 *     """Add a tempo event to a track.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.music_track_new_extended_tempo_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4602
 * # MusicPlayer constants
 * 
 * def get_music_event_type_null():             # <<<<<<<<<<<<<<
 *     """Get the NULL event type constant."""
 *     return at.kMusicEventType_NULL
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_445get_music_event_type_null(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_444get_music_event_type_null, "get_music_event_type_null()\n\nGet the NULL event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_445get_music_event_type_null = {"get_music_event_type_null", (PyCFunction)__pyx_pw_9coremusic_4capi_445get_music_event_type_null, METH_NOARGS, __pyx_doc_9coremusic_4capi_444get_music_event_type_null};
static PyObject *__pyx_pw_9coremusic_4capi_445get_music_event_type_null(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_null (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_444get_music_event_type_null(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_444get_music_event_type_null(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_null", 0);

  /* "coremusic/capi.pyx":4604
 * def get_music_event_type_null():
 *     """Get the NULL event type constant."""
 *     return at.kMusicEventType_NULL             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_extended_note():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4602
 * # MusicPlayer constants
 * 
 * def get_music_event_type_null():             # <<<<<<<<<<<<<<
 *     """Get the NULL event type constant."""
 *     return at.kMusicEventType_NULL
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4606
 *     return at.kMusicEventType_NULL
 * 
 * def get_music_event_type_extended_note():             # <<<<<<<<<<<<<<
 *     """Get the extended note event type constant."""
 *     return at.kMusicEventType_ExtendedNote
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_447get_music_event_type_extended_note(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_446get_music_event_type_extended_note, "get_music_event_type_extended_note()\n\nGet the extended note event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_447get_music_event_type_extended_note = {"get_music_event_type_extended_note", (PyCFunction)__pyx_pw_9coremusic_4capi_447get_music_event_type_extended_note, METH_NOARGS, __pyx_doc_9coremusic_4capi_446get_music_event_type_extended_note};
static PyObject *__pyx_pw_9coremusic_4capi_447get_music_event_type_extended_note(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_extended_note (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_446get_music_event_type_extended_note(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_446get_music_event_type_extended_note(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_extended_note", 0);

  /* "coremusic/capi.pyx":4608
 * def get_music_event_type_extended_note():
 *     """Get the extended note event type constant."""
 *     return at.kMusicEventType_ExtendedNote             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_extended_tempo():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_ExtendedNote); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4606
 *     return at.kMusicEventType_NULL
 * 
 * def get_music_event_type_extended_note():             # <<<<<<<<<<<<<<
 *     """Get the extended note event type constant."""
 *     return at.kMusicEventType_ExtendedNote
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_extended_note", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4610
 *     return at.kMusicEventType_ExtendedNote
 * 
 * def get_music_event_type_extended_tempo():             # <<<<<<<<<<<<<<
 *     """Get the extended tempo event type constant."""
 *     return at.kMusicEventType_ExtendedTempo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_449get_music_event_type_extended_tempo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_448get_music_event_type_extended_tempo, "get_music_event_type_extended_tempo()\n\nGet the extended tempo event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_449get_music_event_type_extended_tempo = {"get_music_event_type_extended_tempo", (PyCFunction)__pyx_pw_9coremusic_4capi_449get_music_event_type_extended_tempo, METH_NOARGS, __pyx_doc_9coremusic_4capi_448get_music_event_type_extended_tempo};
static PyObject *__pyx_pw_9coremusic_4capi_449get_music_event_type_extended_tempo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_extended_tempo (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_448get_music_event_type_extended_tempo(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_448get_music_event_type_extended_tempo(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_extended_tempo", 0);

  /* "coremusic/capi.pyx":4612
 * def get_music_event_type_extended_tempo():
 *     """Get the extended tempo event type constant."""
 *     return at.kMusicEventType_ExtendedTempo             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_user():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_ExtendedTempo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4610
 *     return at.kMusicEventType_ExtendedNote
 * 
 * def get_music_event_type_extended_tempo():             # <<<<<<<<<<<<<<
 *     """Get the extended tempo event type constant."""
 *     return at.kMusicEventType_ExtendedTempo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_extended_tempo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4614
 *     return at.kMusicEventType_ExtendedTempo
 * 
 * def get_music_event_type_user():             # <<<<<<<<<<<<<<
 *     """Get the user event type constant."""
 *     return at.kMusicEventType_User
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_451get_music_event_type_user(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_450get_music_event_type_user, "get_music_event_type_user()\n\nGet the user event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_451get_music_event_type_user = {"get_music_event_type_user", (PyCFunction)__pyx_pw_9coremusic_4capi_451get_music_event_type_user, METH_NOARGS, __pyx_doc_9coremusic_4capi_450get_music_event_type_user};
static PyObject *__pyx_pw_9coremusic_4capi_451get_music_event_type_user(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_user (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_450get_music_event_type_user(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_450get_music_event_type_user(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_user", 0);

  /* "coremusic/capi.pyx":4616
 * def get_music_event_type_user():
 *     """Get the user event type constant."""
 *     return at.kMusicEventType_User             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_meta():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_User); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4614
 *     return at.kMusicEventType_ExtendedTempo
 * 
 * def get_music_event_type_user():             # <<<<<<<<<<<<<<
 *     """Get the user event type constant."""
 *     return at.kMusicEventType_User
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_user", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4618
 *     return at.kMusicEventType_User
 * 
 * def get_music_event_type_meta():             # <<<<<<<<<<<<<<
 *     """Get the meta event type constant."""
 *     return at.kMusicEventType_Meta
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_453get_music_event_type_meta(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_452get_music_event_type_meta, "get_music_event_type_meta()\n\nGet the meta event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_453get_music_event_type_meta = {"get_music_event_type_meta", (PyCFunction)__pyx_pw_9coremusic_4capi_453get_music_event_type_meta, METH_NOARGS, __pyx_doc_9coremusic_4capi_452get_music_event_type_meta};
static PyObject *__pyx_pw_9coremusic_4capi_453get_music_event_type_meta(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_meta (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_452get_music_event_type_meta(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_452get_music_event_type_meta(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_meta", 0);

  /* "coremusic/capi.pyx":4620
 * def get_music_event_type_meta():
 *     """Get the meta event type constant."""
 *     return at.kMusicEventType_Meta             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_midi_note_message():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_Meta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4618
 *     return at.kMusicEventType_User
 * 
 * def get_music_event_type_meta():             # <<<<<<<<<<<<<<
 *     """Get the meta event type constant."""
 *     return at.kMusicEventType_Meta
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_meta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4622
 *     return at.kMusicEventType_Meta
 * 
 * def get_music_event_type_midi_note_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI note message event type constant."""
 *     return at.kMusicEventType_MIDINoteMessage
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_455get_music_event_type_midi_note_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_454get_music_event_type_midi_note_message, "get_music_event_type_midi_note_message()\n\nGet the MIDI note message event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_455get_music_event_type_midi_note_message = {"get_music_event_type_midi_note_message", (PyCFunction)__pyx_pw_9coremusic_4capi_455get_music_event_type_midi_note_message, METH_NOARGS, __pyx_doc_9coremusic_4capi_454get_music_event_type_midi_note_message};
static PyObject *__pyx_pw_9coremusic_4capi_455get_music_event_type_midi_note_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_midi_note_message (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_454get_music_event_type_midi_note_message(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_454get_music_event_type_midi_note_message(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_midi_note_message", 0);

  /* "coremusic/capi.pyx":4624
 * def get_music_event_type_midi_note_message():
 *     """Get the MIDI note message event type constant."""
 *     return at.kMusicEventType_MIDINoteMessage             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_midi_channel_message():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_MIDINoteMessage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4622
 *     return at.kMusicEventType_Meta
 * 
 * def get_music_event_type_midi_note_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI note message event type constant."""
 *     return at.kMusicEventType_MIDINoteMessage
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_midi_note_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4626
 *     return at.kMusicEventType_MIDINoteMessage
 * 
 * def get_music_event_type_midi_channel_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI channel message event type constant."""
 *     return at.kMusicEventType_MIDIChannelMessage
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_457get_music_event_type_midi_channel_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_456get_music_event_type_midi_channel_message, "get_music_event_type_midi_channel_message()\n\nGet the MIDI channel message event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_457get_music_event_type_midi_channel_message = {"get_music_event_type_midi_channel_message", (PyCFunction)__pyx_pw_9coremusic_4capi_457get_music_event_type_midi_channel_message, METH_NOARGS, __pyx_doc_9coremusic_4capi_456get_music_event_type_midi_channel_message};
static PyObject *__pyx_pw_9coremusic_4capi_457get_music_event_type_midi_channel_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_midi_channel_message (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_456get_music_event_type_midi_channel_message(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_456get_music_event_type_midi_channel_message(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_midi_channel_message", 0);

  /* "coremusic/capi.pyx":4628
 * def get_music_event_type_midi_channel_message():
 *     """Get the MIDI channel message event type constant."""
 *     return at.kMusicEventType_MIDIChannelMessage             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_midi_raw_data():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_MIDIChannelMessage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4626
 *     return at.kMusicEventType_MIDINoteMessage
 * 
 * def get_music_event_type_midi_channel_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI channel message event type constant."""
 *     return at.kMusicEventType_MIDIChannelMessage
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_midi_channel_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4630
 *     return at.kMusicEventType_MIDIChannelMessage
 * 
 * def get_music_event_type_midi_raw_data():             # <<<<<<<<<<<<<<
 *     """Get the MIDI raw data event type constant."""
 *     return at.kMusicEventType_MIDIRawData
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_459get_music_event_type_midi_raw_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_458get_music_event_type_midi_raw_data, "get_music_event_type_midi_raw_data()\n\nGet the MIDI raw data event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_459get_music_event_type_midi_raw_data = {"get_music_event_type_midi_raw_data", (PyCFunction)__pyx_pw_9coremusic_4capi_459get_music_event_type_midi_raw_data, METH_NOARGS, __pyx_doc_9coremusic_4capi_458get_music_event_type_midi_raw_data};
static PyObject *__pyx_pw_9coremusic_4capi_459get_music_event_type_midi_raw_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_midi_raw_data (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_458get_music_event_type_midi_raw_data(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_458get_music_event_type_midi_raw_data(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_midi_raw_data", 0);

  /* "coremusic/capi.pyx":4632
 * def get_music_event_type_midi_raw_data():
 *     """Get the MIDI raw data event type constant."""
 *     return at.kMusicEventType_MIDIRawData             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_parameter():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_MIDIRawData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4630
 *     return at.kMusicEventType_MIDIChannelMessage
 * 
 * def get_music_event_type_midi_raw_data():             # <<<<<<<<<<<<<<
 *     """Get the MIDI raw data event type constant."""
 *     return at.kMusicEventType_MIDIRawData
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_midi_raw_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4634
 *     return at.kMusicEventType_MIDIRawData
 * 
 * def get_music_event_type_parameter():             # <<<<<<<<<<<<<<
 *     """Get the parameter event type constant."""
 *     return at.kMusicEventType_Parameter
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_461get_music_event_type_parameter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_460get_music_event_type_parameter, "get_music_event_type_parameter()\n\nGet the parameter event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_461get_music_event_type_parameter = {"get_music_event_type_parameter", (PyCFunction)__pyx_pw_9coremusic_4capi_461get_music_event_type_parameter, METH_NOARGS, __pyx_doc_9coremusic_4capi_460get_music_event_type_parameter};
static PyObject *__pyx_pw_9coremusic_4capi_461get_music_event_type_parameter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_parameter (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_460get_music_event_type_parameter(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_460get_music_event_type_parameter(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_parameter", 0);

  /* "coremusic/capi.pyx":4636
 * def get_music_event_type_parameter():
 *     """Get the parameter event type constant."""
 *     return at.kMusicEventType_Parameter             # <<<<<<<<<<<<<<
 * 
 * def get_music_event_type_au_preset():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_Parameter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4634
 *     return at.kMusicEventType_MIDIRawData
 * 
 * def get_music_event_type_parameter():             # <<<<<<<<<<<<<<
 *     """Get the parameter event type constant."""
 *     return at.kMusicEventType_Parameter
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4638
 *     return at.kMusicEventType_Parameter
 * 
 * def get_music_event_type_au_preset():             # <<<<<<<<<<<<<<
 *     """Get the AU preset event type constant."""
 *     return at.kMusicEventType_AUPreset
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_463get_music_event_type_au_preset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_462get_music_event_type_au_preset, "get_music_event_type_au_preset()\n\nGet the AU preset event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_463get_music_event_type_au_preset = {"get_music_event_type_au_preset", (PyCFunction)__pyx_pw_9coremusic_4capi_463get_music_event_type_au_preset, METH_NOARGS, __pyx_doc_9coremusic_4capi_462get_music_event_type_au_preset};
static PyObject *__pyx_pw_9coremusic_4capi_463get_music_event_type_au_preset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_event_type_au_preset (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_462get_music_event_type_au_preset(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_462get_music_event_type_au_preset(CYTHON_UNUSED PyObject *__pyx_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_music_event_type_au_preset", 0);

  /* "coremusic/capi.pyx":4640
 * def get_music_event_type_au_preset():
 *     """Get the AU preset event type constant."""
 *     return at.kMusicEventType_AUPreset             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_type_beats():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicEventType_AUPreset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4638
 *     return at.kMusicEventType_Parameter
 * 
 * def get_music_event_type_au_preset():             # <<<<<<<<<<<<<<
 *     """Get the AU preset event type constant."""
 *     return at.kMusicEventType_AUPreset
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_event_type_au_preset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4642
 *     return at.kMusicEventType_AUPreset
 * 
 * def get_music_sequence_type_beats():             # <<<<<<<<<<<<<<
 *     """Get the beats sequence type constant."""
 *     return at.kMusicSequenceType_Beats
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_465get_music_sequence_type_beats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_464get_music_sequence_type_beats, "get_music_sequence_type_beats()\n\nGet the beats sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_465get_music_sequence_type_beats = {"get_music_sequence_type_beats", (PyCFunction)__pyx_pw_9coremusic_4capi_465get_music_sequence_type_beats, METH_NOARGS, __pyx_doc_9coremusic_4capi_464get_music_sequence_type_beats};
static PyObject *__pyx_pw_9coremusic_4capi_465get_music_sequence_type_beats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_type_beats (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_464get_music_sequence_type_beats(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_464get_music_sequence_type_beats(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_type_beats", 0);

  /* "coremusic/capi.pyx":4644
 * def get_music_sequence_type_beats():
 *     """Get the beats sequence type constant."""
 *     return at.kMusicSequenceType_Beats             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_type_seconds():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceType_Beats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4642
 *     return at.kMusicEventType_AUPreset
 * 
 * def get_music_sequence_type_beats():             # <<<<<<<<<<<<<<
 *     """Get the beats sequence type constant."""
 *     return at.kMusicSequenceType_Beats
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_type_beats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4646
 *     return at.kMusicSequenceType_Beats
 * 
 * def get_music_sequence_type_seconds():             # <<<<<<<<<<<<<<
 *     """Get the seconds sequence type constant."""
 *     return at.kMusicSequenceType_Seconds
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_467get_music_sequence_type_seconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_466get_music_sequence_type_seconds, "get_music_sequence_type_seconds()\n\nGet the seconds sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_467get_music_sequence_type_seconds = {"get_music_sequence_type_seconds", (PyCFunction)__pyx_pw_9coremusic_4capi_467get_music_sequence_type_seconds, METH_NOARGS, __pyx_doc_9coremusic_4capi_466get_music_sequence_type_seconds};
static PyObject *__pyx_pw_9coremusic_4capi_467get_music_sequence_type_seconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_type_seconds (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_466get_music_sequence_type_seconds(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_466get_music_sequence_type_seconds(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_type_seconds", 0);

  /* "coremusic/capi.pyx":4648
 * def get_music_sequence_type_seconds():
 *     """Get the seconds sequence type constant."""
 *     return at.kMusicSequenceType_Seconds             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_type_samples():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceType_Seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4646
 *     return at.kMusicSequenceType_Beats
 * 
 * def get_music_sequence_type_seconds():             # <<<<<<<<<<<<<<
 *     """Get the seconds sequence type constant."""
 *     return at.kMusicSequenceType_Seconds
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_type_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4650
 *     return at.kMusicSequenceType_Seconds
 * 
 * def get_music_sequence_type_samples():             # <<<<<<<<<<<<<<
 *     """Get the samples sequence type constant."""
 *     return at.kMusicSequenceType_Samples
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_469get_music_sequence_type_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_468get_music_sequence_type_samples, "get_music_sequence_type_samples()\n\nGet the samples sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_469get_music_sequence_type_samples = {"get_music_sequence_type_samples", (PyCFunction)__pyx_pw_9coremusic_4capi_469get_music_sequence_type_samples, METH_NOARGS, __pyx_doc_9coremusic_4capi_468get_music_sequence_type_samples};
static PyObject *__pyx_pw_9coremusic_4capi_469get_music_sequence_type_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_type_samples (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_468get_music_sequence_type_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_468get_music_sequence_type_samples(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_type_samples", 0);

  /* "coremusic/capi.pyx":4652
 * def get_music_sequence_type_samples():
 *     """Get the samples sequence type constant."""
 *     return at.kMusicSequenceType_Samples             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_file_any_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceType_Samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4650
 *     return at.kMusicSequenceType_Seconds
 * 
 * def get_music_sequence_type_samples():             # <<<<<<<<<<<<<<
 *     """Get the samples sequence type constant."""
 *     return at.kMusicSequenceType_Samples
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_type_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4654
 *     return at.kMusicSequenceType_Samples
 * 
 * def get_music_sequence_file_any_type():             # <<<<<<<<<<<<<<
 *     """Get the any file type constant."""
 *     return at.kMusicSequenceFile_AnyType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_471get_music_sequence_file_any_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_470get_music_sequence_file_any_type, "get_music_sequence_file_any_type()\n\nGet the any file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_471get_music_sequence_file_any_type = {"get_music_sequence_file_any_type", (PyCFunction)__pyx_pw_9coremusic_4capi_471get_music_sequence_file_any_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_470get_music_sequence_file_any_type};
static PyObject *__pyx_pw_9coremusic_4capi_471get_music_sequence_file_any_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_file_any_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_470get_music_sequence_file_any_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_470get_music_sequence_file_any_type(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_file_any_type", 0);

  /* "coremusic/capi.pyx":4656
 * def get_music_sequence_file_any_type():
 *     """Get the any file type constant."""
 *     return at.kMusicSequenceFile_AnyType             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_file_midi_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceFile_AnyType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4654
 *     return at.kMusicSequenceType_Samples
 * 
 * def get_music_sequence_file_any_type():             # <<<<<<<<<<<<<<
 *     """Get the any file type constant."""
 *     return at.kMusicSequenceFile_AnyType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_file_any_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4658
 *     return at.kMusicSequenceFile_AnyType
 * 
 * def get_music_sequence_file_midi_type():             # <<<<<<<<<<<<<<
 *     """Get the MIDI file type constant."""
 *     return at.kMusicSequenceFile_MIDIType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_473get_music_sequence_file_midi_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_472get_music_sequence_file_midi_type, "get_music_sequence_file_midi_type()\n\nGet the MIDI file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_473get_music_sequence_file_midi_type = {"get_music_sequence_file_midi_type", (PyCFunction)__pyx_pw_9coremusic_4capi_473get_music_sequence_file_midi_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_472get_music_sequence_file_midi_type};
static PyObject *__pyx_pw_9coremusic_4capi_473get_music_sequence_file_midi_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_file_midi_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_472get_music_sequence_file_midi_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_472get_music_sequence_file_midi_type(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_file_midi_type", 0);

  /* "coremusic/capi.pyx":4660
 * def get_music_sequence_file_midi_type():
 *     """Get the MIDI file type constant."""
 *     return at.kMusicSequenceFile_MIDIType             # <<<<<<<<<<<<<<
 * 
 * def get_music_sequence_file_imelody_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceFile_MIDIType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4658
 *     return at.kMusicSequenceFile_AnyType
 * 
 * def get_music_sequence_file_midi_type():             # <<<<<<<<<<<<<<
 *     """Get the MIDI file type constant."""
 *     return at.kMusicSequenceFile_MIDIType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_file_midi_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4662
 *     return at.kMusicSequenceFile_MIDIType
 * 
 * def get_music_sequence_file_imelody_type():             # <<<<<<<<<<<<<<
 *     """Get the iMelody file type constant."""
 *     return at.kMusicSequenceFile_iMelodyType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_475get_music_sequence_file_imelody_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_474get_music_sequence_file_imelody_type, "get_music_sequence_file_imelody_type()\n\nGet the iMelody file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_475get_music_sequence_file_imelody_type = {"get_music_sequence_file_imelody_type", (PyCFunction)__pyx_pw_9coremusic_4capi_475get_music_sequence_file_imelody_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_474get_music_sequence_file_imelody_type};
static PyObject *__pyx_pw_9coremusic_4capi_475get_music_sequence_file_imelody_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_music_sequence_file_imelody_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_474get_music_sequence_file_imelody_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_474get_music_sequence_file_imelody_type(CYTHON_UNUSED PyObject *__pyx_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_music_sequence_file_imelody_type", 0);

  /* "coremusic/capi.pyx":4664
 * def get_music_sequence_file_imelody_type():
 *     """Get the iMelody file type constant."""
 *     return at.kMusicSequenceFile_iMelodyType             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_loop_info():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMusicSequenceFile_iMelodyType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4662
 *     return at.kMusicSequenceFile_MIDIType
 * 
 * def get_music_sequence_file_imelody_type():             # <<<<<<<<<<<<<<
 *     """Get the iMelody file type constant."""
 *     return at.kMusicSequenceFile_iMelodyType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_music_sequence_file_imelody_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4666
 *     return at.kMusicSequenceFile_iMelodyType
 * 
 * def get_sequence_track_property_loop_info():             # <<<<<<<<<<<<<<
 *     """Get the loop info track property constant."""
 *     return at.kSequenceTrackProperty_LoopInfo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_477get_sequence_track_property_loop_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_476get_sequence_track_property_loop_info, "get_sequence_track_property_loop_info()\n\nGet the loop info track property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_477get_sequence_track_property_loop_info = {"get_sequence_track_property_loop_info", (PyCFunction)__pyx_pw_9coremusic_4capi_477get_sequence_track_property_loop_info, METH_NOARGS, __pyx_doc_9coremusic_4capi_476get_sequence_track_property_loop_info};
static PyObject *__pyx_pw_9coremusic_4capi_477get_sequence_track_property_loop_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_loop_info (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_476get_sequence_track_property_loop_info(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_476get_sequence_track_property_loop_info(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_loop_info", 0);

  /* "coremusic/capi.pyx":4668
 * def get_sequence_track_property_loop_info():
 *     """Get the loop info track property constant."""
 *     return at.kSequenceTrackProperty_LoopInfo             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_offset_time():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_LoopInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4666
 *     return at.kMusicSequenceFile_iMelodyType
 * 
 * def get_sequence_track_property_loop_info():             # <<<<<<<<<<<<<<
 *     """Get the loop info track property constant."""
 *     return at.kSequenceTrackProperty_LoopInfo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_loop_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4670
 *     return at.kSequenceTrackProperty_LoopInfo
 * 
 * def get_sequence_track_property_offset_time():             # <<<<<<<<<<<<<<
 *     """Get the offset time track property constant."""
 *     return at.kSequenceTrackProperty_OffsetTime
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_479get_sequence_track_property_offset_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_478get_sequence_track_property_offset_time, "get_sequence_track_property_offset_time()\n\nGet the offset time track property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_479get_sequence_track_property_offset_time = {"get_sequence_track_property_offset_time", (PyCFunction)__pyx_pw_9coremusic_4capi_479get_sequence_track_property_offset_time, METH_NOARGS, __pyx_doc_9coremusic_4capi_478get_sequence_track_property_offset_time};
static PyObject *__pyx_pw_9coremusic_4capi_479get_sequence_track_property_offset_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_offset_time (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_478get_sequence_track_property_offset_time(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_478get_sequence_track_property_offset_time(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_offset_time", 0);

  /* "coremusic/capi.pyx":4672
 * def get_sequence_track_property_offset_time():
 *     """Get the offset time track property constant."""
 *     return at.kSequenceTrackProperty_OffsetTime             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_mute_status():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_OffsetTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4670
 *     return at.kSequenceTrackProperty_LoopInfo
 * 
 * def get_sequence_track_property_offset_time():             # <<<<<<<<<<<<<<
 *     """Get the offset time track property constant."""
 *     return at.kSequenceTrackProperty_OffsetTime
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_offset_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4674
 *     return at.kSequenceTrackProperty_OffsetTime
 * 
 * def get_sequence_track_property_mute_status():             # <<<<<<<<<<<<<<
 *     """Get the mute status track property constant."""
 *     return at.kSequenceTrackProperty_MuteStatus
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_481get_sequence_track_property_mute_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_480get_sequence_track_property_mute_status, "get_sequence_track_property_mute_status()\n\nGet the mute status track property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_481get_sequence_track_property_mute_status = {"get_sequence_track_property_mute_status", (PyCFunction)__pyx_pw_9coremusic_4capi_481get_sequence_track_property_mute_status, METH_NOARGS, __pyx_doc_9coremusic_4capi_480get_sequence_track_property_mute_status};
static PyObject *__pyx_pw_9coremusic_4capi_481get_sequence_track_property_mute_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_mute_status (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_480get_sequence_track_property_mute_status(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_480get_sequence_track_property_mute_status(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_mute_status", 0);

  /* "coremusic/capi.pyx":4676
 * def get_sequence_track_property_mute_status():
 *     """Get the mute status track property constant."""
 *     return at.kSequenceTrackProperty_MuteStatus             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_solo_status():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_MuteStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4674
 *     return at.kSequenceTrackProperty_OffsetTime
 * 
 * def get_sequence_track_property_mute_status():             # <<<<<<<<<<<<<<
 *     """Get the mute status track property constant."""
 *     return at.kSequenceTrackProperty_MuteStatus
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_mute_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4678
 *     return at.kSequenceTrackProperty_MuteStatus
 * 
 * def get_sequence_track_property_solo_status():             # <<<<<<<<<<<<<<
 *     """Get the solo status track property constant."""
 *     return at.kSequenceTrackProperty_SoloStatus
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_483get_sequence_track_property_solo_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_482get_sequence_track_property_solo_status, "get_sequence_track_property_solo_status()\n\nGet the solo status track property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_483get_sequence_track_property_solo_status = {"get_sequence_track_property_solo_status", (PyCFunction)__pyx_pw_9coremusic_4capi_483get_sequence_track_property_solo_status, METH_NOARGS, __pyx_doc_9coremusic_4capi_482get_sequence_track_property_solo_status};
static PyObject *__pyx_pw_9coremusic_4capi_483get_sequence_track_property_solo_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_solo_status (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_482get_sequence_track_property_solo_status(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_482get_sequence_track_property_solo_status(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_solo_status", 0);

  /* "coremusic/capi.pyx":4680
 * def get_sequence_track_property_solo_status():
 *     """Get the solo status track property constant."""
 *     return at.kSequenceTrackProperty_SoloStatus             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_automated_parameters():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_SoloStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4678
 *     return at.kSequenceTrackProperty_MuteStatus
 * 
 * def get_sequence_track_property_solo_status():             # <<<<<<<<<<<<<<
 *     """Get the solo status track property constant."""
 *     return at.kSequenceTrackProperty_SoloStatus
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_solo_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4682
 *     return at.kSequenceTrackProperty_SoloStatus
 * 
 * def get_sequence_track_property_automated_parameters():             # <<<<<<<<<<<<<<
 *     """Get the automated parameters track property constant."""
 *     return at.kSequenceTrackProperty_AutomatedParameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_485get_sequence_track_property_automated_parameters(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_484get_sequence_track_property_automated_parameters, "get_sequence_track_property_automated_parameters()\n\nGet the automated parameters track property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_485get_sequence_track_property_automated_parameters = {"get_sequence_track_property_automated_parameters", (PyCFunction)__pyx_pw_9coremusic_4capi_485get_sequence_track_property_automated_parameters, METH_NOARGS, __pyx_doc_9coremusic_4capi_484get_sequence_track_property_automated_parameters};
static PyObject *__pyx_pw_9coremusic_4capi_485get_sequence_track_property_automated_parameters(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_automated_parameters (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_484get_sequence_track_property_automated_parameters(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_484get_sequence_track_property_automated_parameters(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_automated_parameters", 0);

  /* "coremusic/capi.pyx":4684
 * def get_sequence_track_property_automated_parameters():
 *     """Get the automated parameters track property constant."""
 *     return at.kSequenceTrackProperty_AutomatedParameters             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_track_length():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_AutomatedParameters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4682
 *     return at.kSequenceTrackProperty_SoloStatus
 * 
 * def get_sequence_track_property_automated_parameters():             # <<<<<<<<<<<<<<
 *     """Get the automated parameters track property constant."""
 *     return at.kSequenceTrackProperty_AutomatedParameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_automated_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4686
 *     return at.kSequenceTrackProperty_AutomatedParameters
 * 
 * def get_sequence_track_property_track_length():             # <<<<<<<<<<<<<<
 *     """Get the track length property constant."""
 *     return at.kSequenceTrackProperty_TrackLength
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_487get_sequence_track_property_track_length(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_486get_sequence_track_property_track_length, "get_sequence_track_property_track_length()\n\nGet the track length property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_487get_sequence_track_property_track_length = {"get_sequence_track_property_track_length", (PyCFunction)__pyx_pw_9coremusic_4capi_487get_sequence_track_property_track_length, METH_NOARGS, __pyx_doc_9coremusic_4capi_486get_sequence_track_property_track_length};
static PyObject *__pyx_pw_9coremusic_4capi_487get_sequence_track_property_track_length(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_track_length (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_486get_sequence_track_property_track_length(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_486get_sequence_track_property_track_length(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_track_length", 0);

  /* "coremusic/capi.pyx":4688
 * def get_sequence_track_property_track_length():
 *     """Get the track length property constant."""
 *     return at.kSequenceTrackProperty_TrackLength             # <<<<<<<<<<<<<<
 * 
 * def get_sequence_track_property_time_resolution():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_TrackLength); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4686
 *     return at.kSequenceTrackProperty_AutomatedParameters
 * 
 * def get_sequence_track_property_track_length():             # <<<<<<<<<<<<<<
 *     """Get the track length property constant."""
 *     return at.kSequenceTrackProperty_TrackLength
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_track_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4690
 *     return at.kSequenceTrackProperty_TrackLength
 * 
 * def get_sequence_track_property_time_resolution():             # <<<<<<<<<<<<<<
 *     """Get the time resolution property constant."""
 *     return at.kSequenceTrackProperty_TimeResolution
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_489get_sequence_track_property_time_resolution(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_488get_sequence_track_property_time_resolution, "get_sequence_track_property_time_resolution()\n\nGet the time resolution property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_489get_sequence_track_property_time_resolution = {"get_sequence_track_property_time_resolution", (PyCFunction)__pyx_pw_9coremusic_4capi_489get_sequence_track_property_time_resolution, METH_NOARGS, __pyx_doc_9coremusic_4capi_488get_sequence_track_property_time_resolution};
static PyObject *__pyx_pw_9coremusic_4capi_489get_sequence_track_property_time_resolution(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sequence_track_property_time_resolution (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_488get_sequence_track_property_time_resolution(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_488get_sequence_track_property_time_resolution(CYTHON_UNUSED PyObject *__pyx_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_sequence_track_property_time_resolution", 0);

  /* "coremusic/capi.pyx":4692
 * def get_sequence_track_property_time_resolution():
 *     """Get the time resolution property constant."""
 *     return at.kSequenceTrackProperty_TimeResolution             # <<<<<<<<<<<<<<
 * 
 * # Helper functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kSequenceTrackProperty_TimeResolution); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4690
 *     return at.kSequenceTrackProperty_TrackLength
 * 
 * def get_sequence_track_property_time_resolution():             # <<<<<<<<<<<<<<
 *     """Get the time resolution property constant."""
 *     return at.kSequenceTrackProperty_TimeResolution
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_sequence_track_property_time_resolution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4696
 * # Helper functions
 * 
 * def create_midi_note_message(int channel, int note, int velocity, int release_velocity=0, double duration=1.0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI note message dictionary.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_491create_midi_note_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_490create_midi_note_message, "create_midi_note_message(int channel, int note, int velocity, int release_velocity=0, double duration=1.0)\n\nCreate a MIDI note message dictionary.\n\nArgs:\n    channel: MIDI channel (0-15)\n    note: MIDI note number (0-127)\n    velocity: Note on velocity (0-127)\n    release_velocity: Note off velocity (0-127, default 0)\n    duration: Note duration in beats (default 1.0)\n\nReturns:\n    Dictionary with note message parameters");
static PyMethodDef __pyx_mdef_9coremusic_4capi_491create_midi_note_message = {"create_midi_note_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_491create_midi_note_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_490create_midi_note_message};
static PyObject *__pyx_pw_9coremusic_4capi_491create_midi_note_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_channel;
  int __pyx_v_note;
  int __pyx_v_velocity;
  int __pyx_v_release_velocity;
  double __pyx_v_duration;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_midi_note_message (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note,&__pyx_mstate_global->__pyx_n_u_velocity,&__pyx_mstate_global->__pyx_n_u_release_velocity,&__pyx_mstate_global->__pyx_n_u_duration,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4696, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_midi_note_message", 0) < (0)) __PYX_ERR(0, 4696, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_midi_note_message", 0, 3, 5, i); __PYX_ERR(0, 4696, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4696, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4696, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4696, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4696, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4696, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4696, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4696, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_release_velocity = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_release_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4696, __pyx_L3_error)
    } else {
      __pyx_v_release_velocity = ((int)((int)0));
    }
    if (values[4]) {
      __pyx_v_duration = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_duration == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4696, __pyx_L3_error)
    } else {
      __pyx_v_duration = ((double)((double)1.0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_midi_note_message", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 4696, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.create_midi_note_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_490create_midi_note_message(__pyx_self, __pyx_v_channel, __pyx_v_note, __pyx_v_velocity, __pyx_v_release_velocity, __pyx_v_duration);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_490create_midi_note_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_note, int __pyx_v_velocity, int __pyx_v_release_velocity, double __pyx_v_duration) {
  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("create_midi_note_message", 0);

  /* "coremusic/capi.pyx":4709
 *         Dictionary with note message parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'channel': channel & 0x0F,
 *         'note': note & 0x7F,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":4710
 *     """
 *     return {
 *         'channel': channel & 0x0F,             # <<<<<<<<<<<<<<
 *         'note': note & 0x7F,
 *         'velocity': velocity & 0x7F,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_channel & 0x0F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_channel, __pyx_t_2) < (0)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4711
 *     return {
 *         'channel': channel & 0x0F,
 *         'note': note & 0x7F,             # <<<<<<<<<<<<<<
 *         'velocity': velocity & 0x7F,
 *         'release_velocity': release_velocity & 0x7F,
*/
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_note & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_note, __pyx_t_2) < (0)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4712
 *         'channel': channel & 0x0F,
 *         'note': note & 0x7F,
 *         'velocity': velocity & 0x7F,             # <<<<<<<<<<<<<<
 *         'release_velocity': release_velocity & 0x7F,
 *         'duration': duration
*/
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_velocity & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_2) < (0)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4713
 *         'note': note & 0x7F,
 *         'velocity': velocity & 0x7F,
 *         'release_velocity': release_velocity & 0x7F,             # <<<<<<<<<<<<<<
 *         'duration': duration
 *     }
*/
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_release_velocity & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_release_velocity, __pyx_t_2) < (0)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4714
 *         'velocity': velocity & 0x7F,
 *         'release_velocity': release_velocity & 0x7F,
 *         'duration': duration             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_duration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_duration, __pyx_t_2) < (0)) __PYX_ERR(0, 4710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4696
 * # Helper functions
 * 
 * def create_midi_note_message(int channel, int note, int velocity, int release_velocity=0, double duration=1.0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI note message dictionary.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.create_midi_note_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4717
 *     }
 * 
 * def create_midi_channel_message(int status, int data1, int data2=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI channel message dictionary.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_493create_midi_channel_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_492create_midi_channel_message, "create_midi_channel_message(int status, int data1, int data2=0)\n\nCreate a MIDI channel message dictionary.\n\nArgs:\n    status: MIDI status byte\n    data1: First data byte\n    data2: Second data byte (default 0)\n\nReturns:\n    Dictionary with channel message parameters");
static PyMethodDef __pyx_mdef_9coremusic_4capi_493create_midi_channel_message = {"create_midi_channel_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_493create_midi_channel_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_492create_midi_channel_message};
static PyObject *__pyx_pw_9coremusic_4capi_493create_midi_channel_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_status;
  int __pyx_v_data1;
  int __pyx_v_data2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_midi_channel_message (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_data1,&__pyx_mstate_global->__pyx_n_u_data2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4717, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4717, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4717, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4717, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create_midi_channel_message", 0) < (0)) __PYX_ERR(0, 4717, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_midi_channel_message", 0, 2, 3, i); __PYX_ERR(0, 4717, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4717, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4717, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4717, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_status = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4717, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4717, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_data2 = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4717, __pyx_L3_error)
    } else {
      __pyx_v_data2 = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_midi_channel_message", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4717, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.create_midi_channel_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_492create_midi_channel_message(__pyx_self, __pyx_v_status, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_492create_midi_channel_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status, int __pyx_v_data1, int __pyx_v_data2) {
  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("create_midi_channel_message", 0);

  /* "coremusic/capi.pyx":4728
 *         Dictionary with channel message parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'status': status & 0xFF,
 *         'data1': data1 & 0x7F,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":4729
 *     """
 *     return {
 *         'status': status & 0xFF,             # <<<<<<<<<<<<<<
 *         'data1': data1 & 0x7F,
 *         'data2': data2 & 0x7F
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_status & 0xFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_status, __pyx_t_2) < (0)) __PYX_ERR(0, 4729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4730
 *     return {
 *         'status': status & 0xFF,
 *         'data1': data1 & 0x7F,             # <<<<<<<<<<<<<<
 *         'data2': data2 & 0x7F
 *     }
*/
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_data1 & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data1, __pyx_t_2) < (0)) __PYX_ERR(0, 4729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4731
 *         'status': status & 0xFF,
 *         'data1': data1 & 0x7F,
 *         'data2': data2 & 0x7F             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_data2 & 0x7F)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data2, __pyx_t_2) < (0)) __PYX_ERR(0, 4729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4717
 *     }
 * 
 * def create_midi_channel_message(int status, int data1, int data2=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI channel message dictionary.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("coremusic.capi.create_midi_channel_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4739
 * # Client functions
 * 
 * def midi_client_create(str name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI client.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_495midi_client_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_494midi_client_create, "midi_client_create(str name)\n\nCreate a MIDI client.\n\nArgs:\n    name: The client's name\n\nReturns:\n    MIDIClientRef handle\n\nRaises:\n    RuntimeError: If client creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_495midi_client_create = {"midi_client_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_495midi_client_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_494midi_client_create};
static PyObject *__pyx_pw_9coremusic_4capi_495midi_client_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_client_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4739, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4739, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_client_create", 0) < (0)) __PYX_ERR(0, 4739, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_client_create", 1, 1, 1, i); __PYX_ERR(0, 4739, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4739, __pyx_L3_error)
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_client_create", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4739, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_client_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 4739, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_494midi_client_create(__pyx_self, __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_494midi_client_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_name_bytes = 0;
  CFStringRef __pyx_v_cf_name;
  MIDIClientRef __pyx_v_client;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_client_create", 0);

  /* "coremusic/capi.pyx":4751
 *         RuntimeError: If client creation fails
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4751, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4753
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cm.MIDIClientRef client
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4753, __pyx_L1_error)

  /* "coremusic/capi.pyx":4752
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cm.MIDIClientRef client
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":4757
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":4758
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_n};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4758, __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_ERR(0, 4758, __pyx_L1_error)

    /* "coremusic/capi.pyx":4757
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":4760
 *         raise MemoryError("Could not create CFString from name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4761
 * 
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIClientCreate"))
*/
    __pyx_v_status = MIDIClientCreate(__pyx_v_cf_name, NULL, NULL, (&__pyx_v_client));

    /* "coremusic/capi.pyx":4762
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIClientCreate"))
 *         return <long>client
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4763
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIClientCreate"))             # <<<<<<<<<<<<<<
 *         return <long>client
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIClientCreate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4763, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4763, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 4763, __pyx_L5_error)

      /* "coremusic/capi.pyx":4762
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIClientCreate"))
 *         return <long>client
*/
    }

    /* "coremusic/capi.pyx":4764
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIClientCreate"))
 *         return <long>client             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_client)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4764, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":4766
 *         return <long>client
 *     finally:
 *         cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_client_dispose(long client):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4739
 * # Client functions
 * 
 * def midi_client_create(str name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI client.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_client_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4768
 *         cf.CFRelease(cf_name)
 * 
 * def midi_client_dispose(long client):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI client.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_497midi_client_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_496midi_client_dispose, "midi_client_dispose(long client)\n\nDispose a MIDI client.\n\nArgs:\n    client: The MIDIClientRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_497midi_client_dispose = {"midi_client_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_497midi_client_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_496midi_client_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_497midi_client_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_client;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_client_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_client,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4768, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4768, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_client_dispose", 0) < (0)) __PYX_ERR(0, 4768, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_client_dispose", 1, 1, 1, i); __PYX_ERR(0, 4768, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4768, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4768, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_client_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4768, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_client_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_496midi_client_dispose(__pyx_self, __pyx_v_client);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_496midi_client_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_client_dispose", 0);

  /* "coremusic/capi.pyx":4780
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIClientDispose"))
*/
  __pyx_v_status = MIDIClientDispose(((MIDIClientRef)__pyx_v_client));

  /* "coremusic/capi.pyx":4781
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIClientDispose"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4782
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIClientDispose"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIClientDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4782, __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_ERR(0, 4782, __pyx_L1_error)

    /* "coremusic/capi.pyx":4781
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIClientDispose"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4783
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIClientDispose"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * # Port functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4768
 *         cf.CFRelease(cf_name)
 * 
 * def midi_client_dispose(long client):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI client.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_client_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4787
 * # Port functions
 * 
 * def midi_input_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI input port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_499midi_input_port_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_498midi_input_port_create, "midi_input_port_create(long client, str port_name)\n\nCreate a MIDI input port.\n\nArgs:\n    client: The MIDIClientRef\n    port_name: Name for the input port\n\nReturns:\n    MIDIPortRef handle\n\nRaises:\n    RuntimeError: If port creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_499midi_input_port_create = {"midi_input_port_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_499midi_input_port_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_498midi_input_port_create};
static PyObject *__pyx_pw_9coremusic_4capi_499midi_input_port_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_client;
  PyObject *__pyx_v_port_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_input_port_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_client,&__pyx_mstate_global->__pyx_n_u_port_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4787, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4787, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4787, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_input_port_create", 0) < (0)) __PYX_ERR(0, 4787, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_input_port_create", 1, 2, 2, i); __PYX_ERR(0, 4787, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4787, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4787, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4787, __pyx_L3_error)
    __pyx_v_port_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_input_port_create", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4787, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_input_port_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_port_name), (&PyUnicode_Type), 1, "port_name", 1))) __PYX_ERR(0, 4787, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_498midi_input_port_create(__pyx_self, __pyx_v_client, __pyx_v_port_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_498midi_input_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name) {
  PyObject *__pyx_v_port_name_bytes = 0;
  CFStringRef __pyx_v_cf_name;
  MIDIPortRef __pyx_v_port;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_input_port_create", 0);

  /* "coremusic/capi.pyx":4800
 *         RuntimeError: If port creation fails
 *     """
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_port_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4800, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_port_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_port_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4802
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cm.MIDIPortRef port
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_port_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4802, __pyx_L1_error)

  /* "coremusic/capi.pyx":4801
 *     """
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cm.MIDIPortRef port
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":4806
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":4807
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from port name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4807, __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_ERR(0, 4807, __pyx_L1_error)

    /* "coremusic/capi.pyx":4806
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  }

  /* "coremusic/capi.pyx":4809
 *         raise MemoryError("Could not create CFString from port name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIInputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4810
 * 
 *     try:
 *         status = cm.MIDIInputPortCreate(             # <<<<<<<<<<<<<<
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:
*/
    __pyx_v_status = MIDIInputPortCreate(((MIDIClientRef)__pyx_v_client), __pyx_v_cf_name, NULL, NULL, (&__pyx_v_port));

    /* "coremusic/capi.pyx":4812
 *         status = cm.MIDIInputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIInputPortCreate"))
 *         return <long>port
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4813
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIInputPortCreate"))             # <<<<<<<<<<<<<<
 *         return <long>port
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIInputPortCreate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4813, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4813, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 4813, __pyx_L5_error)

      /* "coremusic/capi.pyx":4812
 *         status = cm.MIDIInputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIInputPortCreate"))
 *         return <long>port
*/
    }

    /* "coremusic/capi.pyx":4814
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIInputPortCreate"))
 *         return <long>port             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_port)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4814, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":4816
 *         return <long>port
 *     finally:
 *         cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_output_port_create(long client, str port_name):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4787
 * # Port functions
 * 
 * def midi_input_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI input port.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_input_port_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_port_name_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4818
 *         cf.CFRelease(cf_name)
 * 
 * def midi_output_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI output port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_501midi_output_port_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_500midi_output_port_create, "midi_output_port_create(long client, str port_name)\n\nCreate a MIDI output port.\n\nArgs:\n    client: The MIDIClientRef\n    port_name: Name for the output port\n\nReturns:\n    MIDIPortRef handle\n\nRaises:\n    RuntimeError: If port creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_501midi_output_port_create = {"midi_output_port_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_501midi_output_port_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_500midi_output_port_create};
static PyObject *__pyx_pw_9coremusic_4capi_501midi_output_port_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_client;
  PyObject *__pyx_v_port_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_output_port_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_client,&__pyx_mstate_global->__pyx_n_u_port_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4818, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4818, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4818, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_output_port_create", 0) < (0)) __PYX_ERR(0, 4818, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_output_port_create", 1, 2, 2, i); __PYX_ERR(0, 4818, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4818, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4818, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4818, __pyx_L3_error)
    __pyx_v_port_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_output_port_create", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4818, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_output_port_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_port_name), (&PyUnicode_Type), 1, "port_name", 1))) __PYX_ERR(0, 4818, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_500midi_output_port_create(__pyx_self, __pyx_v_client, __pyx_v_port_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_500midi_output_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name) {
  PyObject *__pyx_v_port_name_bytes = 0;
  CFStringRef __pyx_v_cf_name;
  MIDIPortRef __pyx_v_port;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_output_port_create", 0);

  /* "coremusic/capi.pyx":4831
 *         RuntimeError: If port creation fails
 *     """
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_port_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4831, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_port_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_port_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4833
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cm.MIDIPortRef port
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_port_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4833, __pyx_L1_error)

  /* "coremusic/capi.pyx":4832
 *     """
 *     cdef bytes port_name_bytes = port_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, port_name_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cm.MIDIPortRef port
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":4837
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":4838
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from port name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __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_ERR(0, 4838, __pyx_L1_error)

    /* "coremusic/capi.pyx":4837
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  }

  /* "coremusic/capi.pyx":4840
 *         raise MemoryError("Could not create CFString from port name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4841
 * 
 *     try:
 *         status = cm.MIDIOutputPortCreate(             # <<<<<<<<<<<<<<
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:
*/
    __pyx_v_status = MIDIOutputPortCreate(((MIDIClientRef)__pyx_v_client), __pyx_v_cf_name, (&__pyx_v_port));

    /* "coremusic/capi.pyx":4843
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIOutputPortCreate"))
 *         return <long>port
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4844
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIOutputPortCreate"))             # <<<<<<<<<<<<<<
 *         return <long>port
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIOutputPortCreate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4844, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4844, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 4844, __pyx_L5_error)

      /* "coremusic/capi.pyx":4843
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIOutputPortCreate"))
 *         return <long>port
*/
    }

    /* "coremusic/capi.pyx":4845
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIOutputPortCreate"))
 *         return <long>port             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_port)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4845, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":4847
 *         return <long>port
 *     finally:
 *         cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_port_dispose(long port):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4818
 *         cf.CFRelease(cf_name)
 * 
 * def midi_output_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI output port.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_output_port_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_port_name_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4849
 *         cf.CFRelease(cf_name)
 * 
 * def midi_port_dispose(long port):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_503midi_port_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_502midi_port_dispose, "midi_port_dispose(long port)\n\nDispose a MIDI port.\n\nArgs:\n    port: The MIDIPortRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_503midi_port_dispose = {"midi_port_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_503midi_port_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_502midi_port_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_503midi_port_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_port;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_port_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_port,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4849, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_port_dispose", 0) < (0)) __PYX_ERR(0, 4849, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_port_dispose", 1, 1, 1, i); __PYX_ERR(0, 4849, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4849, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4849, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_port_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4849, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_port_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_502midi_port_dispose(__pyx_self, __pyx_v_port);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_502midi_port_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_port_dispose", 0);

  /* "coremusic/capi.pyx":4861
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDispose"))
*/
  __pyx_v_status = MIDIPortDispose(((MIDIPortRef)__pyx_v_port));

  /* "coremusic/capi.pyx":4862
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDispose"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4863
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDispose"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIPortDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4863, __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_ERR(0, 4863, __pyx_L1_error)

    /* "coremusic/capi.pyx":4862
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDispose"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4864
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDispose"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_port_connect_source(long port, long source):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4849
 *         cf.CFRelease(cf_name)
 * 
 * def midi_port_dispose(long port):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI port.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_port_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4866
 *     return status
 * 
 * def midi_port_connect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Connect a source to an input port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_505midi_port_connect_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_504midi_port_connect_source, "midi_port_connect_source(long port, long source)\n\nConnect a source to an input port.\n\nArgs:\n    port: The MIDIPortRef (input port)\n    source: The MIDIEndpointRef (source endpoint)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If connection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_505midi_port_connect_source = {"midi_port_connect_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_505midi_port_connect_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_504midi_port_connect_source};
static PyObject *__pyx_pw_9coremusic_4capi_505midi_port_connect_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_port;
  long __pyx_v_source;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_port_connect_source (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_port,&__pyx_mstate_global->__pyx_n_u_source,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4866, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4866, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4866, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_port_connect_source", 0) < (0)) __PYX_ERR(0, 4866, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_port_connect_source", 1, 2, 2, i); __PYX_ERR(0, 4866, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4866, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4866, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4866, __pyx_L3_error)
    __pyx_v_source = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_source == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4866, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_port_connect_source", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4866, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_port_connect_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_504midi_port_connect_source(__pyx_self, __pyx_v_port, __pyx_v_source);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_504midi_port_connect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_port_connect_source", 0);

  /* "coremusic/capi.pyx":4879
 *         RuntimeError: If connection fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortConnectSource(             # <<<<<<<<<<<<<<
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:
*/
  __pyx_v_status = MIDIPortConnectSource(((MIDIPortRef)__pyx_v_port), ((MIDIEndpointRef)__pyx_v_source), NULL);

  /* "coremusic/capi.pyx":4881
 *     cdef cf.OSStatus status = cm.MIDIPortConnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortConnectSource"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4882
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortConnectSource"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIPortConnectSource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4882, __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_ERR(0, 4882, __pyx_L1_error)

    /* "coremusic/capi.pyx":4881
 *     cdef cf.OSStatus status = cm.MIDIPortConnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortConnectSource"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4883
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortConnectSource"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_port_disconnect_source(long port, long source):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4866
 *     return status
 * 
 * def midi_port_connect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Connect a source to an input port.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_port_connect_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4885
 *     return status
 * 
 * def midi_port_disconnect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Disconnect a source from an input port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_507midi_port_disconnect_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_506midi_port_disconnect_source, "midi_port_disconnect_source(long port, long source)\n\nDisconnect a source from an input port.\n\nArgs:\n    port: The MIDIPortRef (input port)\n    source: The MIDIEndpointRef (source endpoint)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disconnection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_507midi_port_disconnect_source = {"midi_port_disconnect_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_507midi_port_disconnect_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_506midi_port_disconnect_source};
static PyObject *__pyx_pw_9coremusic_4capi_507midi_port_disconnect_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_port;
  long __pyx_v_source;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_port_disconnect_source (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_port,&__pyx_mstate_global->__pyx_n_u_source,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4885, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4885, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4885, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_port_disconnect_source", 0) < (0)) __PYX_ERR(0, 4885, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_port_disconnect_source", 1, 2, 2, i); __PYX_ERR(0, 4885, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4885, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4885, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4885, __pyx_L3_error)
    __pyx_v_source = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_source == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4885, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_port_disconnect_source", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4885, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_port_disconnect_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_506midi_port_disconnect_source(__pyx_self, __pyx_v_port, __pyx_v_source);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_506midi_port_disconnect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_port_disconnect_source", 0);

  /* "coremusic/capi.pyx":4898
 *         RuntimeError: If disconnection fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDisconnectSource(             # <<<<<<<<<<<<<<
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:
*/
  __pyx_v_status = MIDIPortDisconnectSource(((MIDIPortRef)__pyx_v_port), ((MIDIEndpointRef)__pyx_v_source));

  /* "coremusic/capi.pyx":4900
 *     cdef cf.OSStatus status = cm.MIDIPortDisconnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDisconnectSource"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4901
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDisconnectSource"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIPortDisconnectSource); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4901, __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_ERR(0, 4901, __pyx_L1_error)

    /* "coremusic/capi.pyx":4900
 *     cdef cf.OSStatus status = cm.MIDIPortDisconnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDisconnectSource"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":4902
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIPortDisconnectSource"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * # Device and endpoint discovery
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4885
 *     return status
 * 
 * def midi_port_disconnect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Disconnect a source from an input port.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_port_disconnect_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4906
 * # Device and endpoint discovery
 * 
 * def midi_get_number_of_devices():             # <<<<<<<<<<<<<<
 *     """Get the number of MIDI devices in the system.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_509midi_get_number_of_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_508midi_get_number_of_devices, "midi_get_number_of_devices()\n\nGet the number of MIDI devices in the system.\n\nReturns:\n    Number of devices");
static PyMethodDef __pyx_mdef_9coremusic_4capi_509midi_get_number_of_devices = {"midi_get_number_of_devices", (PyCFunction)__pyx_pw_9coremusic_4capi_509midi_get_number_of_devices, METH_NOARGS, __pyx_doc_9coremusic_4capi_508midi_get_number_of_devices};
static PyObject *__pyx_pw_9coremusic_4capi_509midi_get_number_of_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_number_of_devices (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_508midi_get_number_of_devices(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_508midi_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_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("midi_get_number_of_devices", 0);

  /* "coremusic/capi.pyx":4912
 *         Number of devices
 *     """
 *     return cm.MIDIGetNumberOfDevices()             # <<<<<<<<<<<<<<
 * 
 * def midi_get_device(int device_index) -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIGetNumberOfDevices()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4906
 * # Device and endpoint discovery
 * 
 * def midi_get_number_of_devices():             # <<<<<<<<<<<<<<
 *     """Get the number of MIDI devices in the system.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_get_number_of_devices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4914
 *     return cm.MIDIGetNumberOfDevices()
 * 
 * def midi_get_device(int device_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a device by index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_511midi_get_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_510midi_get_device, "midi_get_device(int device_index) -> int\n\nGet a device by index.\n\nArgs:\n    device_index: Zero-based device index\n\nReturns:\n    MIDIDeviceRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_511midi_get_device = {"midi_get_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_511midi_get_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_510midi_get_device};
static PyObject *__pyx_pw_9coremusic_4capi_511midi_get_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_device_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4914, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4914, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_get_device", 0) < (0)) __PYX_ERR(0, 4914, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_get_device", 1, 1, 1, i); __PYX_ERR(0, 4914, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4914, __pyx_L3_error)
    }
    __pyx_v_device_index = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_device_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4914, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4914, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_get_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_510midi_get_device(__pyx_self, __pyx_v_device_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_510midi_get_device(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_device_index) {
  int __pyx_v_num_devices;
  MIDIDeviceRef __pyx_v_device;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_device", 0);

  /* "coremusic/capi.pyx":4926
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_devices = cm.MIDIGetNumberOfDevices()             # <<<<<<<<<<<<<<
 *     if device_index < 0 or device_index >= num_devices:
 *         raise ValueError(f"Device index {device_index} out of range (0-{num_devices-1})")
*/
  __pyx_v_num_devices = MIDIGetNumberOfDevices();

  /* "coremusic/capi.pyx":4927
 *     """
 *     cdef int num_devices = cm.MIDIGetNumberOfDevices()
 *     if device_index < 0 or device_index >= num_devices:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Device index {device_index} out of range (0-{num_devices-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_device_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_device_index >= __pyx_v_num_devices);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4928
 *     cdef int num_devices = cm.MIDIGetNumberOfDevices()
 *     if device_index < 0 or device_index >= num_devices:
 *         raise ValueError(f"Device index {device_index} out of range (0-{num_devices-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIDeviceRef device = cm.MIDIGetDevice(<cf.UInt32>device_index)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_device_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_devices - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Device_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4928, __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_ERR(0, 4928, __pyx_L1_error)

    /* "coremusic/capi.pyx":4927
 *     """
 *     cdef int num_devices = cm.MIDIGetNumberOfDevices()
 *     if device_index < 0 or device_index >= num_devices:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Device index {device_index} out of range (0-{num_devices-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":4930
 *         raise ValueError(f"Device index {device_index} out of range (0-{num_devices-1})")
 * 
 *     cdef cm.MIDIDeviceRef device = cm.MIDIGetDevice(<cf.UInt32>device_index)             # <<<<<<<<<<<<<<
 *     return <long>device
 * 
*/
  __pyx_v_device = MIDIGetDevice(((UInt32)__pyx_v_device_index));

  /* "coremusic/capi.pyx":4931
 * 
 *     cdef cm.MIDIDeviceRef device = cm.MIDIGetDevice(<cf.UInt32>device_index)
 *     return <long>device             # <<<<<<<<<<<<<<
 * 
 * def midi_device_get_number_of_entities(long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_device)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 4931, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4914
 *     return cm.MIDIGetNumberOfDevices()
 * 
 * def midi_get_device(int device_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a device by index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_get_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4933
 *     return <long>device
 * 
 * def midi_device_get_number_of_entities(long device):             # <<<<<<<<<<<<<<
 *     """Get the number of entities in a device.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_513midi_device_get_number_of_entities(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_512midi_device_get_number_of_entities, "midi_device_get_number_of_entities(long device)\n\nGet the number of entities in a device.\n\nArgs:\n    device: The MIDIDeviceRef\n\nReturns:\n    Number of entities");
static PyMethodDef __pyx_mdef_9coremusic_4capi_513midi_device_get_number_of_entities = {"midi_device_get_number_of_entities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_513midi_device_get_number_of_entities, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_512midi_device_get_number_of_entities};
static PyObject *__pyx_pw_9coremusic_4capi_513midi_device_get_number_of_entities(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_get_number_of_entities (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4933, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_get_number_of_entities", 0) < (0)) __PYX_ERR(0, 4933, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_get_number_of_entities", 1, 1, 1, i); __PYX_ERR(0, 4933, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4933, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4933, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_get_number_of_entities", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4933, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_number_of_entities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_512midi_device_get_number_of_entities(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_512midi_device_get_number_of_entities(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  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("midi_device_get_number_of_entities", 0);

  /* "coremusic/capi.pyx":4942
 *         Number of entities
 *     """
 *     return cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_get_entity(long device, int entity_index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIDeviceGetNumberOfEntities(((MIDIDeviceRef)__pyx_v_device))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4933
 *     return <long>device
 * 
 * def midi_device_get_number_of_entities(long device):             # <<<<<<<<<<<<<<
 *     """Get the number of entities in a device.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_number_of_entities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4944
 *     return cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 * 
 * def midi_device_get_entity(long device, int entity_index):             # <<<<<<<<<<<<<<
 *     """Get an entity from a device by index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_515midi_device_get_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_514midi_device_get_entity, "midi_device_get_entity(long device, int entity_index)\n\nGet an entity from a device by index.\n\nArgs:\n    device: The MIDIDeviceRef\n    entity_index: Zero-based entity index\n\nReturns:\n    MIDIEntityRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_515midi_device_get_entity = {"midi_device_get_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_515midi_device_get_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_514midi_device_get_entity};
static PyObject *__pyx_pw_9coremusic_4capi_515midi_device_get_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  int __pyx_v_entity_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_get_entity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,&__pyx_mstate_global->__pyx_n_u_entity_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4944, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_get_entity", 0) < (0)) __PYX_ERR(0, 4944, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_get_entity", 1, 2, 2, i); __PYX_ERR(0, 4944, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4944, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4944, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4944, __pyx_L3_error)
    __pyx_v_entity_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_entity_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4944, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_get_entity", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4944, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_514midi_device_get_entity(__pyx_self, __pyx_v_device, __pyx_v_entity_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_514midi_device_get_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, int __pyx_v_entity_index) {
  int __pyx_v_num_entities;
  MIDIEntityRef __pyx_v_entity;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_get_entity", 0);

  /* "coremusic/capi.pyx":4957
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_entities = cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 *     if entity_index < 0 or entity_index >= num_entities:
 *         raise ValueError(f"Entity index {entity_index} out of range (0-{num_entities-1})")
*/
  __pyx_v_num_entities = MIDIDeviceGetNumberOfEntities(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":4958
 *     """
 *     cdef int num_entities = cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 *     if entity_index < 0 or entity_index >= num_entities:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Entity index {entity_index} out of range (0-{num_entities-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_entity_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_entity_index >= __pyx_v_num_entities);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4959
 *     cdef int num_entities = cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 *     if entity_index < 0 or entity_index >= num_entities:
 *         raise ValueError(f"Entity index {entity_index} out of range (0-{num_entities-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIEntityRef entity = cm.MIDIDeviceGetEntity(
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_entity_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_entities - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Entity_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4959, __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_ERR(0, 4959, __pyx_L1_error)

    /* "coremusic/capi.pyx":4958
 *     """
 *     cdef int num_entities = cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 *     if entity_index < 0 or entity_index >= num_entities:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Entity index {entity_index} out of range (0-{num_entities-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":4961
 *         raise ValueError(f"Entity index {entity_index} out of range (0-{num_entities-1})")
 * 
 *     cdef cm.MIDIEntityRef entity = cm.MIDIDeviceGetEntity(             # <<<<<<<<<<<<<<
 *         <cm.MIDIDeviceRef>device, <cf.UInt32>entity_index)
 *     return <long>entity
*/
  __pyx_v_entity = MIDIDeviceGetEntity(((MIDIDeviceRef)__pyx_v_device), ((UInt32)__pyx_v_entity_index));

  /* "coremusic/capi.pyx":4963
 *     cdef cm.MIDIEntityRef entity = cm.MIDIDeviceGetEntity(
 *         <cm.MIDIDeviceRef>device, <cf.UInt32>entity_index)
 *     return <long>entity             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_get_number_of_sources(long entity):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_entity)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4944
 *     return cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 * 
 * def midi_device_get_entity(long device, int entity_index):             # <<<<<<<<<<<<<<
 *     """Get an entity from a device by index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4965
 *     return <long>entity
 * 
 * def midi_entity_get_number_of_sources(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of sources in an entity.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_517midi_entity_get_number_of_sources(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_516midi_entity_get_number_of_sources, "midi_entity_get_number_of_sources(long entity)\n\nGet the number of sources in an entity.\n\nArgs:\n    entity: The MIDIEntityRef\n\nReturns:\n    Number of sources");
static PyMethodDef __pyx_mdef_9coremusic_4capi_517midi_entity_get_number_of_sources = {"midi_entity_get_number_of_sources", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_517midi_entity_get_number_of_sources, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_516midi_entity_get_number_of_sources};
static PyObject *__pyx_pw_9coremusic_4capi_517midi_entity_get_number_of_sources(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_get_number_of_sources (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4965, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4965, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_get_number_of_sources", 0) < (0)) __PYX_ERR(0, 4965, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_get_number_of_sources", 1, 1, 1, i); __PYX_ERR(0, 4965, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4965, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4965, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_get_number_of_sources", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4965, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_number_of_sources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_516midi_entity_get_number_of_sources(__pyx_self, __pyx_v_entity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_516midi_entity_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity) {
  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("midi_entity_get_number_of_sources", 0);

  /* "coremusic/capi.pyx":4974
 *         Number of sources
 *     """
 *     return cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_get_source(long entity, int source_index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIEntityGetNumberOfSources(((MIDIEntityRef)__pyx_v_entity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4965
 *     return <long>entity
 * 
 * def midi_entity_get_number_of_sources(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of sources in an entity.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_number_of_sources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4976
 *     return cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_source(long entity, int source_index):             # <<<<<<<<<<<<<<
 *     """Get a source from an entity by index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_519midi_entity_get_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_518midi_entity_get_source, "midi_entity_get_source(long entity, int source_index)\n\nGet a source from an entity by index.\n\nArgs:\n    entity: The MIDIEntityRef\n    source_index: Zero-based source index\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_519midi_entity_get_source = {"midi_entity_get_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_519midi_entity_get_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_518midi_entity_get_source};
static PyObject *__pyx_pw_9coremusic_4capi_519midi_entity_get_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  int __pyx_v_source_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_get_source (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,&__pyx_mstate_global->__pyx_n_u_source_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4976, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_get_source", 0) < (0)) __PYX_ERR(0, 4976, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_get_source", 1, 2, 2, i); __PYX_ERR(0, 4976, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4976, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4976, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4976, __pyx_L3_error)
    __pyx_v_source_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_source_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4976, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_get_source", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4976, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_518midi_entity_get_source(__pyx_self, __pyx_v_entity, __pyx_v_source_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_518midi_entity_get_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_source_index) {
  int __pyx_v_num_sources;
  MIDIEndpointRef __pyx_v_source;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_get_source", 0);

  /* "coremusic/capi.pyx":4989
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_sources = cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)             # <<<<<<<<<<<<<<
 *     if source_index < 0 or source_index >= num_sources:
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
*/
  __pyx_v_num_sources = MIDIEntityGetNumberOfSources(((MIDIEntityRef)__pyx_v_entity));

  /* "coremusic/capi.pyx":4990
 *     """
 *     cdef int num_sources = cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 *     if source_index < 0 or source_index >= num_sources:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_source_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_source_index >= __pyx_v_num_sources);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4991
 *     cdef int num_sources = cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 *     if source_index < 0 or source_index >= num_sources:
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIEndpointRef source = cm.MIDIEntityGetSource(
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_source_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_sources - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Source_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4991, __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_ERR(0, 4991, __pyx_L1_error)

    /* "coremusic/capi.pyx":4990
 *     """
 *     cdef int num_sources = cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 *     if source_index < 0 or source_index >= num_sources:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":4993
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
 *     cdef cm.MIDIEndpointRef source = cm.MIDIEntityGetSource(             # <<<<<<<<<<<<<<
 *         <cm.MIDIEntityRef>entity, <cf.UInt32>source_index)
 *     return <long>source
*/
  __pyx_v_source = MIDIEntityGetSource(((MIDIEntityRef)__pyx_v_entity), ((UInt32)__pyx_v_source_index));

  /* "coremusic/capi.pyx":4995
 *     cdef cm.MIDIEndpointRef source = cm.MIDIEntityGetSource(
 *         <cm.MIDIEntityRef>entity, <cf.UInt32>source_index)
 *     return <long>source             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_get_number_of_destinations(long entity):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_source)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4976
 *     return cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_source(long entity, int source_index):             # <<<<<<<<<<<<<<
 *     """Get a source from an entity by index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":4997
 *     return <long>source
 * 
 * def midi_entity_get_number_of_destinations(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of destinations in an entity.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_521midi_entity_get_number_of_destinations(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_520midi_entity_get_number_of_destinations, "midi_entity_get_number_of_destinations(long entity)\n\nGet the number of destinations in an entity.\n\nArgs:\n    entity: The MIDIEntityRef\n\nReturns:\n    Number of destinations");
static PyMethodDef __pyx_mdef_9coremusic_4capi_521midi_entity_get_number_of_destinations = {"midi_entity_get_number_of_destinations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_521midi_entity_get_number_of_destinations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_520midi_entity_get_number_of_destinations};
static PyObject *__pyx_pw_9coremusic_4capi_521midi_entity_get_number_of_destinations(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_get_number_of_destinations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4997, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_get_number_of_destinations", 0) < (0)) __PYX_ERR(0, 4997, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_get_number_of_destinations", 1, 1, 1, i); __PYX_ERR(0, 4997, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4997, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4997, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_get_number_of_destinations", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4997, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_number_of_destinations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_520midi_entity_get_number_of_destinations(__pyx_self, __pyx_v_entity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_520midi_entity_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity) {
  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("midi_entity_get_number_of_destinations", 0);

  /* "coremusic/capi.pyx":5006
 *         Number of destinations
 *     """
 *     return cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_get_destination(long entity, int dest_index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIEntityGetNumberOfDestinations(((MIDIEntityRef)__pyx_v_entity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4997
 *     return <long>source
 * 
 * def midi_entity_get_number_of_destinations(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of destinations in an entity.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_number_of_destinations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5008
 *     return cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_destination(long entity, int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination from an entity by index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_523midi_entity_get_destination(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_522midi_entity_get_destination, "midi_entity_get_destination(long entity, int dest_index)\n\nGet a destination from an entity by index.\n\nArgs:\n    entity: The MIDIEntityRef\n    dest_index: Zero-based destination index\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_523midi_entity_get_destination = {"midi_entity_get_destination", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_523midi_entity_get_destination, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_522midi_entity_get_destination};
static PyObject *__pyx_pw_9coremusic_4capi_523midi_entity_get_destination(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  int __pyx_v_dest_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_get_destination (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,&__pyx_mstate_global->__pyx_n_u_dest_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5008, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5008, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5008, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_get_destination", 0) < (0)) __PYX_ERR(0, 5008, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_get_destination", 1, 2, 2, i); __PYX_ERR(0, 5008, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5008, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5008, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5008, __pyx_L3_error)
    __pyx_v_dest_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_dest_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5008, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_get_destination", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5008, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_522midi_entity_get_destination(__pyx_self, __pyx_v_entity, __pyx_v_dest_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_522midi_entity_get_destination(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_dest_index) {
  int __pyx_v_num_dests;
  MIDIEndpointRef __pyx_v_dest;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_get_destination", 0);

  /* "coremusic/capi.pyx":5021
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_dests = cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)             # <<<<<<<<<<<<<<
 *     if dest_index < 0 or dest_index >= num_dests:
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
*/
  __pyx_v_num_dests = MIDIEntityGetNumberOfDestinations(((MIDIEntityRef)__pyx_v_entity));

  /* "coremusic/capi.pyx":5022
 *     """
 *     cdef int num_dests = cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 *     if dest_index < 0 or dest_index >= num_dests:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_dest_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dest_index >= __pyx_v_num_dests);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5023
 *     cdef int num_dests = cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 *     if dest_index < 0 or dest_index >= num_dests:
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIEntityGetDestination(
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_dest_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_dests - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Destination_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5023, __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_ERR(0, 5023, __pyx_L1_error)

    /* "coremusic/capi.pyx":5022
 *     """
 *     cdef int num_dests = cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 *     if dest_index < 0 or dest_index >= num_dests:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":5025
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIEntityGetDestination(             # <<<<<<<<<<<<<<
 *         <cm.MIDIEntityRef>entity, <cf.UInt32>dest_index)
 *     return <long>dest
*/
  __pyx_v_dest = MIDIEntityGetDestination(((MIDIEntityRef)__pyx_v_entity), ((UInt32)__pyx_v_dest_index));

  /* "coremusic/capi.pyx":5027
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIEntityGetDestination(
 *         <cm.MIDIEntityRef>entity, <cf.UInt32>dest_index)
 *     return <long>dest             # <<<<<<<<<<<<<<
 * 
 * def midi_get_number_of_sources():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_dest)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5008
 *     return cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_destination(long entity, int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination from an entity by index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5029
 *     return <long>dest
 * 
 * def midi_get_number_of_sources():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI sources in the system.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_525midi_get_number_of_sources(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_524midi_get_number_of_sources, "midi_get_number_of_sources()\n\nGet the total number of MIDI sources in the system.\n\nReturns:\n    Number of sources");
static PyMethodDef __pyx_mdef_9coremusic_4capi_525midi_get_number_of_sources = {"midi_get_number_of_sources", (PyCFunction)__pyx_pw_9coremusic_4capi_525midi_get_number_of_sources, METH_NOARGS, __pyx_doc_9coremusic_4capi_524midi_get_number_of_sources};
static PyObject *__pyx_pw_9coremusic_4capi_525midi_get_number_of_sources(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_number_of_sources (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_524midi_get_number_of_sources(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_524midi_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_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("midi_get_number_of_sources", 0);

  /* "coremusic/capi.pyx":5035
 *         Number of sources
 *     """
 *     return cm.MIDIGetNumberOfSources()             # <<<<<<<<<<<<<<
 * 
 * def midi_get_source(int source_index) -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIGetNumberOfSources()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5029
 *     return <long>dest
 * 
 * def midi_get_number_of_sources():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI sources in the system.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_get_number_of_sources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5037
 *     return cm.MIDIGetNumberOfSources()
 * 
 * def midi_get_source(int source_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a source by system-wide index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_527midi_get_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_526midi_get_source, "midi_get_source(int source_index) -> int\n\nGet a source by system-wide index.\n\nArgs:\n    source_index: Zero-based source index\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_527midi_get_source = {"midi_get_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_527midi_get_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_526midi_get_source};
static PyObject *__pyx_pw_9coremusic_4capi_527midi_get_source(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_source_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_source (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5037, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5037, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_get_source", 0) < (0)) __PYX_ERR(0, 5037, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_get_source", 1, 1, 1, i); __PYX_ERR(0, 5037, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5037, __pyx_L3_error)
    }
    __pyx_v_source_index = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_source_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5037, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_source", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5037, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_get_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_526midi_get_source(__pyx_self, __pyx_v_source_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_526midi_get_source(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_source_index) {
  int __pyx_v_num_sources;
  MIDIEndpointRef __pyx_v_source;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_source", 0);

  /* "coremusic/capi.pyx":5049
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_sources = cm.MIDIGetNumberOfSources()             # <<<<<<<<<<<<<<
 *     if source_index < 0 or source_index >= num_sources:
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
*/
  __pyx_v_num_sources = MIDIGetNumberOfSources();

  /* "coremusic/capi.pyx":5050
 *     """
 *     cdef int num_sources = cm.MIDIGetNumberOfSources()
 *     if source_index < 0 or source_index >= num_sources:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_source_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_source_index >= __pyx_v_num_sources);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5051
 *     cdef int num_sources = cm.MIDIGetNumberOfSources()
 *     if source_index < 0 or source_index >= num_sources:
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIEndpointRef source = cm.MIDIGetSource(<cf.UInt32>source_index)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_source_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_sources - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Source_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5051, __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_ERR(0, 5051, __pyx_L1_error)

    /* "coremusic/capi.pyx":5050
 *     """
 *     cdef int num_sources = cm.MIDIGetNumberOfSources()
 *     if source_index < 0 or source_index >= num_sources:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":5053
 *         raise ValueError(f"Source index {source_index} out of range (0-{num_sources-1})")
 * 
 *     cdef cm.MIDIEndpointRef source = cm.MIDIGetSource(<cf.UInt32>source_index)             # <<<<<<<<<<<<<<
 *     return <long>source
 * 
*/
  __pyx_v_source = MIDIGetSource(((UInt32)__pyx_v_source_index));

  /* "coremusic/capi.pyx":5054
 * 
 *     cdef cm.MIDIEndpointRef source = cm.MIDIGetSource(<cf.UInt32>source_index)
 *     return <long>source             # <<<<<<<<<<<<<<
 * 
 * def midi_get_number_of_destinations():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_source)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 5054, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5037
 *     return cm.MIDIGetNumberOfSources()
 * 
 * def midi_get_source(int source_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a source by system-wide index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_get_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5056
 *     return <long>source
 * 
 * def midi_get_number_of_destinations():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI destinations in the system.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_529midi_get_number_of_destinations(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_528midi_get_number_of_destinations, "midi_get_number_of_destinations()\n\nGet the total number of MIDI destinations in the system.\n\nReturns:\n    Number of destinations");
static PyMethodDef __pyx_mdef_9coremusic_4capi_529midi_get_number_of_destinations = {"midi_get_number_of_destinations", (PyCFunction)__pyx_pw_9coremusic_4capi_529midi_get_number_of_destinations, METH_NOARGS, __pyx_doc_9coremusic_4capi_528midi_get_number_of_destinations};
static PyObject *__pyx_pw_9coremusic_4capi_529midi_get_number_of_destinations(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_number_of_destinations (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_528midi_get_number_of_destinations(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_528midi_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_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("midi_get_number_of_destinations", 0);

  /* "coremusic/capi.pyx":5062
 *         Number of destinations
 *     """
 *     return cm.MIDIGetNumberOfDestinations()             # <<<<<<<<<<<<<<
 * 
 * def midi_get_destination(int dest_index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIGetNumberOfDestinations()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5056
 *     return <long>source
 * 
 * def midi_get_number_of_destinations():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI destinations in the system.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_get_number_of_destinations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5064
 *     return cm.MIDIGetNumberOfDestinations()
 * 
 * def midi_get_destination(int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination by system-wide index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_531midi_get_destination(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_530midi_get_destination, "midi_get_destination(int dest_index)\n\nGet a destination by system-wide index.\n\nArgs:\n    dest_index: Zero-based destination index\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    ValueError: If index is out of range");
static PyMethodDef __pyx_mdef_9coremusic_4capi_531midi_get_destination = {"midi_get_destination", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_531midi_get_destination, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_530midi_get_destination};
static PyObject *__pyx_pw_9coremusic_4capi_531midi_get_destination(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_dest_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_destination (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dest_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5064, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5064, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_get_destination", 0) < (0)) __PYX_ERR(0, 5064, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_get_destination", 1, 1, 1, i); __PYX_ERR(0, 5064, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5064, __pyx_L3_error)
    }
    __pyx_v_dest_index = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_dest_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5064, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_destination", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5064, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_get_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_530midi_get_destination(__pyx_self, __pyx_v_dest_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_530midi_get_destination(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dest_index) {
  int __pyx_v_num_dests;
  MIDIEndpointRef __pyx_v_dest;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_destination", 0);

  /* "coremusic/capi.pyx":5076
 *         ValueError: If index is out of range
 *     """
 *     cdef int num_dests = cm.MIDIGetNumberOfDestinations()             # <<<<<<<<<<<<<<
 *     if dest_index < 0 or dest_index >= num_dests:
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
*/
  __pyx_v_num_dests = MIDIGetNumberOfDestinations();

  /* "coremusic/capi.pyx":5077
 *     """
 *     cdef int num_dests = cm.MIDIGetNumberOfDestinations()
 *     if dest_index < 0 or dest_index >= num_dests:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_dest_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dest_index >= __pyx_v_num_dests);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5078
 *     cdef int num_dests = cm.MIDIGetNumberOfDestinations()
 *     if dest_index < 0 or dest_index >= num_dests:
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIGetDestination(<cf.UInt32>dest_index)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_dest_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_dests - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Destination_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5078, __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_ERR(0, 5078, __pyx_L1_error)

    /* "coremusic/capi.pyx":5077
 *     """
 *     cdef int num_dests = cm.MIDIGetNumberOfDestinations()
 *     if dest_index < 0 or dest_index >= num_dests:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":5080
 *         raise ValueError(f"Destination index {dest_index} out of range (0-{num_dests-1})")
 * 
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIGetDestination(<cf.UInt32>dest_index)             # <<<<<<<<<<<<<<
 *     return <long>dest
 * 
*/
  __pyx_v_dest = MIDIGetDestination(((UInt32)__pyx_v_dest_index));

  /* "coremusic/capi.pyx":5081
 * 
 *     cdef cm.MIDIEndpointRef dest = cm.MIDIGetDestination(<cf.UInt32>dest_index)
 *     return <long>dest             # <<<<<<<<<<<<<<
 * 
 * # Virtual endpoint functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)__pyx_v_dest)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5064
 *     return cm.MIDIGetNumberOfDestinations()
 * 
 * def midi_get_destination(int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination by system-wide index.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_get_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5085
 * # Virtual endpoint functions
 * 
 * def midi_source_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI source.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_533midi_source_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_532midi_source_create, "midi_source_create(long client, str name)\n\nCreate a virtual MIDI source.\n\nArgs:\n    client: The MIDIClientRef\n    name: Name for the virtual source\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    RuntimeError: If source creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_533midi_source_create = {"midi_source_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_533midi_source_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_532midi_source_create};
static PyObject *__pyx_pw_9coremusic_4capi_533midi_source_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_client;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_source_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_client,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5085, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5085, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5085, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_source_create", 0) < (0)) __PYX_ERR(0, 5085, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_source_create", 1, 2, 2, i); __PYX_ERR(0, 5085, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5085, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5085, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5085, __pyx_L3_error)
    __pyx_v_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_source_create", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5085, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_source_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 5085, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_532midi_source_create(__pyx_self, __pyx_v_client, __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_532midi_source_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_name_bytes = 0;
  CFStringRef __pyx_v_cf_name;
  MIDIEndpointRef __pyx_v_source;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_source_create", 0);

  /* "coremusic/capi.pyx":5098
 *         RuntimeError: If source creation fails
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5098, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5100
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cm.MIDIEndpointRef source
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5100, __pyx_L1_error)

  /* "coremusic/capi.pyx":5099
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cm.MIDIEndpointRef source
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5104
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5105
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_n};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5105, __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_ERR(0, 5105, __pyx_L1_error)

    /* "coremusic/capi.pyx":5104
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":5107
 *         raise MemoryError("Could not create CFString from name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5108
 * 
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDISourceCreate"))
*/
    __pyx_v_status = MIDISourceCreate(((MIDIClientRef)__pyx_v_client), __pyx_v_cf_name, (&__pyx_v_source));

    /* "coremusic/capi.pyx":5109
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDISourceCreate"))
 *         return <long>source
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5110
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDISourceCreate"))             # <<<<<<<<<<<<<<
 *         return <long>source
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISourceCreate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5110, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5110, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5110, __pyx_L5_error)

      /* "coremusic/capi.pyx":5109
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDISourceCreate"))
 *         return <long>source
*/
    }

    /* "coremusic/capi.pyx":5111
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDISourceCreate"))
 *         return <long>source             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5111, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5113
 *         return <long>source
 *     finally:
 *         cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_destination_create(long client, str name):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5085
 * # Virtual endpoint functions
 * 
 * def midi_source_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI source.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_source_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5115
 *         cf.CFRelease(cf_name)
 * 
 * def midi_destination_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI destination.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_535midi_destination_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_534midi_destination_create, "midi_destination_create(long client, str name)\n\nCreate a virtual MIDI destination.\n\nArgs:\n    client: The MIDIClientRef\n    name: Name for the virtual destination\n\nReturns:\n    MIDIEndpointRef handle\n\nRaises:\n    RuntimeError: If destination creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_535midi_destination_create = {"midi_destination_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_535midi_destination_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_534midi_destination_create};
static PyObject *__pyx_pw_9coremusic_4capi_535midi_destination_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_client;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_destination_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_client,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5115, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5115, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5115, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_destination_create", 0) < (0)) __PYX_ERR(0, 5115, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_destination_create", 1, 2, 2, i); __PYX_ERR(0, 5115, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5115, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5115, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5115, __pyx_L3_error)
    __pyx_v_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_destination_create", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5115, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_destination_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 5115, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_534midi_destination_create(__pyx_self, __pyx_v_client, __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_534midi_destination_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_name_bytes = 0;
  CFStringRef __pyx_v_cf_name;
  MIDIEndpointRef __pyx_v_dest;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_destination_create", 0);

  /* "coremusic/capi.pyx":5128
 *         RuntimeError: If destination creation fails
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5128, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5130
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cm.MIDIEndpointRef dest
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5130, __pyx_L1_error)

  /* "coremusic/capi.pyx":5129
 *     """
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef cf.CFStringRef cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cm.MIDIEndpointRef dest
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5134
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5135
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_n};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5135, __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_ERR(0, 5135, __pyx_L1_error)

    /* "coremusic/capi.pyx":5134
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":5137
 *         raise MemoryError("Could not create CFString from name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5138
 * 
 *     try:
 *         status = cm.MIDIDestinationCreate(             # <<<<<<<<<<<<<<
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:
*/
    __pyx_v_status = MIDIDestinationCreate(((MIDIClientRef)__pyx_v_client), __pyx_v_cf_name, NULL, NULL, (&__pyx_v_dest));

    /* "coremusic/capi.pyx":5140
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDestinationCreate"))
 *         return <long>dest
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5141
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDestinationCreate"))             # <<<<<<<<<<<<<<
 *         return <long>dest
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDestinationCreate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5141, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5141, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5141, __pyx_L5_error)

      /* "coremusic/capi.pyx":5140
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDestinationCreate"))
 *         return <long>dest
*/
    }

    /* "coremusic/capi.pyx":5142
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDestinationCreate"))
 *         return <long>dest             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5144
 *         return <long>dest
 *     finally:
 *         cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_endpoint_dispose(long endpoint):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5115
 *         cf.CFRelease(cf_name)
 * 
 * def midi_destination_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI destination.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_destination_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5146
 *         cf.CFRelease(cf_name)
 * 
 * def midi_endpoint_dispose(long endpoint):             # <<<<<<<<<<<<<<
 *     """Dispose a virtual MIDI endpoint.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_537midi_endpoint_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_536midi_endpoint_dispose, "midi_endpoint_dispose(long endpoint)\n\nDispose a virtual MIDI endpoint.\n\nArgs:\n    endpoint: The MIDIEndpointRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_537midi_endpoint_dispose = {"midi_endpoint_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_537midi_endpoint_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_536midi_endpoint_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_537midi_endpoint_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_endpoint;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_endpoint_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_endpoint,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5146, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5146, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_endpoint_dispose", 0) < (0)) __PYX_ERR(0, 5146, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_endpoint_dispose", 1, 1, 1, i); __PYX_ERR(0, 5146, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5146, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5146, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_endpoint_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5146, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_536midi_endpoint_dispose(__pyx_self, __pyx_v_endpoint);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_536midi_endpoint_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_endpoint_dispose", 0);

  /* "coremusic/capi.pyx":5158
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointDispose"))
*/
  __pyx_v_status = MIDIEndpointDispose(((MIDIEndpointRef)__pyx_v_endpoint));

  /* "coremusic/capi.pyx":5159
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointDispose"))
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5160
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointDispose"))             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIEndpointDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5160, __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_ERR(0, 5160, __pyx_L1_error)

    /* "coremusic/capi.pyx":5159
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointDispose"))
 *     return status
*/
  }

  /* "coremusic/capi.pyx":5161
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointDispose"))
 *     return status             # <<<<<<<<<<<<<<
 * 
 * # Property functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5146
 *         cf.CFRelease(cf_name)
 * 
 * def midi_endpoint_dispose(long endpoint):             # <<<<<<<<<<<<<<
 *     """Dispose a virtual MIDI endpoint.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5165
 * # Property functions
 * 
 * def midi_object_get_string_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get a string property from a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_539midi_object_get_string_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_538midi_object_get_string_property, "midi_object_get_string_property(long obj, str property_name)\n\nGet a string property from a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef\n    property_name: Name of the property to get\n\nReturns:\n    String value of the property\n\nRaises:\n    RuntimeError: If getting property fails\n    ValueError: If property name conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_539midi_object_get_string_property = {"midi_object_get_string_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_539midi_object_get_string_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_538midi_object_get_string_property};
static PyObject *__pyx_pw_9coremusic_4capi_539midi_object_get_string_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  PyObject *__pyx_v_property_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_get_string_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_property_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5165, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_get_string_property", 0) < (0)) __PYX_ERR(0, 5165, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_get_string_property", 1, 2, 2, i); __PYX_ERR(0, 5165, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5165, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5165, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5165, __pyx_L3_error)
    __pyx_v_property_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_get_string_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5165, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_string_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_property_name), (&PyUnicode_Type), 1, "property_name", 1))) __PYX_ERR(0, 5165, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_538midi_object_get_string_property(__pyx_self, __pyx_v_obj, __pyx_v_property_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_538midi_object_get_string_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name) {
  CFStringRef __pyx_v_cf_prop_name;
  CFStringRef __pyx_v_cf_value;
  OSStatus __pyx_v_status;
  char *__pyx_v_c_str;
  CFIndex __pyx_v_length;
  CFIndex __pyx_v_max_size;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  char const *__pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_string_property", 0);

  /* "coremusic/capi.pyx":5188
 * 
 *     cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, property_name.encode('utf-8'), cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 * 
 *     if not cf_prop_name:
*/
  if (unlikely(__pyx_v_property_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5188, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5188, __pyx_L1_error)

  /* "coremusic/capi.pyx":5187
 *     cdef char* buffer
 * 
 *     cf_prop_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, property_name.encode('utf-8'), cf.kCFStringEncodingUTF8)
 * 
*/
  __pyx_v_cf_prop_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5190
 *         cf.kCFAllocatorDefault, property_name.encode('utf-8'), cf.kCFStringEncodingUTF8)
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_prop_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5191
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5191, __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_ERR(0, 5191, __pyx_L1_error)

    /* "coremusic/capi.pyx":5190
 *         cf.kCFAllocatorDefault, property_name.encode('utf-8'), cf.kCFStringEncodingUTF8)
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  }

  /* "coremusic/capi.pyx":5193
 *         raise ValueError("Could not create CFString from property name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectGetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5194
 * 
 *     try:
 *         status = cm.MIDIObjectGetStringProperty(             # <<<<<<<<<<<<<<
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:
*/
    __pyx_v_status = MIDIObjectGetStringProperty(((MIDIObjectRef)__pyx_v_obj), __pyx_v_cf_prop_name, (&__pyx_v_cf_value));

    /* "coremusic/capi.pyx":5196
 *         status = cm.MIDIObjectGetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5197
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))             # <<<<<<<<<<<<<<
 * 
 *         # Convert CFString to Python string
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectGetStringProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5197, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5197, __pyx_L5_error)

      /* "coremusic/capi.pyx":5196
 *         status = cm.MIDIObjectGetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
    }

    /* "coremusic/capi.pyx":5200
 * 
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *         if c_str:
 *             result = c_str.decode('utf-8')
*/
    __pyx_v_c_str = ((char *)CFStringGetCStringPtr(__pyx_v_cf_value, kCFStringEncodingUTF8));

    /* "coremusic/capi.pyx":5201
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
    __pyx_t_3 = (__pyx_v_c_str != 0);
    if (__pyx_t_3) {

      /* "coremusic/capi.pyx":5202
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:
 *             result = c_str.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             # Fallback for when direct pointer isn't available
*/
      __pyx_t_7 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5202, __pyx_L5_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5202, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "coremusic/capi.pyx":5201
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
      goto __pyx_L8;
    }

    /* "coremusic/capi.pyx":5205
 *         else:
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)             # <<<<<<<<<<<<<<
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
*/
    /*else*/ {
      __pyx_v_length = CFStringGetLength(__pyx_v_cf_value);

      /* "coremusic/capi.pyx":5206
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1             # <<<<<<<<<<<<<<
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
*/
      __pyx_v_max_size = (CFStringGetMaximumSizeForEncoding(__pyx_v_length, kCFStringEncodingUTF8) + 1);

      /* "coremusic/capi.pyx":5207
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)             # <<<<<<<<<<<<<<
 *             if not buffer:
 *                 cf.CFRelease(cf_value)
*/
      __pyx_v_buffer = ((char *)malloc(__pyx_v_max_size));

      /* "coremusic/capi.pyx":5208
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 cf.CFRelease(cf_value)
 *                 raise MemoryError("Could not allocate buffer for string conversion")
*/
      __pyx_t_3 = (!(__pyx_v_buffer != 0));
      if (unlikely(__pyx_t_3)) {

        /* "coremusic/capi.pyx":5209
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
 *                 cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
        CFRelease(__pyx_v_cf_value);

        /* "coremusic/capi.pyx":5210
 *             if not buffer:
 *                 cf.CFRelease(cf_value)
 *                 raise MemoryError("Could not allocate buffer for string conversion")             # <<<<<<<<<<<<<<
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
*/
        __pyx_t_6 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_st};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5210, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 5210, __pyx_L5_error)

        /* "coremusic/capi.pyx":5208
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 cf.CFRelease(cf_value)
 *                 raise MemoryError("Could not allocate buffer for string conversion")
*/
      }

      /* "coremusic/capi.pyx":5211
 *                 cf.CFRelease(cf_value)
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:             # <<<<<<<<<<<<<<
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')
*/
      /*try:*/ {

        /* "coremusic/capi.pyx":5212
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
        __pyx_t_3 = (CFStringGetCString(__pyx_v_cf_value, __pyx_v_buffer, __pyx_v_max_size, kCFStringEncodingUTF8) != 0);
        if (likely(__pyx_t_3)) {

          /* "coremusic/capi.pyx":5213
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *                 else:
 *                     cf.CFRelease(cf_value)
*/
          __pyx_t_7 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5213, __pyx_L11_error)
          __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_7, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5213, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_result = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "coremusic/capi.pyx":5212
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
          goto __pyx_L13;
        }

        /* "coremusic/capi.pyx":5215
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 *                     raise RuntimeError("Could not convert CFString to C string")
 *             finally:
*/
        /*else*/ {
          CFRelease(__pyx_v_cf_value);

          /* "coremusic/capi.pyx":5216
 *                 else:
 *                     cf.CFRelease(cf_value)
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
          __pyx_t_6 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5216, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 5216, __pyx_L11_error)
        }
        __pyx_L13:;
      }

      /* "coremusic/capi.pyx":5218
 *                     raise RuntimeError("Could not convert CFString to C string")
 *             finally:
 *                 free(buffer)             # <<<<<<<<<<<<<<
 * 
 *         cf.CFRelease(cf_value)
*/
      /*finally:*/ {
        /*normal exit:*/{
          free(__pyx_v_buffer);
          goto __pyx_L12;
        }
        __pyx_L11_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
          {
            free(__pyx_v_buffer);
          }
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
          goto __pyx_L5_error;
        }
        __pyx_L12:;
      }
    }
    __pyx_L8:;

    /* "coremusic/capi.pyx":5220
 *                 free(buffer)
 * 
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    CFRelease(__pyx_v_cf_value);

    /* "coremusic/capi.pyx":5221
 * 
 *         cf.CFRelease(cf_value)
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_prop_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5223
 *         return result
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_get_integer_property(long obj, str property_name):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_11);
      __pyx_t_9 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
      __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0;
      __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_11 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_prop_name);
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5165
 * # Property functions
 * 
 * def midi_object_get_string_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get a string property from a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_string_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5225
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_get_integer_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get an integer property from a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_541midi_object_get_integer_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_540midi_object_get_integer_property, "midi_object_get_integer_property(long obj, str property_name)\n\nGet an integer property from a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef\n    property_name: Name of the property to get\n\nReturns:\n    Integer value of the property\n\nRaises:\n    RuntimeError: If getting property fails\n    ValueError: If property name conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_541midi_object_get_integer_property = {"midi_object_get_integer_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_541midi_object_get_integer_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_540midi_object_get_integer_property};
static PyObject *__pyx_pw_9coremusic_4capi_541midi_object_get_integer_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  PyObject *__pyx_v_property_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_get_integer_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_property_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5225, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_get_integer_property", 0) < (0)) __PYX_ERR(0, 5225, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_get_integer_property", 1, 2, 2, i); __PYX_ERR(0, 5225, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5225, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5225, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5225, __pyx_L3_error)
    __pyx_v_property_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_get_integer_property", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5225, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_integer_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_property_name), (&PyUnicode_Type), 1, "property_name", 1))) __PYX_ERR(0, 5225, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_540midi_object_get_integer_property(__pyx_self, __pyx_v_obj, __pyx_v_property_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_540midi_object_get_integer_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name) {
  PyObject *__pyx_v_prop_bytes = 0;
  CFStringRef __pyx_v_cf_prop_name;
  SInt32 __pyx_v_value;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_object_get_integer_property", 0);

  /* "coremusic/capi.pyx":5239
 *         ValueError: If property name conversion fails
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_property_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5239, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5241
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef ca.SInt32 value
 *     cdef cf.OSStatus status
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_prop_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5241, __pyx_L1_error)

  /* "coremusic/capi.pyx":5240
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
 *     cdef ca.SInt32 value
*/
  __pyx_v_cf_prop_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5245
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_prop_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5246
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5246, __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_ERR(0, 5246, __pyx_L1_error)

    /* "coremusic/capi.pyx":5245
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  }

  /* "coremusic/capi.pyx":5248
 *         raise ValueError("Could not create CFString from property name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5249
 * 
 *     try:
 *         status = cm.MIDIObjectGetIntegerProperty(             # <<<<<<<<<<<<<<
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:
*/
    __pyx_v_status = MIDIObjectGetIntegerProperty(((MIDIObjectRef)__pyx_v_obj), __pyx_v_cf_prop_name, (&__pyx_v_value));

    /* "coremusic/capi.pyx":5251
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetIntegerProperty"))
 *         return value
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5252
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetIntegerProperty"))             # <<<<<<<<<<<<<<
 *         return value
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectGetIntegerProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5252, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5252, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5252, __pyx_L5_error)

      /* "coremusic/capi.pyx":5251
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetIntegerProperty"))
 *         return value
*/
    }

    /* "coremusic/capi.pyx":5253
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetIntegerProperty"))
 *         return value             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_prop_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5253, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5255
 *         return value
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_set_string_property(long obj, str property_name, str value):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_prop_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5225
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_get_integer_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get an integer property from a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_integer_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prop_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5257
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_set_string_property(long obj, str property_name, str value):             # <<<<<<<<<<<<<<
 *     """Set a string property on a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_543midi_object_set_string_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_542midi_object_set_string_property, "midi_object_set_string_property(long obj, str property_name, str value)\n\nSet a string property on a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef\n    property_name: Name of the property to set\n    value: String value to set\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting property fails\n    ValueError: If string conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_543midi_object_set_string_property = {"midi_object_set_string_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_543midi_object_set_string_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_542midi_object_set_string_property};
static PyObject *__pyx_pw_9coremusic_4capi_543midi_object_set_string_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  PyObject *__pyx_v_property_name = 0;
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_set_string_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_property_name,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5257, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5257, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5257, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5257, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_set_string_property", 0) < (0)) __PYX_ERR(0, 5257, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_set_string_property", 1, 3, 3, i); __PYX_ERR(0, 5257, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5257, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5257, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5257, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5257, __pyx_L3_error)
    __pyx_v_property_name = ((PyObject*)values[1]);
    __pyx_v_value = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_set_string_property", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5257, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_set_string_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_property_name), (&PyUnicode_Type), 1, "property_name", 1))) __PYX_ERR(0, 5257, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 5257, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_542midi_object_set_string_property(__pyx_self, __pyx_v_obj, __pyx_v_property_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_542midi_object_set_string_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_prop_bytes = 0;
  CFStringRef __pyx_v_cf_prop_name;
  PyObject *__pyx_v_value_bytes = 0;
  CFStringRef __pyx_v_cf_value;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_object_set_string_property", 0);

  /* "coremusic/capi.pyx":5272
 *         ValueError: If string conversion fails
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_property_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5272, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5274
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef bytes value_bytes = value.encode('utf-8')
 *     cdef cf.CFStringRef cf_value = cf.CFStringCreateWithCString(
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_prop_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5274, __pyx_L1_error)

  /* "coremusic/capi.pyx":5273
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
 *     cdef bytes value_bytes = value.encode('utf-8')
*/
  __pyx_v_cf_prop_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5275
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
 *     cdef bytes value_bytes = value.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_value = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, value_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_value == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5275, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5277
 *     cdef bytes value_bytes = value.encode('utf-8')
 *     cdef cf.CFStringRef cf_value = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, value_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_value_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5277, __pyx_L1_error)

  /* "coremusic/capi.pyx":5276
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
 *     cdef bytes value_bytes = value.encode('utf-8')
 *     cdef cf.CFStringRef cf_value = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, value_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cf.OSStatus status
*/
  __pyx_v_cf_value = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5280
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 *     if not cf_value:
*/
  __pyx_t_3 = (!(__pyx_v_cf_prop_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5281
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 *     if not cf_value:
 *         cf.CFRelease(cf_prop_name)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5281, __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_ERR(0, 5281, __pyx_L1_error)

    /* "coremusic/capi.pyx":5280
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 *     if not cf_value:
*/
  }

  /* "coremusic/capi.pyx":5282
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")
 *     if not cf_value:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_prop_name)
 *         raise ValueError("Could not create CFString from value")
*/
  __pyx_t_3 = (!(__pyx_v_cf_value != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5283
 *         raise ValueError("Could not create CFString from property name")
 *     if not cf_value:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from value")
 * 
*/
    CFRelease(__pyx_v_cf_prop_name);

    /* "coremusic/capi.pyx":5284
 *     if not cf_value:
 *         cf.CFRelease(cf_prop_name)
 *         raise ValueError("Could not create CFString from value")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_v};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5284, __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_ERR(0, 5284, __pyx_L1_error)

    /* "coremusic/capi.pyx":5282
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")
 *     if not cf_value:             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_prop_name)
 *         raise ValueError("Could not create CFString from value")
*/
  }

  /* "coremusic/capi.pyx":5286
 *         raise ValueError("Could not create CFString from value")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5287
 * 
 *     try:
 *         status = cm.MIDIObjectSetStringProperty(             # <<<<<<<<<<<<<<
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:
*/
    __pyx_v_status = MIDIObjectSetStringProperty(((MIDIObjectRef)__pyx_v_obj), __pyx_v_cf_prop_name, __pyx_v_cf_value);

    /* "coremusic/capi.pyx":5289
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetStringProperty"))
 *         return status
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5290
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetStringProperty"))             # <<<<<<<<<<<<<<
 *         return status
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectSetStringProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5290, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5290, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5290, __pyx_L6_error)

      /* "coremusic/capi.pyx":5289
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetStringProperty"))
 *         return status
*/
    }

    /* "coremusic/capi.pyx":5291
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetStringProperty"))
 *         return status             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_prop_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5291, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":5293
 *         return status
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_value)
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_prop_name);

        /* "coremusic/capi.pyx":5294
 *     finally:
 *         cf.CFRelease(cf_prop_name)
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_set_integer_property(long obj, str property_name, int value):
*/
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":5293
 *         return status
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_value)
 * 
*/
      CFRelease(__pyx_v_cf_prop_name);

      /* "coremusic/capi.pyx":5294
 *     finally:
 *         cf.CFRelease(cf_prop_name)
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_set_integer_property(long obj, str property_name, int value):
*/
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5257
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_set_string_property(long obj, str property_name, str value):             # <<<<<<<<<<<<<<
 *     """Set a string property on a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_object_set_string_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prop_bytes);
  __Pyx_XDECREF(__pyx_v_value_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5296
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_set_integer_property(long obj, str property_name, int value):             # <<<<<<<<<<<<<<
 *     """Set an integer property on a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_545midi_object_set_integer_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_544midi_object_set_integer_property, "midi_object_set_integer_property(long obj, str property_name, int value)\n\nSet an integer property on a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef\n    property_name: Name of the property to set\n    value: Integer value to set\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting property fails\n    ValueError: If property name conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_545midi_object_set_integer_property = {"midi_object_set_integer_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_545midi_object_set_integer_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_544midi_object_set_integer_property};
static PyObject *__pyx_pw_9coremusic_4capi_545midi_object_set_integer_property(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  PyObject *__pyx_v_property_name = 0;
  int __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_set_integer_property (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_property_name,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5296, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5296, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5296, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5296, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_set_integer_property", 0) < (0)) __PYX_ERR(0, 5296, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_set_integer_property", 1, 3, 3, i); __PYX_ERR(0, 5296, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5296, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5296, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5296, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5296, __pyx_L3_error)
    __pyx_v_property_name = ((PyObject*)values[1]);
    __pyx_v_value = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5296, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_set_integer_property", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5296, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_set_integer_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_property_name), (&PyUnicode_Type), 1, "property_name", 1))) __PYX_ERR(0, 5296, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_544midi_object_set_integer_property(__pyx_self, __pyx_v_obj, __pyx_v_property_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_544midi_object_set_integer_property(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj, PyObject *__pyx_v_property_name, int __pyx_v_value) {
  PyObject *__pyx_v_prop_bytes = 0;
  CFStringRef __pyx_v_cf_prop_name;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_object_set_integer_property", 0);

  /* "coremusic/capi.pyx":5311
 *         ValueError: If property name conversion fails
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
*/
  if (unlikely(__pyx_v_property_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 5311, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5313
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *     cdef cf.OSStatus status
 * 
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_prop_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5313, __pyx_L1_error)

  /* "coremusic/capi.pyx":5312
 *     """
 *     cdef bytes prop_bytes = property_name.encode('utf-8')
 *     cdef cf.CFStringRef cf_prop_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, prop_bytes, cf.kCFStringEncodingUTF8)
 *     cdef cf.OSStatus status
*/
  __pyx_v_cf_prop_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":5316
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  __pyx_t_3 = (!(__pyx_v_cf_prop_name != 0));
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5317
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_p_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5317, __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_ERR(0, 5317, __pyx_L1_error)

    /* "coremusic/capi.pyx":5316
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  }

  /* "coremusic/capi.pyx":5319
 *         raise ValueError("Could not create CFString from property name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectSetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5320
 * 
 *     try:
 *         status = cm.MIDIObjectSetIntegerProperty(             # <<<<<<<<<<<<<<
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:
*/
    __pyx_v_status = MIDIObjectSetIntegerProperty(((MIDIObjectRef)__pyx_v_obj), __pyx_v_cf_prop_name, ((SInt32)__pyx_v_value));

    /* "coremusic/capi.pyx":5322
 *         status = cm.MIDIObjectSetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetIntegerProperty"))
 *         return status
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5323
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetIntegerProperty"))             # <<<<<<<<<<<<<<
 *         return status
 *     finally:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectSetIntegerProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5323, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5323, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 5323, __pyx_L5_error)

      /* "coremusic/capi.pyx":5322
 *         status = cm.MIDIObjectSetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetIntegerProperty"))
 *         return status
*/
    }

    /* "coremusic/capi.pyx":5324
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIObjectSetIntegerProperty"))
 *         return status             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_prop_name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5324, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5326
 *         return status
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 * 
 * # Convenience functions for getting common properties
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_prop_name);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5296
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_set_integer_property(long obj, str property_name, int value):             # <<<<<<<<<<<<<<
 *     """Set an integer property on a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("coremusic.capi.midi_object_set_integer_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prop_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5330
 * # Convenience functions for getting common properties
 * 
 * def midi_object_get_name(long obj):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI object (device, entity, or endpoint).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_547midi_object_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_546midi_object_get_name, "midi_object_get_name(long obj)\n\nGet the name of a MIDI object (device, entity, or endpoint).\n\nArgs:\n    obj: The MIDIObjectRef (device, entity, or endpoint)\n\nReturns:\n    String name of the object, or None if no name is set\n\nRaises:\n    RuntimeError: If getting the name fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_547midi_object_get_name = {"midi_object_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_547midi_object_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_546midi_object_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_547midi_object_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_get_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5330, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5330, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_get_name", 0) < (0)) __PYX_ERR(0, 5330, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_get_name", 1, 1, 1, i); __PYX_ERR(0, 5330, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5330, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5330, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_get_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5330, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_546midi_object_get_name(__pyx_self, __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_546midi_object_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj) {
  CFStringRef __pyx_v_cf_value;
  OSStatus __pyx_v_status;
  char *__pyx_v_c_str;
  CFIndex __pyx_v_length;
  CFIndex __pyx_v_max_size;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  char const *__pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_name", 0);

  /* "coremusic/capi.pyx":5349
 *     cdef char* buffer
 * 
 *     status = cm.MIDIObjectGetStringProperty(             # <<<<<<<<<<<<<<
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:
*/
  __pyx_v_status = MIDIObjectGetStringProperty(((MIDIObjectRef)__pyx_v_obj), kMIDIPropertyName, (&__pyx_v_cf_value));

  /* "coremusic/capi.pyx":5351
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5352
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectGetStringProperty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5352, __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_ERR(0, 5352, __pyx_L1_error)

    /* "coremusic/capi.pyx":5351
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":5354
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5356
 *     try:
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *         if c_str:
 *             result = c_str.decode('utf-8')
*/
    __pyx_v_c_str = ((char *)CFStringGetCStringPtr(__pyx_v_cf_value, kCFStringEncodingUTF8));

    /* "coremusic/capi.pyx":5357
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
    __pyx_t_1 = (__pyx_v_c_str != 0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":5358
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:
 *             result = c_str.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             # Fallback for when direct pointer isn't available
*/
      __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5358, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5358, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":5357
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
      goto __pyx_L7;
    }

    /* "coremusic/capi.pyx":5361
 *         else:
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)             # <<<<<<<<<<<<<<
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
*/
    /*else*/ {
      __pyx_v_length = CFStringGetLength(__pyx_v_cf_value);

      /* "coremusic/capi.pyx":5362
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1             # <<<<<<<<<<<<<<
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
*/
      __pyx_v_max_size = (CFStringGetMaximumSizeForEncoding(__pyx_v_length, kCFStringEncodingUTF8) + 1);

      /* "coremusic/capi.pyx":5363
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)             # <<<<<<<<<<<<<<
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
*/
      __pyx_v_buffer = ((char *)malloc(__pyx_v_max_size));

      /* "coremusic/capi.pyx":5364
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      __pyx_t_1 = (!(__pyx_v_buffer != 0));
      if (unlikely(__pyx_t_1)) {

        /* "coremusic/capi.pyx":5365
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")             # <<<<<<<<<<<<<<
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_st};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5365, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 5365, __pyx_L5_error)

        /* "coremusic/capi.pyx":5364
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      }

      /* "coremusic/capi.pyx":5366
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:             # <<<<<<<<<<<<<<
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')
*/
      /*try:*/ {

        /* "coremusic/capi.pyx":5367
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
        __pyx_t_1 = (CFStringGetCString(__pyx_v_cf_value, __pyx_v_buffer, __pyx_v_max_size, kCFStringEncodingUTF8) != 0);
        if (likely(__pyx_t_1)) {

          /* "coremusic/capi.pyx":5368
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")
*/
          __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5368, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5368, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":5367
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
          goto __pyx_L12;
        }

        /* "coremusic/capi.pyx":5370
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5370, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 5370, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":5372
 *                     raise RuntimeError("Could not convert CFString to C string")
 *             finally:
 *                 free(buffer)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      /*finally:*/ {
        /*normal exit:*/{
          free(__pyx_v_buffer);
          goto __pyx_L11;
        }
        __pyx_L10_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
          {
            free(__pyx_v_buffer);
          }
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
          goto __pyx_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":5374
 *                 free(buffer)
 * 
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_value)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5376
 *         return result
 *     finally:
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_get_name(long device):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_10 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5330
 * # Convenience functions for getting common properties
 * 
 * def midi_object_get_name(long obj):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI object (device, entity, or endpoint).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5378
 *         cf.CFRelease(cf_value)
 * 
 * def midi_device_get_name(long device):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI device.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_549midi_device_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_548midi_device_get_name, "midi_device_get_name(long device)\n\nGet the name of a MIDI device.\n\nArgs:\n    device: The MIDIDeviceRef\n\nReturns:\n    String name of the device, or None if no name is set\n\nRaises:\n    RuntimeError: If getting the device name fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_549midi_device_get_name = {"midi_device_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_549midi_device_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_548midi_device_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_549midi_device_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_get_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5378, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5378, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_get_name", 0) < (0)) __PYX_ERR(0, 5378, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_get_name", 1, 1, 1, i); __PYX_ERR(0, 5378, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5378, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5378, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_get_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5378, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_548midi_device_get_name(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_548midi_device_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_get_name", 0);

  /* "coremusic/capi.pyx":5390
 *         RuntimeError: If getting the device name fails
 *     """
 *     return midi_object_get_name(device)             # <<<<<<<<<<<<<<
 * 
 * def midi_endpoint_get_name(long endpoint):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_midi_object_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_device); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5378
 *         cf.CFRelease(cf_value)
 * 
 * def midi_device_get_name(long device):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI device.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_device_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5392
 *     return midi_object_get_name(device)
 * 
 * def midi_endpoint_get_name(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI endpoint (source or destination).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_551midi_endpoint_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_550midi_endpoint_get_name, "midi_endpoint_get_name(long endpoint)\n\nGet the name of a MIDI endpoint (source or destination).\n\nArgs:\n    endpoint: The MIDIEndpointRef\n\nReturns:\n    String name of the endpoint, or None if no name is set\n\nRaises:\n    RuntimeError: If getting the endpoint name fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_551midi_endpoint_get_name = {"midi_endpoint_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_551midi_endpoint_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_550midi_endpoint_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_551midi_endpoint_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_endpoint;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_endpoint_get_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_endpoint,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5392, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5392, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_endpoint_get_name", 0) < (0)) __PYX_ERR(0, 5392, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_endpoint_get_name", 1, 1, 1, i); __PYX_ERR(0, 5392, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5392, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5392, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_endpoint_get_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5392, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_550midi_endpoint_get_name(__pyx_self, __pyx_v_endpoint);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_550midi_endpoint_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_endpoint_get_name", 0);

  /* "coremusic/capi.pyx":5404
 *         RuntimeError: If getting the endpoint name fails
 *     """
 *     return midi_object_get_name(endpoint)             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_get_name(long entity):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_midi_object_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_endpoint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5392
 *     return midi_object_get_name(device)
 * 
 * def midi_endpoint_get_name(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI endpoint (source or destination).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5406
 *     return midi_object_get_name(endpoint)
 * 
 * def midi_entity_get_name(long entity):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI entity.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_553midi_entity_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_552midi_entity_get_name, "midi_entity_get_name(long entity)\n\nGet the name of a MIDI entity.\n\nArgs:\n    entity: The MIDIEntityRef\n\nReturns:\n    String name of the entity, or None if no name is set\n\nRaises:\n    RuntimeError: If getting the entity name fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_553midi_entity_get_name = {"midi_entity_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_553midi_entity_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_552midi_entity_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_553midi_entity_get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_get_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5406, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_get_name", 0) < (0)) __PYX_ERR(0, 5406, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_get_name", 1, 1, 1, i); __PYX_ERR(0, 5406, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5406, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5406, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_get_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5406, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_552midi_entity_get_name(__pyx_self, __pyx_v_entity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_552midi_entity_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_get_name", 0);

  /* "coremusic/capi.pyx":5418
 *         RuntimeError: If getting the entity name fails
 *     """
 *     return midi_object_get_name(entity)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_get_manufacturer(long obj):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_midi_object_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_v_entity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5406
 *     return midi_object_get_name(endpoint)
 * 
 * def midi_entity_get_name(long entity):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI entity.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5420
 *     return midi_object_get_name(entity)
 * 
 * def midi_object_get_manufacturer(long obj):             # <<<<<<<<<<<<<<
 *     """Get the manufacturer of a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_555midi_object_get_manufacturer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_554midi_object_get_manufacturer, "midi_object_get_manufacturer(long obj)\n\nGet the manufacturer of a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef (device or endpoint)\n\nReturns:\n    String manufacturer name, or None if not set\n\nRaises:\n    RuntimeError: If getting the manufacturer fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_555midi_object_get_manufacturer = {"midi_object_get_manufacturer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_555midi_object_get_manufacturer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_554midi_object_get_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_555midi_object_get_manufacturer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_get_manufacturer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5420, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5420, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_get_manufacturer", 0) < (0)) __PYX_ERR(0, 5420, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_get_manufacturer", 1, 1, 1, i); __PYX_ERR(0, 5420, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5420, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5420, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_get_manufacturer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5420, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_manufacturer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_554midi_object_get_manufacturer(__pyx_self, __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_554midi_object_get_manufacturer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj) {
  CFStringRef __pyx_v_cf_value;
  OSStatus __pyx_v_status;
  char *__pyx_v_c_str;
  CFIndex __pyx_v_length;
  CFIndex __pyx_v_max_size;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  char const *__pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_manufacturer", 0);

  /* "coremusic/capi.pyx":5439
 *     cdef char* buffer
 * 
 *     status = cm.MIDIObjectGetStringProperty(             # <<<<<<<<<<<<<<
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:
*/
  __pyx_v_status = MIDIObjectGetStringProperty(((MIDIObjectRef)__pyx_v_obj), kMIDIPropertyManufacturer, (&__pyx_v_cf_value));

  /* "coremusic/capi.pyx":5441
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5442
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectGetStringProperty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5442, __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_ERR(0, 5442, __pyx_L1_error)

    /* "coremusic/capi.pyx":5441
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":5444
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5446
 *     try:
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *         if c_str:
 *             result = c_str.decode('utf-8')
*/
    __pyx_v_c_str = ((char *)CFStringGetCStringPtr(__pyx_v_cf_value, kCFStringEncodingUTF8));

    /* "coremusic/capi.pyx":5447
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
    __pyx_t_1 = (__pyx_v_c_str != 0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":5448
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:
 *             result = c_str.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             # Fallback for when direct pointer isn't available
*/
      __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5448, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5448, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":5447
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
      goto __pyx_L7;
    }

    /* "coremusic/capi.pyx":5451
 *         else:
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)             # <<<<<<<<<<<<<<
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
*/
    /*else*/ {
      __pyx_v_length = CFStringGetLength(__pyx_v_cf_value);

      /* "coremusic/capi.pyx":5452
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1             # <<<<<<<<<<<<<<
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
*/
      __pyx_v_max_size = (CFStringGetMaximumSizeForEncoding(__pyx_v_length, kCFStringEncodingUTF8) + 1);

      /* "coremusic/capi.pyx":5453
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)             # <<<<<<<<<<<<<<
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
*/
      __pyx_v_buffer = ((char *)malloc(__pyx_v_max_size));

      /* "coremusic/capi.pyx":5454
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      __pyx_t_1 = (!(__pyx_v_buffer != 0));
      if (unlikely(__pyx_t_1)) {

        /* "coremusic/capi.pyx":5455
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")             # <<<<<<<<<<<<<<
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_st};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5455, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 5455, __pyx_L5_error)

        /* "coremusic/capi.pyx":5454
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      }

      /* "coremusic/capi.pyx":5456
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:             # <<<<<<<<<<<<<<
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')
*/
      /*try:*/ {

        /* "coremusic/capi.pyx":5457
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
        __pyx_t_1 = (CFStringGetCString(__pyx_v_cf_value, __pyx_v_buffer, __pyx_v_max_size, kCFStringEncodingUTF8) != 0);
        if (likely(__pyx_t_1)) {

          /* "coremusic/capi.pyx":5458
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")
*/
          __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5458, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5458, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":5457
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
          goto __pyx_L12;
        }

        /* "coremusic/capi.pyx":5460
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5460, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 5460, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":5462
 *                     raise RuntimeError("Could not convert CFString to C string")
 *             finally:
 *                 free(buffer)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      /*finally:*/ {
        /*normal exit:*/{
          free(__pyx_v_buffer);
          goto __pyx_L11;
        }
        __pyx_L10_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
          {
            free(__pyx_v_buffer);
          }
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
          goto __pyx_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":5464
 *                 free(buffer)
 * 
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_value)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5466
 *         return result
 *     finally:
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 * 
 * def midi_object_get_model(long obj):
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_10 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5420
 *     return midi_object_get_name(entity)
 * 
 * def midi_object_get_manufacturer(long obj):             # <<<<<<<<<<<<<<
 *     """Get the manufacturer of a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_manufacturer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5468
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_get_model(long obj):             # <<<<<<<<<<<<<<
 *     """Get the model of a MIDI object.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_557midi_object_get_model(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_556midi_object_get_model, "midi_object_get_model(long obj)\n\nGet the model of a MIDI object.\n\nArgs:\n    obj: The MIDIObjectRef (device or endpoint)\n\nReturns:\n    String model name, or None if not set\n\nRaises:\n    RuntimeError: If getting the model fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_557midi_object_get_model = {"midi_object_get_model", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_557midi_object_get_model, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_556midi_object_get_model};
static PyObject *__pyx_pw_9coremusic_4capi_557midi_object_get_model(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_obj;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_object_get_model (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5468, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5468, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_object_get_model", 0) < (0)) __PYX_ERR(0, 5468, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_object_get_model", 1, 1, 1, i); __PYX_ERR(0, 5468, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5468, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5468, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_object_get_model", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5468, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_model", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_556midi_object_get_model(__pyx_self, __pyx_v_obj);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_556midi_object_get_model(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj) {
  CFStringRef __pyx_v_cf_value;
  OSStatus __pyx_v_status;
  char *__pyx_v_c_str;
  CFIndex __pyx_v_length;
  CFIndex __pyx_v_max_size;
  char *__pyx_v_buffer;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  char const *__pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_model", 0);

  /* "coremusic/capi.pyx":5487
 *     cdef char* buffer
 * 
 *     status = cm.MIDIObjectGetStringProperty(             # <<<<<<<<<<<<<<
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:
*/
  __pyx_v_status = MIDIObjectGetStringProperty(((MIDIObjectRef)__pyx_v_obj), kMIDIPropertyModel, (&__pyx_v_cf_value));

  /* "coremusic/capi.pyx":5489
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5490
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIObjectGetStringProperty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5490, __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_ERR(0, 5490, __pyx_L1_error)

    /* "coremusic/capi.pyx":5489
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
*/
  }

  /* "coremusic/capi.pyx":5492
 *         raise RuntimeError(format_osstatus_error(status, "MIDIObjectGetStringProperty"))
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5494
 *     try:
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)             # <<<<<<<<<<<<<<
 *         if c_str:
 *             result = c_str.decode('utf-8')
*/
    __pyx_v_c_str = ((char *)CFStringGetCStringPtr(__pyx_v_cf_value, kCFStringEncodingUTF8));

    /* "coremusic/capi.pyx":5495
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
    __pyx_t_1 = (__pyx_v_c_str != 0);
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":5496
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:
 *             result = c_str.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             # Fallback for when direct pointer isn't available
*/
      __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5496, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5496, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":5495
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
 *         if c_str:             # <<<<<<<<<<<<<<
 *             result = c_str.decode('utf-8')
 *         else:
*/
      goto __pyx_L7;
    }

    /* "coremusic/capi.pyx":5499
 *         else:
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)             # <<<<<<<<<<<<<<
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
*/
    /*else*/ {
      __pyx_v_length = CFStringGetLength(__pyx_v_cf_value);

      /* "coremusic/capi.pyx":5500
 *             # Fallback for when direct pointer isn't available
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1             # <<<<<<<<<<<<<<
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
*/
      __pyx_v_max_size = (CFStringGetMaximumSizeForEncoding(__pyx_v_length, kCFStringEncodingUTF8) + 1);

      /* "coremusic/capi.pyx":5501
 *             length = cf.CFStringGetLength(cf_value)
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)             # <<<<<<<<<<<<<<
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
*/
      __pyx_v_buffer = ((char *)malloc(__pyx_v_max_size));

      /* "coremusic/capi.pyx":5502
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      __pyx_t_1 = (!(__pyx_v_buffer != 0));
      if (unlikely(__pyx_t_1)) {

        /* "coremusic/capi.pyx":5503
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")             # <<<<<<<<<<<<<<
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
*/
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_st};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5503, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 5503, __pyx_L5_error)

        /* "coremusic/capi.pyx":5502
 *             max_size = cf.CFStringGetMaximumSizeForEncoding(length, cf.kCFStringEncodingUTF8) + 1
 *             buffer = <char*>malloc(max_size)
 *             if not buffer:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
*/
      }

      /* "coremusic/capi.pyx":5504
 *             if not buffer:
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:             # <<<<<<<<<<<<<<
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')
*/
      /*try:*/ {

        /* "coremusic/capi.pyx":5505
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
        __pyx_t_1 = (CFStringGetCString(__pyx_v_cf_value, __pyx_v_buffer, __pyx_v_max_size, kCFStringEncodingUTF8) != 0);
        if (likely(__pyx_t_1)) {

          /* "coremusic/capi.pyx":5506
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")
*/
          __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5506, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_6, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5506, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":5505
 *                 raise MemoryError("Could not allocate buffer for string conversion")
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *                     result = buffer.decode('utf-8')
 *                 else:
*/
          goto __pyx_L12;
        }

        /* "coremusic/capi.pyx":5508
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_4 = NULL;
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5508, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 5508, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":5510
 *                     raise RuntimeError("Could not convert CFString to C string")
 *             finally:
 *                 free(buffer)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      /*finally:*/ {
        /*normal exit:*/{
          free(__pyx_v_buffer);
          goto __pyx_L11;
        }
        __pyx_L10_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
          {
            free(__pyx_v_buffer);
          }
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
          __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
          goto __pyx_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":5512
 *                 free(buffer)
 * 
 *         return result             # <<<<<<<<<<<<<<
 *     finally:
 *         cf.CFRelease(cf_value)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":5514
 *         return result
 *     finally:
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 * 
 * # Send functions with simplified packet creation
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_10 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5468
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_get_model(long obj):             # <<<<<<<<<<<<<<
 *     """Get the model of a MIDI object.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_object_get_model", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5518
 * # Send functions with simplified packet creation
 * 
 * def midi_send_data(long port, long destination, bytes data, int timestamp=0):             # <<<<<<<<<<<<<<
 *     """Send MIDI data to a destination.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_559midi_send_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_558midi_send_data, "midi_send_data(long port, long destination, bytes data, int timestamp=0)\n\nSend MIDI data to a destination.\n\nArgs:\n    port: The MIDIPortRef (output port)\n    destination: The MIDIEndpointRef (destination endpoint)\n    data: MIDI data bytes to send\n    timestamp: MIDI timestamp (default 0 for immediate)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If sending fails\n    ValueError: If data is too large");
static PyMethodDef __pyx_mdef_9coremusic_4capi_559midi_send_data = {"midi_send_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_559midi_send_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_558midi_send_data};
static PyObject *__pyx_pw_9coremusic_4capi_559midi_send_data(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_port;
  long __pyx_v_destination;
  PyObject *__pyx_v_data = 0;
  int __pyx_v_timestamp;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_send_data (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_port,&__pyx_mstate_global->__pyx_n_u_destination,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_timestamp,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5518, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5518, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5518, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5518, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5518, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_send_data", 0) < (0)) __PYX_ERR(0, 5518, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_send_data", 0, 3, 4, i); __PYX_ERR(0, 5518, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5518, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5518, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5518, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5518, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5518, __pyx_L3_error)
    __pyx_v_destination = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_destination == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5518, __pyx_L3_error)
    __pyx_v_data = ((PyObject*)values[2]);
    if (values[3]) {
      __pyx_v_timestamp = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_timestamp == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5518, __pyx_L3_error)
    } else {
      __pyx_v_timestamp = ((int)((int)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_send_data", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 5518, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_send_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 5518, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_558midi_send_data(__pyx_self, __pyx_v_port, __pyx_v_destination, __pyx_v_data, __pyx_v_timestamp);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_558midi_send_data(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_destination, PyObject *__pyx_v_data, int __pyx_v_timestamp) {
  size_t __pyx_v_pktlist_size;
  MIDIPacketList *__pyx_v_pktlist;
  MIDIPacket *__pyx_v_packet;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  char *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_send_data", 0);

  /* "coremusic/capi.pyx":5539
 *     cdef cf.OSStatus status
 * 
 *     if len(data) > 256:             # <<<<<<<<<<<<<<
 *         raise ValueError("MIDI data too large (max 256 bytes)")
 * 
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 5539, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5539, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 > 0x100);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":5540
 * 
 *     if len(data) > 256:
 *         raise ValueError("MIDI data too large (max 256 bytes)")             # <<<<<<<<<<<<<<
 * 
 *     # Create a packet list with one packet
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_MIDI_data_too_large_max_256_byte};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5540, __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_ERR(0, 5540, __pyx_L1_error)

    /* "coremusic/capi.pyx":5539
 *     cdef cf.OSStatus status
 * 
 *     if len(data) > 256:             # <<<<<<<<<<<<<<
 *         raise ValueError("MIDI data too large (max 256 bytes)")
 * 
*/
  }

  /* "coremusic/capi.pyx":5543
 * 
 *     # Create a packet list with one packet
 *     pktlist_size = sizeof(cm.MIDIPacketList) + len(data)             # <<<<<<<<<<<<<<
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)
 *     if not pktlist:
*/
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 5543, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5543, __pyx_L1_error)
  __pyx_v_pktlist_size = ((sizeof(MIDIPacketList)) + __pyx_t_1);

  /* "coremusic/capi.pyx":5544
 *     # Create a packet list with one packet
 *     pktlist_size = sizeof(cm.MIDIPacketList) + len(data)
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)             # <<<<<<<<<<<<<<
 *     if not pktlist:
 *         raise MemoryError("Could not allocate packet list")
*/
  __pyx_v_pktlist = ((MIDIPacketList *)malloc(__pyx_v_pktlist_size));

  /* "coremusic/capi.pyx":5545
 *     pktlist_size = sizeof(cm.MIDIPacketList) + len(data)
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)
 *     if not pktlist:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate packet list")
 * 
*/
  __pyx_t_2 = (!(__pyx_v_pktlist != 0));
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":5546
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)
 *     if not pktlist:
 *         raise MemoryError("Could not allocate packet list")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_packet_list};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5546, __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_ERR(0, 5546, __pyx_L1_error)

    /* "coremusic/capi.pyx":5545
 *     pktlist_size = sizeof(cm.MIDIPacketList) + len(data)
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)
 *     if not pktlist:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not allocate packet list")
 * 
*/
  }

  /* "coremusic/capi.pyx":5548
 *         raise MemoryError("Could not allocate packet list")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Initialize packet list
 *         packet = cm.MIDIPacketListInit(pktlist)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5550
 *     try:
 *         # Initialize packet list
 *         packet = cm.MIDIPacketListInit(pktlist)             # <<<<<<<<<<<<<<
 * 
 *         # Add our data to the packet
*/
    __pyx_v_packet = MIDIPacketListInit(__pyx_v_pktlist);

    /* "coremusic/capi.pyx":5556
 *             pktlist, pktlist_size, packet,
 *             <cm.MIDITimeStamp>timestamp,
 *             <cf.UInt32>len(data),             # <<<<<<<<<<<<<<
 *             <const cf.UInt8*><char*>data)
 * 
*/
    if (unlikely(__pyx_v_data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 5556, __pyx_L6_error)
    }
    __pyx_t_1 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5556, __pyx_L6_error)

    /* "coremusic/capi.pyx":5557
 *             <cm.MIDITimeStamp>timestamp,
 *             <cf.UInt32>len(data),
 *             <const cf.UInt8*><char*>data)             # <<<<<<<<<<<<<<
 * 
 *         if not packet:
*/
    if (unlikely(__pyx_v_data == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 5557, __pyx_L6_error)
    }
    __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 5557, __pyx_L6_error)

    /* "coremusic/capi.pyx":5553
 * 
 *         # Add our data to the packet
 *         packet = cm.MIDIPacketListAdd(             # <<<<<<<<<<<<<<
 *             pktlist, pktlist_size, packet,
 *             <cm.MIDITimeStamp>timestamp,
*/
    __pyx_v_packet = MIDIPacketListAdd(__pyx_v_pktlist, __pyx_v_pktlist_size, __pyx_v_packet, ((MIDITimeStamp)__pyx_v_timestamp), ((UInt32)__pyx_t_1), ((UInt8 const *)((char *)__pyx_t_6)));

    /* "coremusic/capi.pyx":5559
 *             <const cf.UInt8*><char*>data)
 * 
 *         if not packet:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not add packet to packet list")
 * 
*/
    __pyx_t_2 = (!(__pyx_v_packet != 0));
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":5560
 * 
 *         if not packet:
 *             raise RuntimeError("Could not add packet to packet list")             # <<<<<<<<<<<<<<
 * 
 *         # Send the packet list
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_add_packet_to_packet_l};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5560, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 5560, __pyx_L6_error)

      /* "coremusic/capi.pyx":5559
 *             <const cf.UInt8*><char*>data)
 * 
 *         if not packet:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not add packet to packet list")
 * 
*/
    }

    /* "coremusic/capi.pyx":5563
 * 
 *         # Send the packet list
 *         status = cm.MIDISend(             # <<<<<<<<<<<<<<
 *             <cm.MIDIPortRef>port,
 *             <cm.MIDIEndpointRef>destination,
*/
    __pyx_v_status = MIDISend(((MIDIPortRef)__pyx_v_port), ((MIDIEndpointRef)__pyx_v_destination), __pyx_v_pktlist);

    /* "coremusic/capi.pyx":5568
 *             pktlist)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDISend"))
 *         return status
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":5569
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDISend"))             # <<<<<<<<<<<<<<
 *         return status
 * 
*/
      __pyx_t_4 = NULL;
      __pyx_t_7 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5569, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5569, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 5569, __pyx_L6_error)

      /* "coremusic/capi.pyx":5568
 *             pktlist)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDISend"))
 *         return status
*/
    }

    /* "coremusic/capi.pyx":5570
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDISend"))
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5570, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":5573
 * 
 *     finally:
 *         free(pktlist)             # <<<<<<<<<<<<<<
 * 
 * # Constants and helpers
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        free(__pyx_v_pktlist);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_16 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_pktlist);
      __pyx_r = __pyx_t_16;
      __pyx_t_16 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5518
 * # Send functions with simplified packet creation
 * 
 * def midi_send_data(long port, long destination, bytes data, int timestamp=0):             # <<<<<<<<<<<<<<
 *     """Send MIDI data to a destination.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.midi_send_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5577
 * # Constants and helpers
 * 
 * def get_midi_error_invalid_client():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidClient error constant."""
 *     return cm.kMIDIInvalidClient
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_561get_midi_error_invalid_client(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_560get_midi_error_invalid_client, "get_midi_error_invalid_client()\n\nGet the kMIDIInvalidClient error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_561get_midi_error_invalid_client = {"get_midi_error_invalid_client", (PyCFunction)__pyx_pw_9coremusic_4capi_561get_midi_error_invalid_client, METH_NOARGS, __pyx_doc_9coremusic_4capi_560get_midi_error_invalid_client};
static PyObject *__pyx_pw_9coremusic_4capi_561get_midi_error_invalid_client(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_invalid_client (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_560get_midi_error_invalid_client(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_560get_midi_error_invalid_client(CYTHON_UNUSED PyObject *__pyx_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_midi_error_invalid_client", 0);

  /* "coremusic/capi.pyx":5579
 * def get_midi_error_invalid_client():
 *     """Get the kMIDIInvalidClient error constant."""
 *     return cm.kMIDIInvalidClient             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_invalid_port():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIInvalidClient); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5577
 * # Constants and helpers
 * 
 * def get_midi_error_invalid_client():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidClient error constant."""
 *     return cm.kMIDIInvalidClient
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_invalid_client", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5581
 *     return cm.kMIDIInvalidClient
 * 
 * def get_midi_error_invalid_port():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidPort error constant."""
 *     return cm.kMIDIInvalidPort
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_563get_midi_error_invalid_port(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_562get_midi_error_invalid_port, "get_midi_error_invalid_port()\n\nGet the kMIDIInvalidPort error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_563get_midi_error_invalid_port = {"get_midi_error_invalid_port", (PyCFunction)__pyx_pw_9coremusic_4capi_563get_midi_error_invalid_port, METH_NOARGS, __pyx_doc_9coremusic_4capi_562get_midi_error_invalid_port};
static PyObject *__pyx_pw_9coremusic_4capi_563get_midi_error_invalid_port(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_invalid_port (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_562get_midi_error_invalid_port(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_562get_midi_error_invalid_port(CYTHON_UNUSED PyObject *__pyx_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_midi_error_invalid_port", 0);

  /* "coremusic/capi.pyx":5583
 * def get_midi_error_invalid_port():
 *     """Get the kMIDIInvalidPort error constant."""
 *     return cm.kMIDIInvalidPort             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_wrong_endpoint_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIInvalidPort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5581
 *     return cm.kMIDIInvalidClient
 * 
 * def get_midi_error_invalid_port():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidPort error constant."""
 *     return cm.kMIDIInvalidPort
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_invalid_port", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5585
 *     return cm.kMIDIInvalidPort
 * 
 * def get_midi_error_wrong_endpoint_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongEndpointType error constant."""
 *     return cm.kMIDIWrongEndpointType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_565get_midi_error_wrong_endpoint_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_564get_midi_error_wrong_endpoint_type, "get_midi_error_wrong_endpoint_type()\n\nGet the kMIDIWrongEndpointType error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_565get_midi_error_wrong_endpoint_type = {"get_midi_error_wrong_endpoint_type", (PyCFunction)__pyx_pw_9coremusic_4capi_565get_midi_error_wrong_endpoint_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_564get_midi_error_wrong_endpoint_type};
static PyObject *__pyx_pw_9coremusic_4capi_565get_midi_error_wrong_endpoint_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_wrong_endpoint_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_564get_midi_error_wrong_endpoint_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_564get_midi_error_wrong_endpoint_type(CYTHON_UNUSED PyObject *__pyx_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_midi_error_wrong_endpoint_type", 0);

  /* "coremusic/capi.pyx":5587
 * def get_midi_error_wrong_endpoint_type():
 *     """Get the kMIDIWrongEndpointType error constant."""
 *     return cm.kMIDIWrongEndpointType             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_no_connection():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIWrongEndpointType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5585
 *     return cm.kMIDIInvalidPort
 * 
 * def get_midi_error_wrong_endpoint_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongEndpointType error constant."""
 *     return cm.kMIDIWrongEndpointType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_wrong_endpoint_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5589
 *     return cm.kMIDIWrongEndpointType
 * 
 * def get_midi_error_no_connection():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoConnection error constant."""
 *     return cm.kMIDINoConnection
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_567get_midi_error_no_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_566get_midi_error_no_connection, "get_midi_error_no_connection()\n\nGet the kMIDINoConnection error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_567get_midi_error_no_connection = {"get_midi_error_no_connection", (PyCFunction)__pyx_pw_9coremusic_4capi_567get_midi_error_no_connection, METH_NOARGS, __pyx_doc_9coremusic_4capi_566get_midi_error_no_connection};
static PyObject *__pyx_pw_9coremusic_4capi_567get_midi_error_no_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_no_connection (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_566get_midi_error_no_connection(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_566get_midi_error_no_connection(CYTHON_UNUSED PyObject *__pyx_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_midi_error_no_connection", 0);

  /* "coremusic/capi.pyx":5591
 * def get_midi_error_no_connection():
 *     """Get the kMIDINoConnection error constant."""
 *     return cm.kMIDINoConnection             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_unknown_endpoint():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDINoConnection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5589
 *     return cm.kMIDIWrongEndpointType
 * 
 * def get_midi_error_no_connection():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoConnection error constant."""
 *     return cm.kMIDINoConnection
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_no_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5593
 *     return cm.kMIDINoConnection
 * 
 * def get_midi_error_unknown_endpoint():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownEndpoint error constant."""
 *     return cm.kMIDIUnknownEndpoint
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_569get_midi_error_unknown_endpoint(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_568get_midi_error_unknown_endpoint, "get_midi_error_unknown_endpoint()\n\nGet the kMIDIUnknownEndpoint error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_569get_midi_error_unknown_endpoint = {"get_midi_error_unknown_endpoint", (PyCFunction)__pyx_pw_9coremusic_4capi_569get_midi_error_unknown_endpoint, METH_NOARGS, __pyx_doc_9coremusic_4capi_568get_midi_error_unknown_endpoint};
static PyObject *__pyx_pw_9coremusic_4capi_569get_midi_error_unknown_endpoint(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_unknown_endpoint (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_568get_midi_error_unknown_endpoint(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_568get_midi_error_unknown_endpoint(CYTHON_UNUSED PyObject *__pyx_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_midi_error_unknown_endpoint", 0);

  /* "coremusic/capi.pyx":5595
 * def get_midi_error_unknown_endpoint():
 *     """Get the kMIDIUnknownEndpoint error constant."""
 *     return cm.kMIDIUnknownEndpoint             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_unknown_property():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIUnknownEndpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5593
 *     return cm.kMIDINoConnection
 * 
 * def get_midi_error_unknown_endpoint():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownEndpoint error constant."""
 *     return cm.kMIDIUnknownEndpoint
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_unknown_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5597
 *     return cm.kMIDIUnknownEndpoint
 * 
 * def get_midi_error_unknown_property():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownProperty error constant."""
 *     return cm.kMIDIUnknownProperty
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_571get_midi_error_unknown_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_570get_midi_error_unknown_property, "get_midi_error_unknown_property()\n\nGet the kMIDIUnknownProperty error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_571get_midi_error_unknown_property = {"get_midi_error_unknown_property", (PyCFunction)__pyx_pw_9coremusic_4capi_571get_midi_error_unknown_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_570get_midi_error_unknown_property};
static PyObject *__pyx_pw_9coremusic_4capi_571get_midi_error_unknown_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_unknown_property (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_570get_midi_error_unknown_property(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_570get_midi_error_unknown_property(CYTHON_UNUSED PyObject *__pyx_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_midi_error_unknown_property", 0);

  /* "coremusic/capi.pyx":5599
 * def get_midi_error_unknown_property():
 *     """Get the kMIDIUnknownProperty error constant."""
 *     return cm.kMIDIUnknownProperty             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_wrong_property_type():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIUnknownProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5597
 *     return cm.kMIDIUnknownEndpoint
 * 
 * def get_midi_error_unknown_property():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownProperty error constant."""
 *     return cm.kMIDIUnknownProperty
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_unknown_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5601
 *     return cm.kMIDIUnknownProperty
 * 
 * def get_midi_error_wrong_property_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongPropertyType error constant."""
 *     return cm.kMIDIWrongPropertyType
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_573get_midi_error_wrong_property_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_572get_midi_error_wrong_property_type, "get_midi_error_wrong_property_type()\n\nGet the kMIDIWrongPropertyType error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_573get_midi_error_wrong_property_type = {"get_midi_error_wrong_property_type", (PyCFunction)__pyx_pw_9coremusic_4capi_573get_midi_error_wrong_property_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_572get_midi_error_wrong_property_type};
static PyObject *__pyx_pw_9coremusic_4capi_573get_midi_error_wrong_property_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_wrong_property_type (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_572get_midi_error_wrong_property_type(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_572get_midi_error_wrong_property_type(CYTHON_UNUSED PyObject *__pyx_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_midi_error_wrong_property_type", 0);

  /* "coremusic/capi.pyx":5603
 * def get_midi_error_wrong_property_type():
 *     """Get the kMIDIWrongPropertyType error constant."""
 *     return cm.kMIDIWrongPropertyType             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_no_current_setup():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIWrongPropertyType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5601
 *     return cm.kMIDIUnknownProperty
 * 
 * def get_midi_error_wrong_property_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongPropertyType error constant."""
 *     return cm.kMIDIWrongPropertyType
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_wrong_property_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5605
 *     return cm.kMIDIWrongPropertyType
 * 
 * def get_midi_error_no_current_setup():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoCurrentSetup error constant."""
 *     return cm.kMIDINoCurrentSetup
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_575get_midi_error_no_current_setup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_574get_midi_error_no_current_setup, "get_midi_error_no_current_setup()\n\nGet the kMIDINoCurrentSetup error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_575get_midi_error_no_current_setup = {"get_midi_error_no_current_setup", (PyCFunction)__pyx_pw_9coremusic_4capi_575get_midi_error_no_current_setup, METH_NOARGS, __pyx_doc_9coremusic_4capi_574get_midi_error_no_current_setup};
static PyObject *__pyx_pw_9coremusic_4capi_575get_midi_error_no_current_setup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_no_current_setup (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_574get_midi_error_no_current_setup(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_574get_midi_error_no_current_setup(CYTHON_UNUSED PyObject *__pyx_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_midi_error_no_current_setup", 0);

  /* "coremusic/capi.pyx":5607
 * def get_midi_error_no_current_setup():
 *     """Get the kMIDINoCurrentSetup error constant."""
 *     return cm.kMIDINoCurrentSetup             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_message_send_err():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDINoCurrentSetup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5605
 *     return cm.kMIDIWrongPropertyType
 * 
 * def get_midi_error_no_current_setup():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoCurrentSetup error constant."""
 *     return cm.kMIDINoCurrentSetup
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_no_current_setup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5609
 *     return cm.kMIDINoCurrentSetup
 * 
 * def get_midi_error_message_send_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIMessageSendErr error constant."""
 *     return cm.kMIDIMessageSendErr
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_577get_midi_error_message_send_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_576get_midi_error_message_send_err, "get_midi_error_message_send_err()\n\nGet the kMIDIMessageSendErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_577get_midi_error_message_send_err = {"get_midi_error_message_send_err", (PyCFunction)__pyx_pw_9coremusic_4capi_577get_midi_error_message_send_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_576get_midi_error_message_send_err};
static PyObject *__pyx_pw_9coremusic_4capi_577get_midi_error_message_send_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_message_send_err (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_576get_midi_error_message_send_err(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_576get_midi_error_message_send_err(CYTHON_UNUSED PyObject *__pyx_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_midi_error_message_send_err", 0);

  /* "coremusic/capi.pyx":5611
 * def get_midi_error_message_send_err():
 *     """Get the kMIDIMessageSendErr error constant."""
 *     return cm.kMIDIMessageSendErr             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_server_start_err():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIMessageSendErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5609
 *     return cm.kMIDINoCurrentSetup
 * 
 * def get_midi_error_message_send_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIMessageSendErr error constant."""
 *     return cm.kMIDIMessageSendErr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_message_send_err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5613
 *     return cm.kMIDIMessageSendErr
 * 
 * def get_midi_error_server_start_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIServerStartErr error constant."""
 *     return cm.kMIDIServerStartErr
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_579get_midi_error_server_start_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_578get_midi_error_server_start_err, "get_midi_error_server_start_err()\n\nGet the kMIDIServerStartErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_579get_midi_error_server_start_err = {"get_midi_error_server_start_err", (PyCFunction)__pyx_pw_9coremusic_4capi_579get_midi_error_server_start_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_578get_midi_error_server_start_err};
static PyObject *__pyx_pw_9coremusic_4capi_579get_midi_error_server_start_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_server_start_err (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_578get_midi_error_server_start_err(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_578get_midi_error_server_start_err(CYTHON_UNUSED PyObject *__pyx_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_midi_error_server_start_err", 0);

  /* "coremusic/capi.pyx":5615
 * def get_midi_error_server_start_err():
 *     """Get the kMIDIServerStartErr error constant."""
 *     return cm.kMIDIServerStartErr             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_setup_format_err():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIServerStartErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5613
 *     return cm.kMIDIMessageSendErr
 * 
 * def get_midi_error_server_start_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIServerStartErr error constant."""
 *     return cm.kMIDIServerStartErr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_server_start_err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5617
 *     return cm.kMIDIServerStartErr
 * 
 * def get_midi_error_setup_format_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDISetupFormatErr error constant."""
 *     return cm.kMIDISetupFormatErr
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_581get_midi_error_setup_format_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_580get_midi_error_setup_format_err, "get_midi_error_setup_format_err()\n\nGet the kMIDISetupFormatErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_581get_midi_error_setup_format_err = {"get_midi_error_setup_format_err", (PyCFunction)__pyx_pw_9coremusic_4capi_581get_midi_error_setup_format_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_580get_midi_error_setup_format_err};
static PyObject *__pyx_pw_9coremusic_4capi_581get_midi_error_setup_format_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_setup_format_err (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_580get_midi_error_setup_format_err(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_580get_midi_error_setup_format_err(CYTHON_UNUSED PyObject *__pyx_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_midi_error_setup_format_err", 0);

  /* "coremusic/capi.pyx":5619
 * def get_midi_error_setup_format_err():
 *     """Get the kMIDISetupFormatErr error constant."""
 *     return cm.kMIDISetupFormatErr             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_wrong_thread():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDISetupFormatErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5617
 *     return cm.kMIDIServerStartErr
 * 
 * def get_midi_error_setup_format_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDISetupFormatErr error constant."""
 *     return cm.kMIDISetupFormatErr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_setup_format_err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5621
 *     return cm.kMIDISetupFormatErr
 * 
 * def get_midi_error_wrong_thread():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongThread error constant."""
 *     return cm.kMIDIWrongThread
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_583get_midi_error_wrong_thread(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_582get_midi_error_wrong_thread, "get_midi_error_wrong_thread()\n\nGet the kMIDIWrongThread error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_583get_midi_error_wrong_thread = {"get_midi_error_wrong_thread", (PyCFunction)__pyx_pw_9coremusic_4capi_583get_midi_error_wrong_thread, METH_NOARGS, __pyx_doc_9coremusic_4capi_582get_midi_error_wrong_thread};
static PyObject *__pyx_pw_9coremusic_4capi_583get_midi_error_wrong_thread(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_wrong_thread (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_582get_midi_error_wrong_thread(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_582get_midi_error_wrong_thread(CYTHON_UNUSED PyObject *__pyx_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_midi_error_wrong_thread", 0);

  /* "coremusic/capi.pyx":5623
 * def get_midi_error_wrong_thread():
 *     """Get the kMIDIWrongThread error constant."""
 *     return cm.kMIDIWrongThread             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_object_not_found():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIWrongThread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5621
 *     return cm.kMIDISetupFormatErr
 * 
 * def get_midi_error_wrong_thread():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongThread error constant."""
 *     return cm.kMIDIWrongThread
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_wrong_thread", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5625
 *     return cm.kMIDIWrongThread
 * 
 * def get_midi_error_object_not_found():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectNotFound error constant."""
 *     return cm.kMIDIObjectNotFound
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_585get_midi_error_object_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_584get_midi_error_object_not_found, "get_midi_error_object_not_found()\n\nGet the kMIDIObjectNotFound error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_585get_midi_error_object_not_found = {"get_midi_error_object_not_found", (PyCFunction)__pyx_pw_9coremusic_4capi_585get_midi_error_object_not_found, METH_NOARGS, __pyx_doc_9coremusic_4capi_584get_midi_error_object_not_found};
static PyObject *__pyx_pw_9coremusic_4capi_585get_midi_error_object_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_object_not_found (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_584get_midi_error_object_not_found(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_584get_midi_error_object_not_found(CYTHON_UNUSED PyObject *__pyx_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_midi_error_object_not_found", 0);

  /* "coremusic/capi.pyx":5627
 * def get_midi_error_object_not_found():
 *     """Get the kMIDIObjectNotFound error constant."""
 *     return cm.kMIDIObjectNotFound             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_id_not_unique():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectNotFound); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5625
 *     return cm.kMIDIWrongThread
 * 
 * def get_midi_error_object_not_found():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectNotFound error constant."""
 *     return cm.kMIDIObjectNotFound
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_object_not_found", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5629
 *     return cm.kMIDIObjectNotFound
 * 
 * def get_midi_error_id_not_unique():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIIDNotUnique error constant."""
 *     return cm.kMIDIIDNotUnique
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_587get_midi_error_id_not_unique(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_586get_midi_error_id_not_unique, "get_midi_error_id_not_unique()\n\nGet the kMIDIIDNotUnique error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_587get_midi_error_id_not_unique = {"get_midi_error_id_not_unique", (PyCFunction)__pyx_pw_9coremusic_4capi_587get_midi_error_id_not_unique, METH_NOARGS, __pyx_doc_9coremusic_4capi_586get_midi_error_id_not_unique};
static PyObject *__pyx_pw_9coremusic_4capi_587get_midi_error_id_not_unique(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_id_not_unique (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_586get_midi_error_id_not_unique(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_586get_midi_error_id_not_unique(CYTHON_UNUSED PyObject *__pyx_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_midi_error_id_not_unique", 0);

  /* "coremusic/capi.pyx":5631
 * def get_midi_error_id_not_unique():
 *     """Get the kMIDIIDNotUnique error constant."""
 *     return cm.kMIDIIDNotUnique             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_not_permitted():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIIDNotUnique); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5629
 *     return cm.kMIDIObjectNotFound
 * 
 * def get_midi_error_id_not_unique():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIIDNotUnique error constant."""
 *     return cm.kMIDIIDNotUnique
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_id_not_unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5633
 *     return cm.kMIDIIDNotUnique
 * 
 * def get_midi_error_not_permitted():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINotPermitted error constant."""
 *     return cm.kMIDINotPermitted
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_589get_midi_error_not_permitted(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_588get_midi_error_not_permitted, "get_midi_error_not_permitted()\n\nGet the kMIDINotPermitted error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_589get_midi_error_not_permitted = {"get_midi_error_not_permitted", (PyCFunction)__pyx_pw_9coremusic_4capi_589get_midi_error_not_permitted, METH_NOARGS, __pyx_doc_9coremusic_4capi_588get_midi_error_not_permitted};
static PyObject *__pyx_pw_9coremusic_4capi_589get_midi_error_not_permitted(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_not_permitted (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_588get_midi_error_not_permitted(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_588get_midi_error_not_permitted(CYTHON_UNUSED PyObject *__pyx_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_midi_error_not_permitted", 0);

  /* "coremusic/capi.pyx":5635
 * def get_midi_error_not_permitted():
 *     """Get the kMIDINotPermitted error constant."""
 *     return cm.kMIDINotPermitted             # <<<<<<<<<<<<<<
 * 
 * def get_midi_error_unknown_error():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDINotPermitted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5633
 *     return cm.kMIDIIDNotUnique
 * 
 * def get_midi_error_not_permitted():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINotPermitted error constant."""
 *     return cm.kMIDINotPermitted
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_not_permitted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5637
 *     return cm.kMIDINotPermitted
 * 
 * def get_midi_error_unknown_error():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownError error constant."""
 *     return cm.kMIDIUnknownError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_591get_midi_error_unknown_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_590get_midi_error_unknown_error, "get_midi_error_unknown_error()\n\nGet the kMIDIUnknownError error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_591get_midi_error_unknown_error = {"get_midi_error_unknown_error", (PyCFunction)__pyx_pw_9coremusic_4capi_591get_midi_error_unknown_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_590get_midi_error_unknown_error};
static PyObject *__pyx_pw_9coremusic_4capi_591get_midi_error_unknown_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_error_unknown_error (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_590get_midi_error_unknown_error(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_590get_midi_error_unknown_error(CYTHON_UNUSED PyObject *__pyx_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_midi_error_unknown_error", 0);

  /* "coremusic/capi.pyx":5639
 * def get_midi_error_unknown_error():
 *     """Get the kMIDIUnknownError error constant."""
 *     return cm.kMIDIUnknownError             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_other():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIUnknownError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5637
 *     return cm.kMIDINotPermitted
 * 
 * def get_midi_error_unknown_error():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownError error constant."""
 *     return cm.kMIDIUnknownError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_error_unknown_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5641
 *     return cm.kMIDIUnknownError
 * 
 * def get_midi_object_type_other():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Other constant."""
 *     return cm.kMIDIObjectType_Other
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_593get_midi_object_type_other(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_592get_midi_object_type_other, "get_midi_object_type_other()\n\nGet the kMIDIObjectType_Other constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_593get_midi_object_type_other = {"get_midi_object_type_other", (PyCFunction)__pyx_pw_9coremusic_4capi_593get_midi_object_type_other, METH_NOARGS, __pyx_doc_9coremusic_4capi_592get_midi_object_type_other};
static PyObject *__pyx_pw_9coremusic_4capi_593get_midi_object_type_other(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_other (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_592get_midi_object_type_other(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_592get_midi_object_type_other(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_other", 0);

  /* "coremusic/capi.pyx":5643
 * def get_midi_object_type_other():
 *     """Get the kMIDIObjectType_Other constant."""
 *     return cm.kMIDIObjectType_Other             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_device():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_Other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5641
 *     return cm.kMIDIUnknownError
 * 
 * def get_midi_object_type_other():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Other constant."""
 *     return cm.kMIDIObjectType_Other
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_other", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5645
 *     return cm.kMIDIObjectType_Other
 * 
 * def get_midi_object_type_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Device constant."""
 *     return cm.kMIDIObjectType_Device
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_595get_midi_object_type_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_594get_midi_object_type_device, "get_midi_object_type_device()\n\nGet the kMIDIObjectType_Device constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_595get_midi_object_type_device = {"get_midi_object_type_device", (PyCFunction)__pyx_pw_9coremusic_4capi_595get_midi_object_type_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_594get_midi_object_type_device};
static PyObject *__pyx_pw_9coremusic_4capi_595get_midi_object_type_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_594get_midi_object_type_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_594get_midi_object_type_device(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_device", 0);

  /* "coremusic/capi.pyx":5647
 * def get_midi_object_type_device():
 *     """Get the kMIDIObjectType_Device constant."""
 *     return cm.kMIDIObjectType_Device             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_entity():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_Device); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5645
 *     return cm.kMIDIObjectType_Other
 * 
 * def get_midi_object_type_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Device constant."""
 *     return cm.kMIDIObjectType_Device
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5649
 *     return cm.kMIDIObjectType_Device
 * 
 * def get_midi_object_type_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Entity constant."""
 *     return cm.kMIDIObjectType_Entity
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_597get_midi_object_type_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_596get_midi_object_type_entity, "get_midi_object_type_entity()\n\nGet the kMIDIObjectType_Entity constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_597get_midi_object_type_entity = {"get_midi_object_type_entity", (PyCFunction)__pyx_pw_9coremusic_4capi_597get_midi_object_type_entity, METH_NOARGS, __pyx_doc_9coremusic_4capi_596get_midi_object_type_entity};
static PyObject *__pyx_pw_9coremusic_4capi_597get_midi_object_type_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_entity (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_596get_midi_object_type_entity(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_596get_midi_object_type_entity(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_entity", 0);

  /* "coremusic/capi.pyx":5651
 * def get_midi_object_type_entity():
 *     """Get the kMIDIObjectType_Entity constant."""
 *     return cm.kMIDIObjectType_Entity             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_source():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5649
 *     return cm.kMIDIObjectType_Device
 * 
 * def get_midi_object_type_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Entity constant."""
 *     return cm.kMIDIObjectType_Entity
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5653
 *     return cm.kMIDIObjectType_Entity
 * 
 * def get_midi_object_type_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Source constant."""
 *     return cm.kMIDIObjectType_Source
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_599get_midi_object_type_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_598get_midi_object_type_source, "get_midi_object_type_source()\n\nGet the kMIDIObjectType_Source constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_599get_midi_object_type_source = {"get_midi_object_type_source", (PyCFunction)__pyx_pw_9coremusic_4capi_599get_midi_object_type_source, METH_NOARGS, __pyx_doc_9coremusic_4capi_598get_midi_object_type_source};
static PyObject *__pyx_pw_9coremusic_4capi_599get_midi_object_type_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_source (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_598get_midi_object_type_source(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_598get_midi_object_type_source(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_source", 0);

  /* "coremusic/capi.pyx":5655
 * def get_midi_object_type_source():
 *     """Get the kMIDIObjectType_Source constant."""
 *     return cm.kMIDIObjectType_Source             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_destination():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_Source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5653
 *     return cm.kMIDIObjectType_Entity
 * 
 * def get_midi_object_type_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Source constant."""
 *     return cm.kMIDIObjectType_Source
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5657
 *     return cm.kMIDIObjectType_Source
 * 
 * def get_midi_object_type_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Destination constant."""
 *     return cm.kMIDIObjectType_Destination
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_601get_midi_object_type_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_600get_midi_object_type_destination, "get_midi_object_type_destination()\n\nGet the kMIDIObjectType_Destination constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_601get_midi_object_type_destination = {"get_midi_object_type_destination", (PyCFunction)__pyx_pw_9coremusic_4capi_601get_midi_object_type_destination, METH_NOARGS, __pyx_doc_9coremusic_4capi_600get_midi_object_type_destination};
static PyObject *__pyx_pw_9coremusic_4capi_601get_midi_object_type_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_destination (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_600get_midi_object_type_destination(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_600get_midi_object_type_destination(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_destination", 0);

  /* "coremusic/capi.pyx":5659
 * def get_midi_object_type_destination():
 *     """Get the kMIDIObjectType_Destination constant."""
 *     return cm.kMIDIObjectType_Destination             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_external_device():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_Destination); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5657
 *     return cm.kMIDIObjectType_Source
 * 
 * def get_midi_object_type_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Destination constant."""
 *     return cm.kMIDIObjectType_Destination
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5661
 *     return cm.kMIDIObjectType_Destination
 * 
 * def get_midi_object_type_external_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDevice constant."""
 *     return cm.kMIDIObjectType_ExternalDevice
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_603get_midi_object_type_external_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_602get_midi_object_type_external_device, "get_midi_object_type_external_device()\n\nGet the kMIDIObjectType_ExternalDevice constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_603get_midi_object_type_external_device = {"get_midi_object_type_external_device", (PyCFunction)__pyx_pw_9coremusic_4capi_603get_midi_object_type_external_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_602get_midi_object_type_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_603get_midi_object_type_external_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_external_device (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_602get_midi_object_type_external_device(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_602get_midi_object_type_external_device(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_external_device", 0);

  /* "coremusic/capi.pyx":5663
 * def get_midi_object_type_external_device():
 *     """Get the kMIDIObjectType_ExternalDevice constant."""
 *     return cm.kMIDIObjectType_ExternalDevice             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_external_entity():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_ExternalDevice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5661
 *     return cm.kMIDIObjectType_Destination
 * 
 * def get_midi_object_type_external_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDevice constant."""
 *     return cm.kMIDIObjectType_ExternalDevice
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_external_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5665
 *     return cm.kMIDIObjectType_ExternalDevice
 * 
 * def get_midi_object_type_external_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalEntity constant."""
 *     return cm.kMIDIObjectType_ExternalEntity
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_605get_midi_object_type_external_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_604get_midi_object_type_external_entity, "get_midi_object_type_external_entity()\n\nGet the kMIDIObjectType_ExternalEntity constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_605get_midi_object_type_external_entity = {"get_midi_object_type_external_entity", (PyCFunction)__pyx_pw_9coremusic_4capi_605get_midi_object_type_external_entity, METH_NOARGS, __pyx_doc_9coremusic_4capi_604get_midi_object_type_external_entity};
static PyObject *__pyx_pw_9coremusic_4capi_605get_midi_object_type_external_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_external_entity (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_604get_midi_object_type_external_entity(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_604get_midi_object_type_external_entity(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_external_entity", 0);

  /* "coremusic/capi.pyx":5667
 * def get_midi_object_type_external_entity():
 *     """Get the kMIDIObjectType_ExternalEntity constant."""
 *     return cm.kMIDIObjectType_ExternalEntity             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_external_source():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_ExternalEntity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5665
 *     return cm.kMIDIObjectType_ExternalDevice
 * 
 * def get_midi_object_type_external_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalEntity constant."""
 *     return cm.kMIDIObjectType_ExternalEntity
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_external_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5669
 *     return cm.kMIDIObjectType_ExternalEntity
 * 
 * def get_midi_object_type_external_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalSource constant."""
 *     return cm.kMIDIObjectType_ExternalSource
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_607get_midi_object_type_external_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_606get_midi_object_type_external_source, "get_midi_object_type_external_source()\n\nGet the kMIDIObjectType_ExternalSource constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_607get_midi_object_type_external_source = {"get_midi_object_type_external_source", (PyCFunction)__pyx_pw_9coremusic_4capi_607get_midi_object_type_external_source, METH_NOARGS, __pyx_doc_9coremusic_4capi_606get_midi_object_type_external_source};
static PyObject *__pyx_pw_9coremusic_4capi_607get_midi_object_type_external_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_external_source (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_606get_midi_object_type_external_source(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_606get_midi_object_type_external_source(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_external_source", 0);

  /* "coremusic/capi.pyx":5671
 * def get_midi_object_type_external_source():
 *     """Get the kMIDIObjectType_ExternalSource constant."""
 *     return cm.kMIDIObjectType_ExternalSource             # <<<<<<<<<<<<<<
 * 
 * def get_midi_object_type_external_destination():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_ExternalSource); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5669
 *     return cm.kMIDIObjectType_ExternalEntity
 * 
 * def get_midi_object_type_external_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalSource constant."""
 *     return cm.kMIDIObjectType_ExternalSource
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_external_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5673
 *     return cm.kMIDIObjectType_ExternalSource
 * 
 * def get_midi_object_type_external_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDestination constant."""
 *     return cm.kMIDIObjectType_ExternalDestination
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_609get_midi_object_type_external_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_608get_midi_object_type_external_destination, "get_midi_object_type_external_destination()\n\nGet the kMIDIObjectType_ExternalDestination constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_609get_midi_object_type_external_destination = {"get_midi_object_type_external_destination", (PyCFunction)__pyx_pw_9coremusic_4capi_609get_midi_object_type_external_destination, METH_NOARGS, __pyx_doc_9coremusic_4capi_608get_midi_object_type_external_destination};
static PyObject *__pyx_pw_9coremusic_4capi_609get_midi_object_type_external_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_object_type_external_destination (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_608get_midi_object_type_external_destination(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_608get_midi_object_type_external_destination(CYTHON_UNUSED PyObject *__pyx_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_midi_object_type_external_destination", 0);

  /* "coremusic/capi.pyx":5675
 * def get_midi_object_type_external_destination():
 *     """Get the kMIDIObjectType_ExternalDestination constant."""
 *     return cm.kMIDIObjectType_ExternalDestination             # <<<<<<<<<<<<<<
 * 
 * def get_midi_protocol_1_0():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIObjectType_ExternalDestination); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5673
 *     return cm.kMIDIObjectType_ExternalSource
 * 
 * def get_midi_object_type_external_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDestination constant."""
 *     return cm.kMIDIObjectType_ExternalDestination
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_object_type_external_destination", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5677
 *     return cm.kMIDIObjectType_ExternalDestination
 * 
 * def get_midi_protocol_1_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_1_0 constant."""
 *     return cm.kMIDIProtocol_1_0
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_611get_midi_protocol_1_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_610get_midi_protocol_1_0, "get_midi_protocol_1_0()\n\nGet the kMIDIProtocol_1_0 constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_611get_midi_protocol_1_0 = {"get_midi_protocol_1_0", (PyCFunction)__pyx_pw_9coremusic_4capi_611get_midi_protocol_1_0, METH_NOARGS, __pyx_doc_9coremusic_4capi_610get_midi_protocol_1_0};
static PyObject *__pyx_pw_9coremusic_4capi_611get_midi_protocol_1_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_protocol_1_0 (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_610get_midi_protocol_1_0(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_610get_midi_protocol_1_0(CYTHON_UNUSED PyObject *__pyx_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_midi_protocol_1_0", 0);

  /* "coremusic/capi.pyx":5679
 * def get_midi_protocol_1_0():
 *     """Get the kMIDIProtocol_1_0 constant."""
 *     return cm.kMIDIProtocol_1_0             # <<<<<<<<<<<<<<
 * 
 * def get_midi_protocol_2_0():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIProtocol_1_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5677
 *     return cm.kMIDIObjectType_ExternalDestination
 * 
 * def get_midi_protocol_1_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_1_0 constant."""
 *     return cm.kMIDIProtocol_1_0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_protocol_1_0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5681
 *     return cm.kMIDIProtocol_1_0
 * 
 * def get_midi_protocol_2_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_2_0 constant."""
 *     return cm.kMIDIProtocol_2_0
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_613get_midi_protocol_2_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_612get_midi_protocol_2_0, "get_midi_protocol_2_0()\n\nGet the kMIDIProtocol_2_0 constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_613get_midi_protocol_2_0 = {"get_midi_protocol_2_0", (PyCFunction)__pyx_pw_9coremusic_4capi_613get_midi_protocol_2_0, METH_NOARGS, __pyx_doc_9coremusic_4capi_612get_midi_protocol_2_0};
static PyObject *__pyx_pw_9coremusic_4capi_613get_midi_protocol_2_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_protocol_2_0 (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_612get_midi_protocol_2_0(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_612get_midi_protocol_2_0(CYTHON_UNUSED PyObject *__pyx_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_midi_protocol_2_0", 0);

  /* "coremusic/capi.pyx":5683
 * def get_midi_protocol_2_0():
 *     """Get the kMIDIProtocol_2_0 constant."""
 *     return cm.kMIDIProtocol_2_0             # <<<<<<<<<<<<<<
 * 
 * # Common property name helpers
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kMIDIProtocol_2_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5681
 *     return cm.kMIDIProtocol_1_0
 * 
 * def get_midi_protocol_2_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_2_0 constant."""
 *     return cm.kMIDIProtocol_2_0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_protocol_2_0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5687
 * # Common property name helpers
 * 
 * def get_midi_property_name():             # <<<<<<<<<<<<<<
 *     """Get the 'name' property key."""
 *     return "name"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_615get_midi_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_614get_midi_property_name, "get_midi_property_name()\n\nGet the 'name' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_615get_midi_property_name = {"get_midi_property_name", (PyCFunction)__pyx_pw_9coremusic_4capi_615get_midi_property_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_614get_midi_property_name};
static PyObject *__pyx_pw_9coremusic_4capi_615get_midi_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_name (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_614get_midi_property_name(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_614get_midi_property_name(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_name", 0);

  /* "coremusic/capi.pyx":5689
 * def get_midi_property_name():
 *     """Get the 'name' property key."""
 *     return "name"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_manufacturer():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_name);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_name;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5687
 * # Common property name helpers
 * 
 * def get_midi_property_name():             # <<<<<<<<<<<<<<
 *     """Get the 'name' property key."""
 *     return "name"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5691
 *     return "name"
 * 
 * def get_midi_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_617get_midi_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_616get_midi_property_manufacturer, "get_midi_property_manufacturer()\n\nGet the 'manufacturer' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_617get_midi_property_manufacturer = {"get_midi_property_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_617get_midi_property_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_616get_midi_property_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_617get_midi_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_manufacturer (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_616get_midi_property_manufacturer(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_616get_midi_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_manufacturer", 0);

  /* "coremusic/capi.pyx":5693
 * def get_midi_property_manufacturer():
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_model():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_manufacturer);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_manufacturer;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5691
 *     return "name"
 * 
 * def get_midi_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5695
 *     return "manufacturer"
 * 
 * def get_midi_property_model():             # <<<<<<<<<<<<<<
 *     """Get the 'model' property key."""
 *     return "model"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_619get_midi_property_model(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_618get_midi_property_model, "get_midi_property_model()\n\nGet the 'model' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_619get_midi_property_model = {"get_midi_property_model", (PyCFunction)__pyx_pw_9coremusic_4capi_619get_midi_property_model, METH_NOARGS, __pyx_doc_9coremusic_4capi_618get_midi_property_model};
static PyObject *__pyx_pw_9coremusic_4capi_619get_midi_property_model(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_model (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_618get_midi_property_model(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_618get_midi_property_model(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_model", 0);

  /* "coremusic/capi.pyx":5697
 * def get_midi_property_model():
 *     """Get the 'model' property key."""
 *     return "model"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_unique_id():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_model);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_model;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5695
 *     return "manufacturer"
 * 
 * def get_midi_property_model():             # <<<<<<<<<<<<<<
 *     """Get the 'model' property key."""
 *     return "model"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5699
 *     return "model"
 * 
 * def get_midi_property_unique_id():             # <<<<<<<<<<<<<<
 *     """Get the 'uniqueID' property key."""
 *     return "uniqueID"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_621get_midi_property_unique_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_620get_midi_property_unique_id, "get_midi_property_unique_id()\n\nGet the 'uniqueID' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_621get_midi_property_unique_id = {"get_midi_property_unique_id", (PyCFunction)__pyx_pw_9coremusic_4capi_621get_midi_property_unique_id, METH_NOARGS, __pyx_doc_9coremusic_4capi_620get_midi_property_unique_id};
static PyObject *__pyx_pw_9coremusic_4capi_621get_midi_property_unique_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_unique_id (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_620get_midi_property_unique_id(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_620get_midi_property_unique_id(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_unique_id", 0);

  /* "coremusic/capi.pyx":5701
 * def get_midi_property_unique_id():
 *     """Get the 'uniqueID' property key."""
 *     return "uniqueID"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_device_id():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_uniqueID);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_uniqueID;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5699
 *     return "model"
 * 
 * def get_midi_property_unique_id():             # <<<<<<<<<<<<<<
 *     """Get the 'uniqueID' property key."""
 *     return "uniqueID"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5703
 *     return "uniqueID"
 * 
 * def get_midi_property_device_id():             # <<<<<<<<<<<<<<
 *     """Get the 'deviceID' property key."""
 *     return "deviceID"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_623get_midi_property_device_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_622get_midi_property_device_id, "get_midi_property_device_id()\n\nGet the 'deviceID' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_623get_midi_property_device_id = {"get_midi_property_device_id", (PyCFunction)__pyx_pw_9coremusic_4capi_623get_midi_property_device_id, METH_NOARGS, __pyx_doc_9coremusic_4capi_622get_midi_property_device_id};
static PyObject *__pyx_pw_9coremusic_4capi_623get_midi_property_device_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_device_id (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_622get_midi_property_device_id(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_622get_midi_property_device_id(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_device_id", 0);

  /* "coremusic/capi.pyx":5705
 * def get_midi_property_device_id():
 *     """Get the 'deviceID' property key."""
 *     return "deviceID"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_receive_channels():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_deviceID);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_deviceID;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5703
 *     return "uniqueID"
 * 
 * def get_midi_property_device_id():             # <<<<<<<<<<<<<<
 *     """Get the 'deviceID' property key."""
 *     return "deviceID"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5707
 *     return "deviceID"
 * 
 * def get_midi_property_receive_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'receiveChannels' property key."""
 *     return "receiveChannels"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_625get_midi_property_receive_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_624get_midi_property_receive_channels, "get_midi_property_receive_channels()\n\nGet the 'receiveChannels' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_625get_midi_property_receive_channels = {"get_midi_property_receive_channels", (PyCFunction)__pyx_pw_9coremusic_4capi_625get_midi_property_receive_channels, METH_NOARGS, __pyx_doc_9coremusic_4capi_624get_midi_property_receive_channels};
static PyObject *__pyx_pw_9coremusic_4capi_625get_midi_property_receive_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_receive_channels (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_624get_midi_property_receive_channels(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_624get_midi_property_receive_channels(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_receive_channels", 0);

  /* "coremusic/capi.pyx":5709
 * def get_midi_property_receive_channels():
 *     """Get the 'receiveChannels' property key."""
 *     return "receiveChannels"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_transmit_channels():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_receiveChannels);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_receiveChannels;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5707
 *     return "deviceID"
 * 
 * def get_midi_property_receive_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'receiveChannels' property key."""
 *     return "receiveChannels"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5711
 *     return "receiveChannels"
 * 
 * def get_midi_property_transmit_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'transmitChannels' property key."""
 *     return "transmitChannels"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_627get_midi_property_transmit_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_626get_midi_property_transmit_channels, "get_midi_property_transmit_channels()\n\nGet the 'transmitChannels' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_627get_midi_property_transmit_channels = {"get_midi_property_transmit_channels", (PyCFunction)__pyx_pw_9coremusic_4capi_627get_midi_property_transmit_channels, METH_NOARGS, __pyx_doc_9coremusic_4capi_626get_midi_property_transmit_channels};
static PyObject *__pyx_pw_9coremusic_4capi_627get_midi_property_transmit_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_transmit_channels (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_626get_midi_property_transmit_channels(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_626get_midi_property_transmit_channels(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_transmit_channels", 0);

  /* "coremusic/capi.pyx":5713
 * def get_midi_property_transmit_channels():
 *     """Get the 'transmitChannels' property key."""
 *     return "transmitChannels"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_offline():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_transmitChannels);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_transmitChannels;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5711
 *     return "receiveChannels"
 * 
 * def get_midi_property_transmit_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'transmitChannels' property key."""
 *     return "transmitChannels"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5715
 *     return "transmitChannels"
 * 
 * def get_midi_property_offline():             # <<<<<<<<<<<<<<
 *     """Get the 'offline' property key."""
 *     return "offline"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_629get_midi_property_offline(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_628get_midi_property_offline, "get_midi_property_offline()\n\nGet the 'offline' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_629get_midi_property_offline = {"get_midi_property_offline", (PyCFunction)__pyx_pw_9coremusic_4capi_629get_midi_property_offline, METH_NOARGS, __pyx_doc_9coremusic_4capi_628get_midi_property_offline};
static PyObject *__pyx_pw_9coremusic_4capi_629get_midi_property_offline(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_offline (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_628get_midi_property_offline(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_628get_midi_property_offline(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_offline", 0);

  /* "coremusic/capi.pyx":5717
 * def get_midi_property_offline():
 *     """Get the 'offline' property key."""
 *     return "offline"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_private():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_offline);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_offline;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5715
 *     return "transmitChannels"
 * 
 * def get_midi_property_offline():             # <<<<<<<<<<<<<<
 *     """Get the 'offline' property key."""
 *     return "offline"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5719
 *     return "offline"
 * 
 * def get_midi_property_private():             # <<<<<<<<<<<<<<
 *     """Get the 'private' property key."""
 *     return "private"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_631get_midi_property_private(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_630get_midi_property_private, "get_midi_property_private()\n\nGet the 'private' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_631get_midi_property_private = {"get_midi_property_private", (PyCFunction)__pyx_pw_9coremusic_4capi_631get_midi_property_private, METH_NOARGS, __pyx_doc_9coremusic_4capi_630get_midi_property_private};
static PyObject *__pyx_pw_9coremusic_4capi_631get_midi_property_private(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_private (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_630get_midi_property_private(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_630get_midi_property_private(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_private", 0);

  /* "coremusic/capi.pyx":5721
 * def get_midi_property_private():
 *     """Get the 'private' property key."""
 *     return "private"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_driver_owner():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_private);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_private;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5719
 *     return "offline"
 * 
 * def get_midi_property_private():             # <<<<<<<<<<<<<<
 *     """Get the 'private' property key."""
 *     return "private"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5723
 *     return "private"
 * 
 * def get_midi_property_driver_owner():             # <<<<<<<<<<<<<<
 *     """Get the 'driverOwner' property key."""
 *     return "driverOwner"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_633get_midi_property_driver_owner(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_632get_midi_property_driver_owner, "get_midi_property_driver_owner()\n\nGet the 'driverOwner' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_633get_midi_property_driver_owner = {"get_midi_property_driver_owner", (PyCFunction)__pyx_pw_9coremusic_4capi_633get_midi_property_driver_owner, METH_NOARGS, __pyx_doc_9coremusic_4capi_632get_midi_property_driver_owner};
static PyObject *__pyx_pw_9coremusic_4capi_633get_midi_property_driver_owner(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_driver_owner (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_632get_midi_property_driver_owner(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_632get_midi_property_driver_owner(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_driver_owner", 0);

  /* "coremusic/capi.pyx":5725
 * def get_midi_property_driver_owner():
 *     """Get the 'driverOwner' property key."""
 *     return "driverOwner"             # <<<<<<<<<<<<<<
 * 
 * def get_midi_property_display_name():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_driverOwner);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_driverOwner;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5723
 *     return "private"
 * 
 * def get_midi_property_driver_owner():             # <<<<<<<<<<<<<<
 *     """Get the 'driverOwner' property key."""
 *     return "driverOwner"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5727
 *     return "driverOwner"
 * 
 * def get_midi_property_display_name():             # <<<<<<<<<<<<<<
 *     """Get the 'displayName' property key."""
 *     return "displayName"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_635get_midi_property_display_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_634get_midi_property_display_name, "get_midi_property_display_name()\n\nGet the 'displayName' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_635get_midi_property_display_name = {"get_midi_property_display_name", (PyCFunction)__pyx_pw_9coremusic_4capi_635get_midi_property_display_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_634get_midi_property_display_name};
static PyObject *__pyx_pw_9coremusic_4capi_635get_midi_property_display_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_display_name (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_634get_midi_property_display_name(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_634get_midi_property_display_name(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_display_name", 0);

  /* "coremusic/capi.pyx":5729
 * def get_midi_property_display_name():
 *     """Get the 'displayName' property key."""
 *     return "displayName"             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_displayName);
  __pyx_r = __pyx_mstate_global->__pyx_n_u_displayName;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5727
 *     return "driverOwner"
 * 
 * def get_midi_property_display_name():             # <<<<<<<<<<<<<<
 *     """Get the 'displayName' property key."""
 *     return "displayName"
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5734
 * # MIDI Messages (Universal MIDI Packet) Functions
 * 
 * def midi_message_type_for_up_word(int word):             # <<<<<<<<<<<<<<
 *     """Get the message type from a Universal MIDI Packet word.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_637midi_message_type_for_up_word(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_636midi_message_type_for_up_word, "midi_message_type_for_up_word(int word)\n\nGet the message type from a Universal MIDI Packet word.\n\nArgs:\n    word: 32-bit Universal MIDI Packet word\n\nReturns:\n    MIDIMessageType enum value");
static PyMethodDef __pyx_mdef_9coremusic_4capi_637midi_message_type_for_up_word = {"midi_message_type_for_up_word", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_637midi_message_type_for_up_word, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_636midi_message_type_for_up_word};
static PyObject *__pyx_pw_9coremusic_4capi_637midi_message_type_for_up_word(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_word;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_message_type_for_up_word (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_word,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5734, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_message_type_for_up_word", 0) < (0)) __PYX_ERR(0, 5734, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_message_type_for_up_word", 1, 1, 1, i); __PYX_ERR(0, 5734, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5734, __pyx_L3_error)
    }
    __pyx_v_word = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_word == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5734, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_message_type_for_up_word", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5734, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_message_type_for_up_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_636midi_message_type_for_up_word(__pyx_self, __pyx_v_word);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_636midi_message_type_for_up_word(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_word) {
  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("midi_message_type_for_up_word", 0);

  /* "coremusic/capi.pyx":5743
 *         MIDIMessageType enum value
 *     """
 *     return cm.MIDIMessageTypeForUPWord(<cf.UInt32>word)             # <<<<<<<<<<<<<<
 * 
 * # MIDI 1.0 Universal MIDI Packet Functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(MIDIMessageTypeForUPWord(((UInt32)__pyx_v_word))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5734
 * # MIDI Messages (Universal MIDI Packet) Functions
 * 
 * def midi_message_type_for_up_word(int word):             # <<<<<<<<<<<<<<
 *     """Get the message type from a Universal MIDI Packet word.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_message_type_for_up_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5747
 * # MIDI 1.0 Universal MIDI Packet Functions
 * 
 * def midi1_up_channel_voice_message(int group, int status, int channel, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet channel voice message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_639midi1_up_channel_voice_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_638midi1_up_channel_voice_message, "midi1_up_channel_voice_message(int group, int status, int channel, int data1, int data2)\n\nCreate a MIDI 1.0 Universal Packet channel voice message.\n\nArgs:\n    group: MIDI group (0-15)\n    status: MIDI status nibble\n    channel: MIDI channel (0-15)\n    data1: First data byte\n    data2: Second data byte\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_639midi1_up_channel_voice_message = {"midi1_up_channel_voice_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_639midi1_up_channel_voice_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_638midi1_up_channel_voice_message};
static PyObject *__pyx_pw_9coremusic_4capi_639midi1_up_channel_voice_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_status;
  int __pyx_v_channel;
  int __pyx_v_data1;
  int __pyx_v_data2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_channel_voice_message (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_data1,&__pyx_mstate_global->__pyx_n_u_data2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5747, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_channel_voice_message", 0) < (0)) __PYX_ERR(0, 5747, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_channel_voice_message", 1, 5, 5, i); __PYX_ERR(0, 5747, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5747, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5747, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5747, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5747, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5747, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5747, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5747, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5747, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5747, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5747, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_channel_voice_message", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 5747, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_channel_voice_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_638midi1_up_channel_voice_message(__pyx_self, __pyx_v_group, __pyx_v_status, __pyx_v_channel, __pyx_v_data1, __pyx_v_data2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_638midi1_up_channel_voice_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_channel, int __pyx_v_data1, int __pyx_v_data2) {
  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("midi1_up_channel_voice_message", 0);

  /* "coremusic/capi.pyx":5760
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPChannelVoiceMessage(<cf.UInt8>group, <cf.UInt8>status,             # <<<<<<<<<<<<<<
 *                                            <cf.UInt8>channel, <cf.UInt8>data1, <cf.UInt8>data2)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5761
 *     """
 *     return cm.MIDI1UPChannelVoiceMessage(<cf.UInt8>group, <cf.UInt8>status,
 *                                            <cf.UInt8>channel, <cf.UInt8>data1, <cf.UInt8>data2)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_note_off(int group, int channel, int note_number, int velocity):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPChannelVoiceMessage(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_status), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_data1), ((UInt8)__pyx_v_data2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5747
 * # MIDI 1.0 Universal MIDI Packet Functions
 * 
 * def midi1_up_channel_voice_message(int group, int status, int channel, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet channel voice message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_channel_voice_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5763
 *                                            <cf.UInt8>channel, <cf.UInt8>data1, <cf.UInt8>data2)
 * 
 * def midi1_up_note_off(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note Off message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_641midi1_up_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_640midi1_up_note_off, "midi1_up_note_off(int group, int channel, int note_number, int velocity)\n\nCreate a MIDI 1.0 Universal Packet Note Off message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    note_number: Note number (0-127)\n    velocity: Note velocity (0-127)\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_641midi1_up_note_off = {"midi1_up_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_641midi1_up_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_640midi1_up_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_641midi1_up_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_note_number;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_note_off (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note_number,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5763, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5763, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5763, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5763, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5763, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_note_off", 0) < (0)) __PYX_ERR(0, 5763, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_note_off", 1, 4, 4, i); __PYX_ERR(0, 5763, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5763, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5763, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5763, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5763, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5763, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5763, __pyx_L3_error)
    __pyx_v_note_number = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_note_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5763, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5763, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_note_off", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5763, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_640midi1_up_note_off(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_note_number, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_640midi1_up_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_velocity) {
  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("midi1_up_note_off", 0);

  /* "coremusic/capi.pyx":5775
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPNoteOff(<cf.UInt8>group, <cf.UInt8>channel,             # <<<<<<<<<<<<<<
 *                                <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5776
 *     """
 *     return cm.MIDI1UPNoteOff(<cf.UInt8>group, <cf.UInt8>channel,
 *                                <cf.UInt8>note_number, <cf.UInt8>velocity)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_note_on(int group, int channel, int note_number, int velocity):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPNoteOff(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_note_number), ((UInt8)__pyx_v_velocity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5763
 *                                            <cf.UInt8>channel, <cf.UInt8>data1, <cf.UInt8>data2)
 * 
 * def midi1_up_note_off(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note Off message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5778
 *                                <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_note_on(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note On message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_643midi1_up_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_642midi1_up_note_on, "midi1_up_note_on(int group, int channel, int note_number, int velocity)\n\nCreate a MIDI 1.0 Universal Packet Note On message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    note_number: Note number (0-127)\n    velocity: Note velocity (0-127)\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_643midi1_up_note_on = {"midi1_up_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_643midi1_up_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_642midi1_up_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_643midi1_up_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_note_number;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_note_on (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note_number,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5778, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_note_on", 0) < (0)) __PYX_ERR(0, 5778, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_note_on", 1, 4, 4, i); __PYX_ERR(0, 5778, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5778, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5778, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5778, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5778, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5778, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5778, __pyx_L3_error)
    __pyx_v_note_number = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_note_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5778, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5778, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_note_on", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5778, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_642midi1_up_note_on(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_note_number, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_642midi1_up_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_velocity) {
  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("midi1_up_note_on", 0);

  /* "coremusic/capi.pyx":5790
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPNoteOn(<cf.UInt8>group, <cf.UInt8>channel,             # <<<<<<<<<<<<<<
 *                               <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5791
 *     """
 *     return cm.MIDI1UPNoteOn(<cf.UInt8>group, <cf.UInt8>channel,
 *                               <cf.UInt8>note_number, <cf.UInt8>velocity)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_control_change(int group, int channel, int index, int data):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPNoteOn(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_note_number), ((UInt8)__pyx_v_velocity))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5778
 *                                <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_note_on(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note On message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5793
 *                               <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_control_change(int group, int channel, int index, int data):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Control Change message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_645midi1_up_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_644midi1_up_control_change, "midi1_up_control_change(int group, int channel, int index, int data)\n\nCreate a MIDI 1.0 Universal Packet Control Change message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    index: Controller number (0-127)\n    data: Controller value (0-127)\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_645midi1_up_control_change = {"midi1_up_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_645midi1_up_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_644midi1_up_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_645midi1_up_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_index;
  int __pyx_v_data;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_control_change (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5793, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5793, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5793, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5793, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5793, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_control_change", 0) < (0)) __PYX_ERR(0, 5793, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_control_change", 1, 4, 4, i); __PYX_ERR(0, 5793, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5793, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5793, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5793, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5793, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5793, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5793, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5793, __pyx_L3_error)
    __pyx_v_data = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5793, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_control_change", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5793, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_644midi1_up_control_change(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_index, __pyx_v_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_644midi1_up_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_index, int __pyx_v_data) {
  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("midi1_up_control_change", 0);

  /* "coremusic/capi.pyx":5805
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPControlChange(<cf.UInt8>group, <cf.UInt8>channel,             # <<<<<<<<<<<<<<
 *                                      <cf.UInt8>index, <cf.UInt8>data)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5806
 *     """
 *     return cm.MIDI1UPControlChange(<cf.UInt8>group, <cf.UInt8>channel,
 *                                      <cf.UInt8>index, <cf.UInt8>data)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_pitch_bend(int group, int channel, int lsb, int msb):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPControlChange(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_index), ((UInt8)__pyx_v_data))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5793
 *                               <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_control_change(int group, int channel, int index, int data):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Control Change message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5808
 *                                      <cf.UInt8>index, <cf.UInt8>data)
 * 
 * def midi1_up_pitch_bend(int group, int channel, int lsb, int msb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Pitch Bend message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_647midi1_up_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_646midi1_up_pitch_bend, "midi1_up_pitch_bend(int group, int channel, int lsb, int msb)\n\nCreate a MIDI 1.0 Universal Packet Pitch Bend message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    lsb: Pitch bend LSB (0-127)\n    msb: Pitch bend MSB (0-127)\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_647midi1_up_pitch_bend = {"midi1_up_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_647midi1_up_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_646midi1_up_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_647midi1_up_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_lsb;
  int __pyx_v_msb;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_pitch_bend (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_lsb,&__pyx_mstate_global->__pyx_n_u_msb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5808, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_pitch_bend", 0) < (0)) __PYX_ERR(0, 5808, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_pitch_bend", 1, 4, 4, i); __PYX_ERR(0, 5808, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5808, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5808, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5808, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5808, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5808, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5808, __pyx_L3_error)
    __pyx_v_lsb = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_lsb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5808, __pyx_L3_error)
    __pyx_v_msb = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_msb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5808, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_pitch_bend", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5808, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_646midi1_up_pitch_bend(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_lsb, __pyx_v_msb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_646midi1_up_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_lsb, int __pyx_v_msb) {
  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("midi1_up_pitch_bend", 0);

  /* "coremusic/capi.pyx":5820
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPPitchBend(<cf.UInt8>group, <cf.UInt8>channel,             # <<<<<<<<<<<<<<
 *                                  <cf.UInt8>lsb, <cf.UInt8>msb)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5821
 *     """
 *     return cm.MIDI1UPPitchBend(<cf.UInt8>group, <cf.UInt8>channel,
 *                                  <cf.UInt8>lsb, <cf.UInt8>msb)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_system_common(int group, int status, int byte1, int byte2):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPPitchBend(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_lsb), ((UInt8)__pyx_v_msb))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5808
 *                                      <cf.UInt8>index, <cf.UInt8>data)
 * 
 * def midi1_up_pitch_bend(int group, int channel, int lsb, int msb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Pitch Bend message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5823
 *                                  <cf.UInt8>lsb, <cf.UInt8>msb)
 * 
 * def midi1_up_system_common(int group, int status, int byte1, int byte2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet System Common message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_649midi1_up_system_common(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_648midi1_up_system_common, "midi1_up_system_common(int group, int status, int byte1, int byte2)\n\nCreate a MIDI 1.0 Universal Packet System Common message.\n\nArgs:\n    group: MIDI group (0-15)\n    status: System status byte\n    byte1: First data byte\n    byte2: Second data byte\n\nReturns:\n    32-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_649midi1_up_system_common = {"midi1_up_system_common", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_649midi1_up_system_common, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_648midi1_up_system_common};
static PyObject *__pyx_pw_9coremusic_4capi_649midi1_up_system_common(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_status;
  int __pyx_v_byte1;
  int __pyx_v_byte2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_system_common (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_byte1,&__pyx_mstate_global->__pyx_n_u_byte2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5823, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5823, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5823, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5823, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5823, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_system_common", 0) < (0)) __PYX_ERR(0, 5823, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_system_common", 1, 4, 4, i); __PYX_ERR(0, 5823, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5823, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5823, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5823, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5823, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5823, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5823, __pyx_L3_error)
    __pyx_v_byte1 = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_byte1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5823, __pyx_L3_error)
    __pyx_v_byte2 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_byte2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5823, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_system_common", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5823, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_system_common", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_648midi1_up_system_common(__pyx_self, __pyx_v_group, __pyx_v_status, __pyx_v_byte1, __pyx_v_byte2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_648midi1_up_system_common(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_byte1, int __pyx_v_byte2) {
  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("midi1_up_system_common", 0);

  /* "coremusic/capi.pyx":5835
 *         32-bit MIDI message
 *     """
 *     return cm.MIDI1UPSystemCommon(<cf.UInt8>group, <cf.UInt8>status,             # <<<<<<<<<<<<<<
 *                                     <cf.UInt8>byte1, <cf.UInt8>byte2)
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":5836
 *     """
 *     return cm.MIDI1UPSystemCommon(<cf.UInt8>group, <cf.UInt8>status,
 *                                     <cf.UInt8>byte1, <cf.UInt8>byte2)             # <<<<<<<<<<<<<<
 * 
 * def midi1_up_sysex(int group, int status, int bytes_used, int byte1, int byte2, int byte3, int byte4, int byte5, int byte6):
*/
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDI1UPSystemCommon(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_status), ((UInt8)__pyx_v_byte1), ((UInt8)__pyx_v_byte2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5823
 *                                  <cf.UInt8>lsb, <cf.UInt8>msb)
 * 
 * def midi1_up_system_common(int group, int status, int byte1, int byte2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet System Common message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_system_common", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5838
 *                                     <cf.UInt8>byte1, <cf.UInt8>byte2)
 * 
 * def midi1_up_sysex(int group, int status, int bytes_used, int byte1, int byte2, int byte3, int byte4, int byte5, int byte6):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet SysEx message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_651midi1_up_sysex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_650midi1_up_sysex, "midi1_up_sysex(int group, int status, int bytes_used, int byte1, int byte2, int byte3, int byte4, int byte5, int byte6)\n\nCreate a MIDI 1.0 Universal Packet SysEx message.\n\nArgs:\n    group: MIDI group (0-15)\n    status: SysEx status nibble\n    bytes_used: Number of data bytes used (0-6)\n    byte1-byte6: SysEx data bytes\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_651midi1_up_sysex = {"midi1_up_sysex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_651midi1_up_sysex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_650midi1_up_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_651midi1_up_sysex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_status;
  int __pyx_v_bytes_used;
  int __pyx_v_byte1;
  int __pyx_v_byte2;
  int __pyx_v_byte3;
  int __pyx_v_byte4;
  int __pyx_v_byte5;
  int __pyx_v_byte6;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi1_up_sysex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_bytes_used,&__pyx_mstate_global->__pyx_n_u_byte1,&__pyx_mstate_global->__pyx_n_u_byte2,&__pyx_mstate_global->__pyx_n_u_byte3,&__pyx_mstate_global->__pyx_n_u_byte4,&__pyx_mstate_global->__pyx_n_u_byte5,&__pyx_mstate_global->__pyx_n_u_byte6,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5838, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi1_up_sysex", 0) < (0)) __PYX_ERR(0, 5838, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 9; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi1_up_sysex", 1, 9, 9, i); __PYX_ERR(0, 5838, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 9)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 5838, __pyx_L3_error)
      values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 5838, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_bytes_used = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_bytes_used == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_byte1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_byte2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte3 = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_byte3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte4 = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_byte4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte5 = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_byte5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
    __pyx_v_byte6 = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_byte6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5838, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_sysex", 1, 9, 9, __pyx_nargs); __PYX_ERR(0, 5838, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi1_up_sysex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_650midi1_up_sysex(__pyx_self, __pyx_v_group, __pyx_v_status, __pyx_v_bytes_used, __pyx_v_byte1, __pyx_v_byte2, __pyx_v_byte3, __pyx_v_byte4, __pyx_v_byte5, __pyx_v_byte6);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_650midi1_up_sysex(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_bytes_used, int __pyx_v_byte1, int __pyx_v_byte2, int __pyx_v_byte3, int __pyx_v_byte4, int __pyx_v_byte5, int __pyx_v_byte6) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi1_up_sysex", 0);

  /* "coremusic/capi.pyx":5850
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI1UPSysEx(<cf.UInt8>group, <cf.UInt8>status, <cf.UInt8>bytes_used,             # <<<<<<<<<<<<<<
 *                                                       <cf.UInt8>byte1, <cf.UInt8>byte2, <cf.UInt8>byte3,
 *                                                       <cf.UInt8>byte4, <cf.UInt8>byte5, <cf.UInt8>byte6)
*/
  __pyx_v_msg = MIDI1UPSysEx(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_status), ((UInt8)__pyx_v_bytes_used), ((UInt8)__pyx_v_byte1), ((UInt8)__pyx_v_byte2), ((UInt8)__pyx_v_byte3), ((UInt8)__pyx_v_byte4), ((UInt8)__pyx_v_byte5), ((UInt8)__pyx_v_byte6));

  /* "coremusic/capi.pyx":5853
 *                                                       <cf.UInt8>byte1, <cf.UInt8>byte2, <cf.UInt8>byte3,
 *                                                       <cf.UInt8>byte4, <cf.UInt8>byte5, <cf.UInt8>byte6)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * # MIDI 2.0 Channel Voice Message Functions
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5853, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5853, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5838
 *                                     <cf.UInt8>byte1, <cf.UInt8>byte2)
 * 
 * def midi1_up_sysex(int group, int status, int bytes_used, int byte1, int byte2, int byte3, int byte4, int byte5, int byte6):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet SysEx message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi1_up_sysex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5857
 * # MIDI 2.0 Channel Voice Message Functions
 * 
 * def midi2_channel_voice_message(int group, int status, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Channel Voice message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_653midi2_channel_voice_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_652midi2_channel_voice_message, "midi2_channel_voice_message(int group, int status, int channel, int index, long value)\n\nCreate a MIDI 2.0 Channel Voice message.\n\nArgs:\n    group: MIDI group (0-15)\n    status: MIDI status nibble\n    channel: MIDI channel (0-15)\n    index: 16-bit index value\n    value: 32-bit data value\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_653midi2_channel_voice_message = {"midi2_channel_voice_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_653midi2_channel_voice_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_652midi2_channel_voice_message};
static PyObject *__pyx_pw_9coremusic_4capi_653midi2_channel_voice_message(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_status;
  int __pyx_v_channel;
  int __pyx_v_index;
  long __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_channel_voice_message (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5857, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_channel_voice_message", 0) < (0)) __PYX_ERR(0, 5857, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_channel_voice_message", 1, 5, 5, i); __PYX_ERR(0, 5857, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5857, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5857, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5857, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5857, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5857, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5857, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5857, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5857, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5857, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[4]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5857, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_channel_voice_message", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 5857, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_channel_voice_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_652midi2_channel_voice_message(__pyx_self, __pyx_v_group, __pyx_v_status, __pyx_v_channel, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_652midi2_channel_voice_message(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_status, int __pyx_v_channel, int __pyx_v_index, long __pyx_v_value) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_channel_voice_message", 0);

  /* "coremusic/capi.pyx":5870
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ChannelVoiceMessage(<cf.UInt8>group, <cf.UInt8>status,             # <<<<<<<<<<<<<<
 *                                                                   <cf.UInt8>channel, <ca.UInt16>index, <cf.UInt32>value)
 *     return (msg.word0, msg.word1)
*/
  __pyx_v_msg = MIDI2ChannelVoiceMessage(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_status), ((UInt8)__pyx_v_channel), ((UInt16)__pyx_v_index), ((UInt32)__pyx_v_value));

  /* "coremusic/capi.pyx":5872
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ChannelVoiceMessage(<cf.UInt8>group, <cf.UInt8>status,
 *                                                                   <cf.UInt8>channel, <ca.UInt16>index, <cf.UInt32>value)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * def midi2_note_on(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5872, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5872, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5857
 * # MIDI 2.0 Channel Voice Message Functions
 * 
 * def midi2_channel_voice_message(int group, int status, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Channel Voice message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_channel_voice_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5874
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_on(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note On message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_655midi2_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_654midi2_note_on, "midi2_note_on(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity)\n\nCreate a MIDI 2.0 Note On message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    note_number: Note number (0-127)\n    attribute_type: Note attribute type\n    attribute_data: Note attribute data (16-bit)\n    velocity: Note velocity (16-bit)\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_655midi2_note_on = {"midi2_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_655midi2_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_654midi2_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_655midi2_note_on(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_note_number;
  int __pyx_v_attribute_type;
  int __pyx_v_attribute_data;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_note_on (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note_number,&__pyx_mstate_global->__pyx_n_u_attribute_type,&__pyx_mstate_global->__pyx_n_u_attribute_data,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5874, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5874, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_note_on", 0) < (0)) __PYX_ERR(0, 5874, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_note_on", 1, 6, 6, i); __PYX_ERR(0, 5874, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5874, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5874, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5874, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5874, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5874, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5874, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
    __pyx_v_note_number = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_note_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
    __pyx_v_attribute_type = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_attribute_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
    __pyx_v_attribute_data = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_attribute_data == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5874, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_note_on", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 5874, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_654midi2_note_on(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_note_number, __pyx_v_attribute_type, __pyx_v_attribute_data, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_654midi2_note_on(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_attribute_type, int __pyx_v_attribute_data, int __pyx_v_velocity) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_note_on", 0);

  /* "coremusic/capi.pyx":5888
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2NoteOn(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt8>note_number,             # <<<<<<<<<<<<<<
 *                                                      <cf.UInt8>attribute_type, <ca.UInt16>attribute_data, <ca.UInt16>velocity)
 *     return (msg.word0, msg.word1)
*/
  __pyx_v_msg = MIDI2NoteOn(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_note_number), ((UInt8)__pyx_v_attribute_type), ((UInt16)__pyx_v_attribute_data), ((UInt16)__pyx_v_velocity));

  /* "coremusic/capi.pyx":5890
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2NoteOn(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt8>note_number,
 *                                                      <cf.UInt8>attribute_type, <ca.UInt16>attribute_data, <ca.UInt16>velocity)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * def midi2_note_off(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5890, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5890, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5874
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_on(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note On message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5892
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_off(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note Off message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_657midi2_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_656midi2_note_off, "midi2_note_off(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity)\n\nCreate a MIDI 2.0 Note Off message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    note_number: Note number (0-127)\n    attribute_type: Note attribute type\n    attribute_data: Note attribute data (16-bit)\n    velocity: Note velocity (16-bit)\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_657midi2_note_off = {"midi2_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_657midi2_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_656midi2_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_657midi2_note_off(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_note_number;
  int __pyx_v_attribute_type;
  int __pyx_v_attribute_data;
  int __pyx_v_velocity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_note_off (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_note_number,&__pyx_mstate_global->__pyx_n_u_attribute_type,&__pyx_mstate_global->__pyx_n_u_attribute_data,&__pyx_mstate_global->__pyx_n_u_velocity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5892, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5892, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_note_off", 0) < (0)) __PYX_ERR(0, 5892, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_note_off", 1, 6, 6, i); __PYX_ERR(0, 5892, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5892, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5892, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5892, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5892, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5892, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5892, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
    __pyx_v_note_number = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_note_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
    __pyx_v_attribute_type = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_attribute_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
    __pyx_v_attribute_data = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_attribute_data == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5892, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_note_off", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 5892, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_656midi2_note_off(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_note_number, __pyx_v_attribute_type, __pyx_v_attribute_data, __pyx_v_velocity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_656midi2_note_off(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_note_number, int __pyx_v_attribute_type, int __pyx_v_attribute_data, int __pyx_v_velocity) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_note_off", 0);

  /* "coremusic/capi.pyx":5906
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2NoteOff(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt8>note_number,             # <<<<<<<<<<<<<<
 *                                                       <cf.UInt8>attribute_type, <ca.UInt16>attribute_data, <ca.UInt16>velocity)
 *     return (msg.word0, msg.word1)
*/
  __pyx_v_msg = MIDI2NoteOff(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_note_number), ((UInt8)__pyx_v_attribute_type), ((UInt16)__pyx_v_attribute_data), ((UInt16)__pyx_v_velocity));

  /* "coremusic/capi.pyx":5908
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2NoteOff(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt8>note_number,
 *                                                       <cf.UInt8>attribute_type, <ca.UInt16>attribute_data, <ca.UInt16>velocity)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * def midi2_control_change(int group, int channel, int index, long value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5908, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5908, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5892
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_off(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note Off message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5910
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_control_change(int group, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Control Change message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_659midi2_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_658midi2_control_change, "midi2_control_change(int group, int channel, int index, long value)\n\nCreate a MIDI 2.0 Control Change message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    index: Controller number\n    value: Controller value (32-bit)\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_659midi2_control_change = {"midi2_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_659midi2_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_658midi2_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_659midi2_control_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_index;
  long __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_control_change (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_index,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5910, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_control_change", 0) < (0)) __PYX_ERR(0, 5910, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_control_change", 1, 4, 4, i); __PYX_ERR(0, 5910, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5910, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5910, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5910, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5910, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5910, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5910, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5910, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[3]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5910, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_control_change", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5910, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_658midi2_control_change(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_index, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_658midi2_control_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_index, long __pyx_v_value) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_control_change", 0);

  /* "coremusic/capi.pyx":5922
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ControlChange(<cf.UInt8>group, <cf.UInt8>channel,             # <<<<<<<<<<<<<<
 *                                                             <cf.UInt8>index, <cf.UInt32>value)
 *     return (msg.word0, msg.word1)
*/
  __pyx_v_msg = MIDI2ControlChange(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt8)__pyx_v_index), ((UInt32)__pyx_v_value));

  /* "coremusic/capi.pyx":5924
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ControlChange(<cf.UInt8>group, <cf.UInt8>channel,
 *                                                             <cf.UInt8>index, <cf.UInt32>value)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * def midi2_program_change(int group, int channel, bint bank_is_valid, int program, int bank_msb, int bank_lsb):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5924, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5924, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5910
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_control_change(int group, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Control Change message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5926
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_program_change(int group, int channel, bint bank_is_valid, int program, int bank_msb, int bank_lsb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Program Change message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_661midi2_program_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_660midi2_program_change, "midi2_program_change(int group, int channel, bool bank_is_valid, int program, int bank_msb, int bank_lsb)\n\nCreate a MIDI 2.0 Program Change message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    bank_is_valid: Whether bank change is included\n    program: Program number\n    bank_msb: Bank MSB\n    bank_lsb: Bank LSB\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_661midi2_program_change = {"midi2_program_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_661midi2_program_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_660midi2_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_661midi2_program_change(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  int __pyx_v_bank_is_valid;
  int __pyx_v_program;
  int __pyx_v_bank_msb;
  int __pyx_v_bank_lsb;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_program_change (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_bank_is_valid,&__pyx_mstate_global->__pyx_n_u_program,&__pyx_mstate_global->__pyx_n_u_bank_msb,&__pyx_mstate_global->__pyx_n_u_bank_lsb,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5926, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5926, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_program_change", 0) < (0)) __PYX_ERR(0, 5926, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_program_change", 1, 6, 6, i); __PYX_ERR(0, 5926, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5926, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5926, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5926, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5926, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5926, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5926, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
    __pyx_v_bank_is_valid = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_bank_is_valid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
    __pyx_v_program = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_program == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
    __pyx_v_bank_msb = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_bank_msb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
    __pyx_v_bank_lsb = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_bank_lsb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5926, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_program_change", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 5926, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_program_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_660midi2_program_change(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_bank_is_valid, __pyx_v_program, __pyx_v_bank_msb, __pyx_v_bank_lsb);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_660midi2_program_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, int __pyx_v_bank_is_valid, int __pyx_v_program, int __pyx_v_bank_msb, int __pyx_v_bank_lsb) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_program_change", 0);

  /* "coremusic/capi.pyx":5940
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ProgramChange(<cf.UInt8>group, <cf.UInt8>channel, bank_is_valid,             # <<<<<<<<<<<<<<
 *                                                             <cf.UInt8>program, <cf.UInt8>bank_msb, <cf.UInt8>bank_lsb)
 *     return (msg.word0, msg.word1)
*/
  __pyx_v_msg = MIDI2ProgramChange(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), __pyx_v_bank_is_valid, ((UInt8)__pyx_v_program), ((UInt8)__pyx_v_bank_msb), ((UInt8)__pyx_v_bank_lsb));

  /* "coremusic/capi.pyx":5942
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2ProgramChange(<cf.UInt8>group, <cf.UInt8>channel, bank_is_valid,
 *                                                             <cf.UInt8>program, <cf.UInt8>bank_msb, <cf.UInt8>bank_lsb)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * def midi2_pitch_bend(int group, int channel, long value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5942, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5942, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5926
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_program_change(int group, int channel, bint bank_is_valid, int program, int bank_msb, int bank_lsb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Program Change message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_program_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5944
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_pitch_bend(int group, int channel, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Pitch Bend message.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_663midi2_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_662midi2_pitch_bend, "midi2_pitch_bend(int group, int channel, long value)\n\nCreate a MIDI 2.0 Pitch Bend message.\n\nArgs:\n    group: MIDI group (0-15)\n    channel: MIDI channel (0-15)\n    value: Pitch bend value (32-bit)\n\nReturns:\n    Tuple of (word0, word1) for 64-bit MIDI message");
static PyMethodDef __pyx_mdef_9coremusic_4capi_663midi2_pitch_bend = {"midi2_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_663midi2_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_662midi2_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_663midi2_pitch_bend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_group;
  int __pyx_v_channel;
  long __pyx_v_value;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi2_pitch_bend (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_group,&__pyx_mstate_global->__pyx_n_u_channel,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5944, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi2_pitch_bend", 0) < (0)) __PYX_ERR(0, 5944, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi2_pitch_bend", 1, 3, 3, i); __PYX_ERR(0, 5944, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5944, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5944, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5944, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5944, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5944, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 5944, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_pitch_bend", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5944, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi2_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_662midi2_pitch_bend(__pyx_self, __pyx_v_group, __pyx_v_channel, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_662midi2_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_group, int __pyx_v_channel, long __pyx_v_value) {
  MIDIMessage_64 __pyx_v_msg;
  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("midi2_pitch_bend", 0);

  /* "coremusic/capi.pyx":5955
 *         Tuple of (word0, word1) for 64-bit MIDI message
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2PitchBend(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt32>value)             # <<<<<<<<<<<<<<
 *     return (msg.word0, msg.word1)
 * 
*/
  __pyx_v_msg = MIDI2PitchBend(((UInt8)__pyx_v_group), ((UInt8)__pyx_v_channel), ((UInt32)__pyx_v_value));

  /* "coremusic/capi.pyx":5956
 *     """
 *     cdef cm.MIDIMessage_64 msg = cm.MIDI2PitchBend(<cf.UInt8>group, <cf.UInt8>channel, <cf.UInt32>value)
 *     return (msg.word0, msg.word1)             # <<<<<<<<<<<<<<
 * 
 * # MIDI Message Type Constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_msg.word1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5956, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5956, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5944
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_pitch_bend(int group, int channel, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Pitch Bend message.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("coremusic.capi.midi2_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5960
 * # MIDI Message Type Constants
 * 
 * def get_midi_message_type_utility():             # <<<<<<<<<<<<<<
 *     """Get the Utility message type constant."""
 *     return cm.kMIDIMessageTypeUtility
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_665get_midi_message_type_utility(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_664get_midi_message_type_utility, "get_midi_message_type_utility()\n\nGet the Utility message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_665get_midi_message_type_utility = {"get_midi_message_type_utility", (PyCFunction)__pyx_pw_9coremusic_4capi_665get_midi_message_type_utility, METH_NOARGS, __pyx_doc_9coremusic_4capi_664get_midi_message_type_utility};
static PyObject *__pyx_pw_9coremusic_4capi_665get_midi_message_type_utility(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_utility (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_664get_midi_message_type_utility(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_664get_midi_message_type_utility(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_utility", 0);

  /* "coremusic/capi.pyx":5962
 * def get_midi_message_type_utility():
 *     """Get the Utility message type constant."""
 *     return cm.kMIDIMessageTypeUtility             # <<<<<<<<<<<<<<
 * 
 * def get_midi_message_type_system():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeUtility); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5960
 * # MIDI Message Type Constants
 * 
 * def get_midi_message_type_utility():             # <<<<<<<<<<<<<<
 *     """Get the Utility message type constant."""
 *     return cm.kMIDIMessageTypeUtility
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_utility", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5964
 *     return cm.kMIDIMessageTypeUtility
 * 
 * def get_midi_message_type_system():             # <<<<<<<<<<<<<<
 *     """Get the System message type constant."""
 *     return cm.kMIDIMessageTypeSystem
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_667get_midi_message_type_system(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_666get_midi_message_type_system, "get_midi_message_type_system()\n\nGet the System message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_667get_midi_message_type_system = {"get_midi_message_type_system", (PyCFunction)__pyx_pw_9coremusic_4capi_667get_midi_message_type_system, METH_NOARGS, __pyx_doc_9coremusic_4capi_666get_midi_message_type_system};
static PyObject *__pyx_pw_9coremusic_4capi_667get_midi_message_type_system(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_system (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_666get_midi_message_type_system(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_666get_midi_message_type_system(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_system", 0);

  /* "coremusic/capi.pyx":5966
 * def get_midi_message_type_system():
 *     """Get the System message type constant."""
 *     return cm.kMIDIMessageTypeSystem             # <<<<<<<<<<<<<<
 * 
 * def get_midi_message_type_channel_voice1():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeSystem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5964
 *     return cm.kMIDIMessageTypeUtility
 * 
 * def get_midi_message_type_system():             # <<<<<<<<<<<<<<
 *     """Get the System message type constant."""
 *     return cm.kMIDIMessageTypeSystem
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_system", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5968
 *     return cm.kMIDIMessageTypeSystem
 * 
 * def get_midi_message_type_channel_voice1():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 1 (MIDI 1.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice1
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_669get_midi_message_type_channel_voice1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_668get_midi_message_type_channel_voice1, "get_midi_message_type_channel_voice1()\n\nGet the Channel Voice 1 (MIDI 1.0) message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_669get_midi_message_type_channel_voice1 = {"get_midi_message_type_channel_voice1", (PyCFunction)__pyx_pw_9coremusic_4capi_669get_midi_message_type_channel_voice1, METH_NOARGS, __pyx_doc_9coremusic_4capi_668get_midi_message_type_channel_voice1};
static PyObject *__pyx_pw_9coremusic_4capi_669get_midi_message_type_channel_voice1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_channel_voice1 (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_668get_midi_message_type_channel_voice1(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_668get_midi_message_type_channel_voice1(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_channel_voice1", 0);

  /* "coremusic/capi.pyx":5970
 * def get_midi_message_type_channel_voice1():
 *     """Get the Channel Voice 1 (MIDI 1.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice1             # <<<<<<<<<<<<<<
 * 
 * def get_midi_message_type_sysex():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeChannelVoice1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5968
 *     return cm.kMIDIMessageTypeSystem
 * 
 * def get_midi_message_type_channel_voice1():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 1 (MIDI 1.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice1
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_channel_voice1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5972
 *     return cm.kMIDIMessageTypeChannelVoice1
 * 
 * def get_midi_message_type_sysex():             # <<<<<<<<<<<<<<
 *     """Get the SysEx message type constant."""
 *     return cm.kMIDIMessageTypeSysEx
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_671get_midi_message_type_sysex(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_670get_midi_message_type_sysex, "get_midi_message_type_sysex()\n\nGet the SysEx message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_671get_midi_message_type_sysex = {"get_midi_message_type_sysex", (PyCFunction)__pyx_pw_9coremusic_4capi_671get_midi_message_type_sysex, METH_NOARGS, __pyx_doc_9coremusic_4capi_670get_midi_message_type_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_671get_midi_message_type_sysex(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_sysex (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_670get_midi_message_type_sysex(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_670get_midi_message_type_sysex(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_sysex", 0);

  /* "coremusic/capi.pyx":5974
 * def get_midi_message_type_sysex():
 *     """Get the SysEx message type constant."""
 *     return cm.kMIDIMessageTypeSysEx             # <<<<<<<<<<<<<<
 * 
 * def get_midi_message_type_channel_voice2():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeSysEx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5972
 *     return cm.kMIDIMessageTypeChannelVoice1
 * 
 * def get_midi_message_type_sysex():             # <<<<<<<<<<<<<<
 *     """Get the SysEx message type constant."""
 *     return cm.kMIDIMessageTypeSysEx
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_sysex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5976
 *     return cm.kMIDIMessageTypeSysEx
 * 
 * def get_midi_message_type_channel_voice2():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 2 (MIDI 2.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice2
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_673get_midi_message_type_channel_voice2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_672get_midi_message_type_channel_voice2, "get_midi_message_type_channel_voice2()\n\nGet the Channel Voice 2 (MIDI 2.0) message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_673get_midi_message_type_channel_voice2 = {"get_midi_message_type_channel_voice2", (PyCFunction)__pyx_pw_9coremusic_4capi_673get_midi_message_type_channel_voice2, METH_NOARGS, __pyx_doc_9coremusic_4capi_672get_midi_message_type_channel_voice2};
static PyObject *__pyx_pw_9coremusic_4capi_673get_midi_message_type_channel_voice2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_channel_voice2 (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_672get_midi_message_type_channel_voice2(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_672get_midi_message_type_channel_voice2(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_channel_voice2", 0);

  /* "coremusic/capi.pyx":5978
 * def get_midi_message_type_channel_voice2():
 *     """Get the Channel Voice 2 (MIDI 2.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice2             # <<<<<<<<<<<<<<
 * 
 * def get_midi_message_type_data128():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeChannelVoice2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5976
 *     return cm.kMIDIMessageTypeSysEx
 * 
 * def get_midi_message_type_channel_voice2():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 2 (MIDI 2.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice2
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_channel_voice2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5980
 *     return cm.kMIDIMessageTypeChannelVoice2
 * 
 * def get_midi_message_type_data128():             # <<<<<<<<<<<<<<
 *     """Get the Data128 message type constant."""
 *     return cm.kMIDIMessageTypeData128
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_675get_midi_message_type_data128(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_674get_midi_message_type_data128, "get_midi_message_type_data128()\n\nGet the Data128 message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_675get_midi_message_type_data128 = {"get_midi_message_type_data128", (PyCFunction)__pyx_pw_9coremusic_4capi_675get_midi_message_type_data128, METH_NOARGS, __pyx_doc_9coremusic_4capi_674get_midi_message_type_data128};
static PyObject *__pyx_pw_9coremusic_4capi_675get_midi_message_type_data128(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_message_type_data128 (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_674get_midi_message_type_data128(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_674get_midi_message_type_data128(CYTHON_UNUSED PyObject *__pyx_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_midi_message_type_data128", 0);

  /* "coremusic/capi.pyx":5982
 * def get_midi_message_type_data128():
 *     """Get the Data128 message type constant."""
 *     return cm.kMIDIMessageTypeData128             # <<<<<<<<<<<<<<
 * 
 * # MIDI CV Status Constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDIMessageType(kMIDIMessageTypeData128); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5980
 *     return cm.kMIDIMessageTypeChannelVoice2
 * 
 * def get_midi_message_type_data128():             # <<<<<<<<<<<<<<
 *     """Get the Data128 message type constant."""
 *     return cm.kMIDIMessageTypeData128
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_message_type_data128", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5986
 * # MIDI CV Status Constants
 * 
 * def get_midi_cv_status_note_off():             # <<<<<<<<<<<<<<
 *     """Get the Note Off status constant."""
 *     return cm.kMIDICVStatusNoteOff
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_677get_midi_cv_status_note_off(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_676get_midi_cv_status_note_off, "get_midi_cv_status_note_off()\n\nGet the Note Off status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_677get_midi_cv_status_note_off = {"get_midi_cv_status_note_off", (PyCFunction)__pyx_pw_9coremusic_4capi_677get_midi_cv_status_note_off, METH_NOARGS, __pyx_doc_9coremusic_4capi_676get_midi_cv_status_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_677get_midi_cv_status_note_off(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_note_off (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_676get_midi_cv_status_note_off(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_676get_midi_cv_status_note_off(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_note_off", 0);

  /* "coremusic/capi.pyx":5988
 * def get_midi_cv_status_note_off():
 *     """Get the Note Off status constant."""
 *     return cm.kMIDICVStatusNoteOff             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_note_on():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusNoteOff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5986
 * # MIDI CV Status Constants
 * 
 * def get_midi_cv_status_note_off():             # <<<<<<<<<<<<<<
 *     """Get the Note Off status constant."""
 *     return cm.kMIDICVStatusNoteOff
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_note_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5990
 *     return cm.kMIDICVStatusNoteOff
 * 
 * def get_midi_cv_status_note_on():             # <<<<<<<<<<<<<<
 *     """Get the Note On status constant."""
 *     return cm.kMIDICVStatusNoteOn
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_679get_midi_cv_status_note_on(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_678get_midi_cv_status_note_on, "get_midi_cv_status_note_on()\n\nGet the Note On status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_679get_midi_cv_status_note_on = {"get_midi_cv_status_note_on", (PyCFunction)__pyx_pw_9coremusic_4capi_679get_midi_cv_status_note_on, METH_NOARGS, __pyx_doc_9coremusic_4capi_678get_midi_cv_status_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_679get_midi_cv_status_note_on(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_note_on (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_678get_midi_cv_status_note_on(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_678get_midi_cv_status_note_on(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_note_on", 0);

  /* "coremusic/capi.pyx":5992
 * def get_midi_cv_status_note_on():
 *     """Get the Note On status constant."""
 *     return cm.kMIDICVStatusNoteOn             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_poly_pressure():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusNoteOn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5990
 *     return cm.kMIDICVStatusNoteOff
 * 
 * def get_midi_cv_status_note_on():             # <<<<<<<<<<<<<<
 *     """Get the Note On status constant."""
 *     return cm.kMIDICVStatusNoteOn
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_note_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5994
 *     return cm.kMIDICVStatusNoteOn
 * 
 * def get_midi_cv_status_poly_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Poly Pressure status constant."""
 *     return cm.kMIDICVStatusPolyPressure
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_681get_midi_cv_status_poly_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_680get_midi_cv_status_poly_pressure, "get_midi_cv_status_poly_pressure()\n\nGet the Poly Pressure status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_681get_midi_cv_status_poly_pressure = {"get_midi_cv_status_poly_pressure", (PyCFunction)__pyx_pw_9coremusic_4capi_681get_midi_cv_status_poly_pressure, METH_NOARGS, __pyx_doc_9coremusic_4capi_680get_midi_cv_status_poly_pressure};
static PyObject *__pyx_pw_9coremusic_4capi_681get_midi_cv_status_poly_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_poly_pressure (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_680get_midi_cv_status_poly_pressure(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_680get_midi_cv_status_poly_pressure(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_poly_pressure", 0);

  /* "coremusic/capi.pyx":5996
 * def get_midi_cv_status_poly_pressure():
 *     """Get the Poly Pressure status constant."""
 *     return cm.kMIDICVStatusPolyPressure             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_control_change():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusPolyPressure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5994
 *     return cm.kMIDICVStatusNoteOn
 * 
 * def get_midi_cv_status_poly_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Poly Pressure status constant."""
 *     return cm.kMIDICVStatusPolyPressure
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_poly_pressure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":5998
 *     return cm.kMIDICVStatusPolyPressure
 * 
 * def get_midi_cv_status_control_change():             # <<<<<<<<<<<<<<
 *     """Get the Control Change status constant."""
 *     return cm.kMIDICVStatusControlChange
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_683get_midi_cv_status_control_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_682get_midi_cv_status_control_change, "get_midi_cv_status_control_change()\n\nGet the Control Change status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_683get_midi_cv_status_control_change = {"get_midi_cv_status_control_change", (PyCFunction)__pyx_pw_9coremusic_4capi_683get_midi_cv_status_control_change, METH_NOARGS, __pyx_doc_9coremusic_4capi_682get_midi_cv_status_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_683get_midi_cv_status_control_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_control_change (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_682get_midi_cv_status_control_change(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_682get_midi_cv_status_control_change(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_control_change", 0);

  /* "coremusic/capi.pyx":6000
 * def get_midi_cv_status_control_change():
 *     """Get the Control Change status constant."""
 *     return cm.kMIDICVStatusControlChange             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_program_change():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusControlChange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5998
 *     return cm.kMIDICVStatusPolyPressure
 * 
 * def get_midi_cv_status_control_change():             # <<<<<<<<<<<<<<
 *     """Get the Control Change status constant."""
 *     return cm.kMIDICVStatusControlChange
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_control_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6002
 *     return cm.kMIDICVStatusControlChange
 * 
 * def get_midi_cv_status_program_change():             # <<<<<<<<<<<<<<
 *     """Get the Program Change status constant."""
 *     return cm.kMIDICVStatusProgramChange
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_685get_midi_cv_status_program_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_684get_midi_cv_status_program_change, "get_midi_cv_status_program_change()\n\nGet the Program Change status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_685get_midi_cv_status_program_change = {"get_midi_cv_status_program_change", (PyCFunction)__pyx_pw_9coremusic_4capi_685get_midi_cv_status_program_change, METH_NOARGS, __pyx_doc_9coremusic_4capi_684get_midi_cv_status_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_685get_midi_cv_status_program_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_program_change (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_684get_midi_cv_status_program_change(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_684get_midi_cv_status_program_change(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_program_change", 0);

  /* "coremusic/capi.pyx":6004
 * def get_midi_cv_status_program_change():
 *     """Get the Program Change status constant."""
 *     return cm.kMIDICVStatusProgramChange             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_channel_pressure():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusProgramChange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6002
 *     return cm.kMIDICVStatusControlChange
 * 
 * def get_midi_cv_status_program_change():             # <<<<<<<<<<<<<<
 *     """Get the Program Change status constant."""
 *     return cm.kMIDICVStatusProgramChange
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_program_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6006
 *     return cm.kMIDICVStatusProgramChange
 * 
 * def get_midi_cv_status_channel_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Channel Pressure status constant."""
 *     return cm.kMIDICVStatusChannelPressure
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_687get_midi_cv_status_channel_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_686get_midi_cv_status_channel_pressure, "get_midi_cv_status_channel_pressure()\n\nGet the Channel Pressure status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_687get_midi_cv_status_channel_pressure = {"get_midi_cv_status_channel_pressure", (PyCFunction)__pyx_pw_9coremusic_4capi_687get_midi_cv_status_channel_pressure, METH_NOARGS, __pyx_doc_9coremusic_4capi_686get_midi_cv_status_channel_pressure};
static PyObject *__pyx_pw_9coremusic_4capi_687get_midi_cv_status_channel_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_channel_pressure (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_686get_midi_cv_status_channel_pressure(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_686get_midi_cv_status_channel_pressure(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_channel_pressure", 0);

  /* "coremusic/capi.pyx":6008
 * def get_midi_cv_status_channel_pressure():
 *     """Get the Channel Pressure status constant."""
 *     return cm.kMIDICVStatusChannelPressure             # <<<<<<<<<<<<<<
 * 
 * def get_midi_cv_status_pitch_bend():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusChannelPressure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6006
 *     return cm.kMIDICVStatusProgramChange
 * 
 * def get_midi_cv_status_channel_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Channel Pressure status constant."""
 *     return cm.kMIDICVStatusChannelPressure
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_channel_pressure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6010
 *     return cm.kMIDICVStatusChannelPressure
 * 
 * def get_midi_cv_status_pitch_bend():             # <<<<<<<<<<<<<<
 *     """Get the Pitch Bend status constant."""
 *     return cm.kMIDICVStatusPitchBend
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_689get_midi_cv_status_pitch_bend(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_688get_midi_cv_status_pitch_bend, "get_midi_cv_status_pitch_bend()\n\nGet the Pitch Bend status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_689get_midi_cv_status_pitch_bend = {"get_midi_cv_status_pitch_bend", (PyCFunction)__pyx_pw_9coremusic_4capi_689get_midi_cv_status_pitch_bend, METH_NOARGS, __pyx_doc_9coremusic_4capi_688get_midi_cv_status_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_689get_midi_cv_status_pitch_bend(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_cv_status_pitch_bend (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_688get_midi_cv_status_pitch_bend(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_688get_midi_cv_status_pitch_bend(CYTHON_UNUSED PyObject *__pyx_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_midi_cv_status_pitch_bend", 0);

  /* "coremusic/capi.pyx":6012
 * def get_midi_cv_status_pitch_bend():
 *     """Get the Pitch Bend status constant."""
 *     return cm.kMIDICVStatusPitchBend             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDICVStatus(kMIDICVStatusPitchBend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6010
 *     return cm.kMIDICVStatusChannelPressure
 * 
 * def get_midi_cv_status_pitch_bend():             # <<<<<<<<<<<<<<
 *     """Get the Pitch Bend status constant."""
 *     return cm.kMIDICVStatusPitchBend
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_cv_status_pitch_bend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6017
 * # MIDI Setup (Device and Entity Management) Functions
 * 
 * def midi_device_new_entity(long device, str name, int protocol, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Create a new entity for a MIDI device (macOS 11.0+, iOS 14.0+).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_691midi_device_new_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_690midi_device_new_entity, "midi_device_new_entity(long device, str name, int protocol, bool embedded, int num_source_endpoints, int num_destination_endpoints)\n\nCreate a new entity for a MIDI device (macOS 11.0+, iOS 14.0+).\n\nArgs:\n    device: The MIDIDeviceRef to add an entity to\n    name: Name of the new entity\n    protocol: MIDI protocol ID (1 for MIDI 1.0, 2 for MIDI 2.0)\n    embedded: True if entity is inside device, False if external connectors\n    num_source_endpoints: Number of source endpoints for the entity\n    num_destination_endpoints: Number of destination endpoints for the entity\n\nReturns:\n    The new MIDIEntityRef\n\nRaises:\n    RuntimeError: If entity creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_691midi_device_new_entity = {"midi_device_new_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_691midi_device_new_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_690midi_device_new_entity};
static PyObject *__pyx_pw_9coremusic_4capi_691midi_device_new_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  PyObject *__pyx_v_name = 0;
  int __pyx_v_protocol;
  int __pyx_v_embedded;
  int __pyx_v_num_source_endpoints;
  int __pyx_v_num_destination_endpoints;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_new_entity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_protocol,&__pyx_mstate_global->__pyx_n_u_embedded,&__pyx_mstate_global->__pyx_n_u_num_source_endpoints,&__pyx_mstate_global->__pyx_n_u_num_destination_endpoints,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6017, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_new_entity", 0) < (0)) __PYX_ERR(0, 6017, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_new_entity", 1, 6, 6, i); __PYX_ERR(0, 6017, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6017, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6017, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6017, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 6017, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 6017, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 6017, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
    __pyx_v_name = ((PyObject*)values[1]);
    __pyx_v_protocol = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_protocol == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
    __pyx_v_embedded = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_embedded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
    __pyx_v_num_source_endpoints = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_num_source_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
    __pyx_v_num_destination_endpoints = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_num_destination_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_new_entity", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 6017, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_new_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 6017, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_690midi_device_new_entity(__pyx_self, __pyx_v_device, __pyx_v_name, __pyx_v_protocol, __pyx_v_embedded, __pyx_v_num_source_endpoints, __pyx_v_num_destination_endpoints);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_690midi_device_new_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, PyObject *__pyx_v_name, int __pyx_v_protocol, int __pyx_v_embedded, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints) {
  MIDIEntityRef __pyx_v_entity;
  CFStringRef __pyx_v_cf_name;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CFStringRef __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_device_new_entity", 0);

  /* "coremusic/capi.pyx":6035
 *     """
 *     cdef cm.MIDIEntityRef entity
 *     cdef cf.CFStringRef cf_name = str_to_cfstring(name)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status
*/
  __pyx_t_1 = __pyx_f_9coremusic_4capi_str_to_cfstring(__pyx_v_name); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 6035, __pyx_L1_error)
  __pyx_v_cf_name = __pyx_t_1;

  /* "coremusic/capi.pyx":6038
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDeviceNewEntity(
 *             <cm.MIDIDeviceRef>device,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6039
 *     cdef cf.OSStatus status
 *     try:
 *         status = cm.MIDIDeviceNewEntity(             # <<<<<<<<<<<<<<
 *             <cm.MIDIDeviceRef>device,
 *             cf_name,
*/
    __pyx_v_status = MIDIDeviceNewEntity(((MIDIDeviceRef)__pyx_v_device), __pyx_v_cf_name, ((MIDIProtocolID)__pyx_v_protocol), ((Boolean)__pyx_v_embedded), ((ItemCount)__pyx_v_num_source_endpoints), ((ItemCount)__pyx_v_num_destination_endpoints), (&__pyx_v_entity));

    /* "coremusic/capi.pyx":6049
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceNewEntity"))
 * 
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":6050
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceNewEntity"))             # <<<<<<<<<<<<<<
 * 
 *         return entity
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceNewEntity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6050, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6050, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 6050, __pyx_L4_error)

      /* "coremusic/capi.pyx":6049
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceNewEntity"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6052
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceNewEntity"))
 * 
 *         return entity             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6052, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":6055
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        __pyx_t_2 = (__pyx_v_cf_name != 0);
        if (__pyx_t_2) {

          /* "coremusic/capi.pyx":6056
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_add_entity(long device, str name, bint embedded, int num_source_endpoints, int num_destination_endpoints):
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":6055
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_2 = (__pyx_v_cf_name != 0);
      if (__pyx_t_2) {

        /* "coremusic/capi.pyx":6056
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_add_entity(long device, str name, bint embedded, int num_source_endpoints, int num_destination_endpoints):
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":6055
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6017
 * # MIDI Setup (Device and Entity Management) Functions
 * 
 * def midi_device_new_entity(long device, str name, int protocol, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Create a new entity for a MIDI device (macOS 11.0+, iOS 14.0+).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.midi_device_new_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6058
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_add_entity(long device, str name, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add an entity to a MIDI device (deprecated, use midi_device_new_entity).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_693midi_device_add_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_692midi_device_add_entity, "midi_device_add_entity(long device, str name, bool embedded, int num_source_endpoints, int num_destination_endpoints)\n\nAdd an entity to a MIDI device (deprecated, use midi_device_new_entity).\n\nArgs:\n    device: The MIDIDeviceRef to add an entity to\n    name: Name of the new entity\n    embedded: True if entity is inside device, False if external connectors\n    num_source_endpoints: Number of source endpoints for the entity\n    num_destination_endpoints: Number of destination endpoints for the entity\n\nReturns:\n    The new MIDIEntityRef\n\nRaises:\n    RuntimeError: If entity creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_693midi_device_add_entity = {"midi_device_add_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_693midi_device_add_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_692midi_device_add_entity};
static PyObject *__pyx_pw_9coremusic_4capi_693midi_device_add_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  PyObject *__pyx_v_name = 0;
  int __pyx_v_embedded;
  int __pyx_v_num_source_endpoints;
  int __pyx_v_num_destination_endpoints;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_add_entity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_embedded,&__pyx_mstate_global->__pyx_n_u_num_source_endpoints,&__pyx_mstate_global->__pyx_n_u_num_destination_endpoints,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6058, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 6058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 6058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6058, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_add_entity", 0) < (0)) __PYX_ERR(0, 6058, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_add_entity", 1, 5, 5, i); __PYX_ERR(0, 6058, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6058, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6058, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6058, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 6058, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 6058, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6058, __pyx_L3_error)
    __pyx_v_name = ((PyObject*)values[1]);
    __pyx_v_embedded = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_embedded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6058, __pyx_L3_error)
    __pyx_v_num_source_endpoints = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_num_source_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6058, __pyx_L3_error)
    __pyx_v_num_destination_endpoints = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_num_destination_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6058, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_add_entity", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 6058, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_add_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 6058, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_692midi_device_add_entity(__pyx_self, __pyx_v_device, __pyx_v_name, __pyx_v_embedded, __pyx_v_num_source_endpoints, __pyx_v_num_destination_endpoints);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_692midi_device_add_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, PyObject *__pyx_v_name, int __pyx_v_embedded, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints) {
  MIDIEntityRef __pyx_v_entity;
  CFStringRef __pyx_v_cf_name;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CFStringRef __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_device_add_entity", 0);

  /* "coremusic/capi.pyx":6075
 *     """
 *     cdef cm.MIDIEntityRef entity
 *     cdef cf.CFStringRef cf_name = str_to_cfstring(name)             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status
*/
  __pyx_t_1 = __pyx_f_9coremusic_4capi_str_to_cfstring(__pyx_v_name); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 6075, __pyx_L1_error)
  __pyx_v_cf_name = __pyx_t_1;

  /* "coremusic/capi.pyx":6078
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDeviceAddEntity(
 *             <cm.MIDIDeviceRef>device,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6079
 *     cdef cf.OSStatus status
 *     try:
 *         status = cm.MIDIDeviceAddEntity(             # <<<<<<<<<<<<<<
 *             <cm.MIDIDeviceRef>device,
 *             cf_name,
*/
    __pyx_v_status = MIDIDeviceAddEntity(((MIDIDeviceRef)__pyx_v_device), __pyx_v_cf_name, ((Boolean)__pyx_v_embedded), ((ItemCount)__pyx_v_num_source_endpoints), ((ItemCount)__pyx_v_num_destination_endpoints), (&__pyx_v_entity));

    /* "coremusic/capi.pyx":6088
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceAddEntity"))
 * 
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":6089
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceAddEntity"))             # <<<<<<<<<<<<<<
 * 
 *         return entity
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceAddEntity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6089, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6089, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 6089, __pyx_L4_error)

      /* "coremusic/capi.pyx":6088
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceAddEntity"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6091
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceAddEntity"))
 * 
 *         return entity             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6091, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":6094
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        __pyx_t_2 = (__pyx_v_cf_name != 0);
        if (__pyx_t_2) {

          /* "coremusic/capi.pyx":6095
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_remove_entity(long device, long entity):
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":6094
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_2 = (__pyx_v_cf_name != 0);
      if (__pyx_t_2) {

        /* "coremusic/capi.pyx":6095
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_remove_entity(long device, long entity):
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":6094
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6058
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_add_entity(long device, str name, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add an entity to a MIDI device (deprecated, use midi_device_new_entity).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.midi_device_add_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6097
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_remove_entity(long device, long entity):             # <<<<<<<<<<<<<<
 *     """Remove an entity from a MIDI device.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_695midi_device_remove_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_694midi_device_remove_entity, "midi_device_remove_entity(long device, long entity)\n\nRemove an entity from a MIDI device.\n\nArgs:\n    device: The MIDIDeviceRef to remove entity from\n    entity: The MIDIEntityRef to remove\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If entity removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_695midi_device_remove_entity = {"midi_device_remove_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_695midi_device_remove_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_694midi_device_remove_entity};
static PyObject *__pyx_pw_9coremusic_4capi_695midi_device_remove_entity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  long __pyx_v_entity;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_remove_entity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,&__pyx_mstate_global->__pyx_n_u_entity,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6097, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6097, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6097, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_remove_entity", 0) < (0)) __PYX_ERR(0, 6097, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_remove_entity", 1, 2, 2, i); __PYX_ERR(0, 6097, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6097, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6097, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6097, __pyx_L3_error)
    __pyx_v_entity = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6097, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_remove_entity", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 6097, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_remove_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_694midi_device_remove_entity(__pyx_self, __pyx_v_device, __pyx_v_entity);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_694midi_device_remove_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, long __pyx_v_entity) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_remove_entity", 0);

  /* "coremusic/capi.pyx":6110
 *         RuntimeError: If entity removal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIDeviceRemoveEntity(             # <<<<<<<<<<<<<<
 *         <cm.MIDIDeviceRef>device,
 *         <cm.MIDIEntityRef>entity
*/
  __pyx_v_status = MIDIDeviceRemoveEntity(((MIDIDeviceRef)__pyx_v_device), ((MIDIEntityRef)__pyx_v_entity));

  /* "coremusic/capi.pyx":6115
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceRemoveEntity"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6116
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceRemoveEntity"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceRemoveEntity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6116, __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_ERR(0, 6116, __pyx_L1_error)

    /* "coremusic/capi.pyx":6115
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceRemoveEntity"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6118
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceRemoveEntity"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_entity_add_or_remove_endpoints(long entity, int num_source_endpoints, int num_destination_endpoints):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6097
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_remove_entity(long device, long entity):             # <<<<<<<<<<<<<<
 *     """Remove an entity from a MIDI device.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_device_remove_entity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6120
 *     return status
 * 
 * def midi_entity_add_or_remove_endpoints(long entity, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add or remove endpoints from a MIDI entity.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_697midi_entity_add_or_remove_endpoints(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_696midi_entity_add_or_remove_endpoints, "midi_entity_add_or_remove_endpoints(long entity, int num_source_endpoints, int num_destination_endpoints)\n\nAdd or remove endpoints from a MIDI entity.\n\nArgs:\n    entity: The MIDIEntityRef to modify\n    num_source_endpoints: Desired number of source endpoints\n    num_destination_endpoints: Desired number of destination endpoints\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If endpoint modification fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_697midi_entity_add_or_remove_endpoints = {"midi_entity_add_or_remove_endpoints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_697midi_entity_add_or_remove_endpoints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_696midi_entity_add_or_remove_endpoints};
static PyObject *__pyx_pw_9coremusic_4capi_697midi_entity_add_or_remove_endpoints(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_entity;
  int __pyx_v_num_source_endpoints;
  int __pyx_v_num_destination_endpoints;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_entity_add_or_remove_endpoints (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_entity,&__pyx_mstate_global->__pyx_n_u_num_source_endpoints,&__pyx_mstate_global->__pyx_n_u_num_destination_endpoints,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6120, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6120, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_entity_add_or_remove_endpoints", 0) < (0)) __PYX_ERR(0, 6120, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_entity_add_or_remove_endpoints", 1, 3, 3, i); __PYX_ERR(0, 6120, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6120, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6120, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6120, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6120, __pyx_L3_error)
    __pyx_v_num_source_endpoints = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_source_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6120, __pyx_L3_error)
    __pyx_v_num_destination_endpoints = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_num_destination_endpoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6120, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_entity_add_or_remove_endpoints", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 6120, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_entity_add_or_remove_endpoints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_696midi_entity_add_or_remove_endpoints(__pyx_self, __pyx_v_entity, __pyx_v_num_source_endpoints, __pyx_v_num_destination_endpoints);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_696midi_entity_add_or_remove_endpoints(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_num_source_endpoints, int __pyx_v_num_destination_endpoints) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_add_or_remove_endpoints", 0);

  /* "coremusic/capi.pyx":6134
 *         RuntimeError: If endpoint modification fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEntityAddOrRemoveEndpoints(             # <<<<<<<<<<<<<<
 *         <cm.MIDIEntityRef>entity,
 *         <cm.ItemCount>num_source_endpoints,
*/
  __pyx_v_status = MIDIEntityAddOrRemoveEndpoints(((MIDIEntityRef)__pyx_v_entity), ((ItemCount)__pyx_v_num_source_endpoints), ((ItemCount)__pyx_v_num_destination_endpoints));

  /* "coremusic/capi.pyx":6140
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEntityAddOrRemoveEndpoints"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6141
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEntityAddOrRemoveEndpoints"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIEntityAddOrRemoveEndpoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6141, __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_ERR(0, 6141, __pyx_L1_error)

    /* "coremusic/capi.pyx":6140
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEntityAddOrRemoveEndpoints"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6143
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEntityAddOrRemoveEndpoints"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_setup_add_device(long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6120
 *     return status
 * 
 * def midi_entity_add_or_remove_endpoints(long entity, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add or remove endpoints from a MIDI entity.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_entity_add_or_remove_endpoints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6145
 *     return status
 * 
 * def midi_setup_add_device(long device):             # <<<<<<<<<<<<<<
 *     """Add a driver-owned MIDI device to the current setup.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_699midi_setup_add_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_698midi_setup_add_device, "midi_setup_add_device(long device)\n\nAdd a driver-owned MIDI device to the current setup.\n\nArgs:\n    device: The MIDIDeviceRef to add\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If device addition fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_699midi_setup_add_device = {"midi_setup_add_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_699midi_setup_add_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_698midi_setup_add_device};
static PyObject *__pyx_pw_9coremusic_4capi_699midi_setup_add_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_setup_add_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6145, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6145, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_setup_add_device", 0) < (0)) __PYX_ERR(0, 6145, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_setup_add_device", 1, 1, 1, i); __PYX_ERR(0, 6145, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6145, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6145, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_setup_add_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6145, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_setup_add_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_698midi_setup_add_device(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_698midi_setup_add_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_setup_add_device", 0);

  /* "coremusic/capi.pyx":6157
 *         RuntimeError: If device addition fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDISetupAddDevice(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDISetupAddDevice(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6159
 *     cdef cf.OSStatus status = cm.MIDISetupAddDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddDevice"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6160
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddDevice"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISetupAddDevice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6160, __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_ERR(0, 6160, __pyx_L1_error)

    /* "coremusic/capi.pyx":6159
 *     cdef cf.OSStatus status = cm.MIDISetupAddDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddDevice"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6162
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddDevice"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_setup_remove_device(long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6145
 *     return status
 * 
 * def midi_setup_add_device(long device):             # <<<<<<<<<<<<<<
 *     """Add a driver-owned MIDI device to the current setup.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_setup_add_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6164
 *     return status
 * 
 * def midi_setup_remove_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove a driver-owned MIDI device from the current setup.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_701midi_setup_remove_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_700midi_setup_remove_device, "midi_setup_remove_device(long device)\n\nRemove a driver-owned MIDI device from the current setup.\n\nArgs:\n    device: The MIDIDeviceRef to remove\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If device removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_701midi_setup_remove_device = {"midi_setup_remove_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_701midi_setup_remove_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_700midi_setup_remove_device};
static PyObject *__pyx_pw_9coremusic_4capi_701midi_setup_remove_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_setup_remove_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6164, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6164, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_setup_remove_device", 0) < (0)) __PYX_ERR(0, 6164, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_setup_remove_device", 1, 1, 1, i); __PYX_ERR(0, 6164, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6164, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6164, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_setup_remove_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6164, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_setup_remove_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_700midi_setup_remove_device(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_700midi_setup_remove_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_setup_remove_device", 0);

  /* "coremusic/capi.pyx":6176
 *         RuntimeError: If device removal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveDevice(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDISetupRemoveDevice(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6178
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveDevice"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6179
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveDevice"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISetupRemoveDevice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6179, __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_ERR(0, 6179, __pyx_L1_error)

    /* "coremusic/capi.pyx":6178
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveDevice"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6181
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveDevice"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_setup_add_external_device(long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6164
 *     return status
 * 
 * def midi_setup_remove_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove a driver-owned MIDI device from the current setup.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_setup_remove_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6183
 *     return status
 * 
 * def midi_setup_add_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Add an external MIDI device to the current setup.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_703midi_setup_add_external_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_702midi_setup_add_external_device, "midi_setup_add_external_device(long device)\n\nAdd an external MIDI device to the current setup.\n\nArgs:\n    device: The MIDIDeviceRef to add\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If external device addition fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_703midi_setup_add_external_device = {"midi_setup_add_external_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_703midi_setup_add_external_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_702midi_setup_add_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_703midi_setup_add_external_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_setup_add_external_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6183, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6183, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_setup_add_external_device", 0) < (0)) __PYX_ERR(0, 6183, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_setup_add_external_device", 1, 1, 1, i); __PYX_ERR(0, 6183, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6183, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6183, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_setup_add_external_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6183, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_setup_add_external_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_702midi_setup_add_external_device(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_702midi_setup_add_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_setup_add_external_device", 0);

  /* "coremusic/capi.pyx":6195
 *         RuntimeError: If external device addition fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDISetupAddExternalDevice(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDISetupAddExternalDevice(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6197
 *     cdef cf.OSStatus status = cm.MIDISetupAddExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddExternalDevice"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6198
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddExternalDevice"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISetupAddExternalDevice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6198, __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_ERR(0, 6198, __pyx_L1_error)

    /* "coremusic/capi.pyx":6197
 *     cdef cf.OSStatus status = cm.MIDISetupAddExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddExternalDevice"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6200
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupAddExternalDevice"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_setup_remove_external_device(long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6183
 *     return status
 * 
 * def midi_setup_add_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Add an external MIDI device to the current setup.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_setup_add_external_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6202
 *     return status
 * 
 * def midi_setup_remove_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove an external MIDI device from the current setup.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_705midi_setup_remove_external_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_704midi_setup_remove_external_device, "midi_setup_remove_external_device(long device)\n\nRemove an external MIDI device from the current setup.\n\nArgs:\n    device: The MIDIDeviceRef to remove\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If external device removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_705midi_setup_remove_external_device = {"midi_setup_remove_external_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_705midi_setup_remove_external_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_704midi_setup_remove_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_705midi_setup_remove_external_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_setup_remove_external_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6202, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6202, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_setup_remove_external_device", 0) < (0)) __PYX_ERR(0, 6202, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_setup_remove_external_device", 1, 1, 1, i); __PYX_ERR(0, 6202, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6202, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6202, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_setup_remove_external_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6202, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_setup_remove_external_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_704midi_setup_remove_external_device(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_704midi_setup_remove_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_setup_remove_external_device", 0);

  /* "coremusic/capi.pyx":6214
 *         RuntimeError: If external device removal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveExternalDevice(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDISetupRemoveExternalDevice(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6216
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveExternalDevice"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6217
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveExternalDevice"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDISetupRemoveExternalDevice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6217, __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_ERR(0, 6217, __pyx_L1_error)

    /* "coremusic/capi.pyx":6216
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveExternalDevice"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6219
 *         raise RuntimeError(format_osstatus_error(status, "MIDISetupRemoveExternalDevice"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_external_device_create(str name, str manufacturer, str model):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6202
 *     return status
 * 
 * def midi_setup_remove_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove an external MIDI device from the current setup.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_setup_remove_external_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6221
 *     return status
 * 
 * def midi_external_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new external MIDI device.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_707midi_external_device_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_706midi_external_device_create, "midi_external_device_create(str name, str manufacturer, str model)\n\nCreate a new external MIDI device.\n\nArgs:\n    name: Name of the device\n    manufacturer: Manufacturer name\n    model: Model name\n\nReturns:\n    The new MIDIDeviceRef\n\nRaises:\n    RuntimeError: If device creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_707midi_external_device_create = {"midi_external_device_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_707midi_external_device_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_706midi_external_device_create};
static PyObject *__pyx_pw_9coremusic_4capi_707midi_external_device_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_manufacturer = 0;
  PyObject *__pyx_v_model = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_external_device_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_manufacturer,&__pyx_mstate_global->__pyx_n_u_model,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6221, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6221, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_external_device_create", 0) < (0)) __PYX_ERR(0, 6221, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_external_device_create", 1, 3, 3, i); __PYX_ERR(0, 6221, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6221, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6221, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6221, __pyx_L3_error)
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_manufacturer = ((PyObject*)values[1]);
    __pyx_v_model = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_external_device_create", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 6221, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_external_device_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 6221, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manufacturer), (&PyUnicode_Type), 1, "manufacturer", 1))) __PYX_ERR(0, 6221, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model), (&PyUnicode_Type), 1, "model", 1))) __PYX_ERR(0, 6221, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_706midi_external_device_create(__pyx_self, __pyx_v_name, __pyx_v_manufacturer, __pyx_v_model);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_706midi_external_device_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_manufacturer, PyObject *__pyx_v_model) {
  MIDIDeviceRef __pyx_v_device;
  CFStringRef __pyx_v_cf_name;
  CFStringRef __pyx_v_cf_manufacturer;
  CFStringRef __pyx_v_cf_model;
  PyObject *__pyx_v_name_bytes = 0;
  PyObject *__pyx_v_manufacturer_bytes = 0;
  PyObject *__pyx_v_model_bytes = 0;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_external_device_create", 0);

  /* "coremusic/capi.pyx":6237
 *     cdef cm.MIDIDeviceRef device
 *     cdef cf.CFStringRef cf_name, cf_manufacturer, cf_model
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')
 *     cdef bytes model_bytes = model.encode('utf-8')
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6237, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6238
 *     cdef cf.CFStringRef cf_name, cf_manufacturer, cf_model
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef bytes model_bytes = model.encode('utf-8')
 * 
*/
  if (unlikely(__pyx_v_manufacturer == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6238, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_manufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_manufacturer_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6239
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')
 *     cdef bytes model_bytes = model.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     cf_name = cf.CFStringCreateWithCString(
*/
  if (unlikely(__pyx_v_model == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6239, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6242
 * 
 *     cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6242, __pyx_L1_error)

  /* "coremusic/capi.pyx":6241
 *     cdef bytes model_bytes = model.encode('utf-8')
 * 
 *     cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6245
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 *     cf_model = cf.CFStringCreateWithCString(
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_manufacturer_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6245, __pyx_L1_error)

  /* "coremusic/capi.pyx":6244
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_manufacturer = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6248
 *     )
 *     cf_model = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, model_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_model_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6248, __pyx_L1_error)

  /* "coremusic/capi.pyx":6247
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8
 *     )
 *     cf_model = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, model_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_model = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6252
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIExternalDeviceCreate(
 *             cf_name, cf_manufacturer, cf_model, &device
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6253
 *     cdef cf.OSStatus status
 *     try:
 *         status = cm.MIDIExternalDeviceCreate(             # <<<<<<<<<<<<<<
 *             cf_name, cf_manufacturer, cf_model, &device
 *         )
*/
    __pyx_v_status = MIDIExternalDeviceCreate(__pyx_v_cf_name, __pyx_v_cf_manufacturer, __pyx_v_cf_model, (&__pyx_v_device));

    /* "coremusic/capi.pyx":6257
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIExternalDeviceCreate"))
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":6258
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIExternalDeviceCreate"))             # <<<<<<<<<<<<<<
 * 
 *         return device
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIExternalDeviceCreate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6258, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6258, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 6258, __pyx_L4_error)

      /* "coremusic/capi.pyx":6257
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIExternalDeviceCreate"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6260
 *             raise RuntimeError(format_osstatus_error(status, "MIDIExternalDeviceCreate"))
 * 
 *         return device             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_device); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6260, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":6263
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6264
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":6263
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
        }

        /* "coremusic/capi.pyx":6265
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        __pyx_t_3 = (__pyx_v_cf_manufacturer != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6266
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)             # <<<<<<<<<<<<<<
 *         if cf_model:
 *             cf.CFRelease(cf_model)
*/
          CFRelease(__pyx_v_cf_manufacturer);

          /* "coremusic/capi.pyx":6265
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        }

        /* "coremusic/capi.pyx":6267
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        __pyx_t_3 = (__pyx_v_cf_model != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6268
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * 
*/
          CFRelease(__pyx_v_cf_model);

          /* "coremusic/capi.pyx":6267
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":6263
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      __pyx_t_3 = (__pyx_v_cf_name != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6264
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":6263
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      }

      /* "coremusic/capi.pyx":6265
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      __pyx_t_3 = (__pyx_v_cf_manufacturer != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6266
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)             # <<<<<<<<<<<<<<
 *         if cf_model:
 *             cf.CFRelease(cf_model)
*/
        CFRelease(__pyx_v_cf_manufacturer);

        /* "coremusic/capi.pyx":6265
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      }

      /* "coremusic/capi.pyx":6267
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      __pyx_t_3 = (__pyx_v_cf_model != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6268
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        CFRelease(__pyx_v_cf_model);

        /* "coremusic/capi.pyx":6267
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6221
 *     return status
 * 
 * def midi_external_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new external MIDI device.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.midi_external_device_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_bytes);
  __Pyx_XDECREF(__pyx_v_manufacturer_bytes);
  __Pyx_XDECREF(__pyx_v_model_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6273
 * # MIDI Driver Functions
 * 
 * def midi_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new MIDI device (available to non-drivers).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_709midi_device_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_708midi_device_create, "midi_device_create(str name, str manufacturer, str model)\n\nCreate a new MIDI device (available to non-drivers).\n\nArgs:\n    name: Name of the device\n    manufacturer: Manufacturer name\n    model: Model name\n\nReturns:\n    The new MIDIDeviceRef\n\nRaises:\n    RuntimeError: If device creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_709midi_device_create = {"midi_device_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_709midi_device_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_708midi_device_create};
static PyObject *__pyx_pw_9coremusic_4capi_709midi_device_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_manufacturer = 0;
  PyObject *__pyx_v_model = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_manufacturer,&__pyx_mstate_global->__pyx_n_u_model,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_create", 0) < (0)) __PYX_ERR(0, 6273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_create", 1, 3, 3, i); __PYX_ERR(0, 6273, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6273, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6273, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6273, __pyx_L3_error)
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_manufacturer = ((PyObject*)values[1]);
    __pyx_v_model = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_create", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 6273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 6273, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manufacturer), (&PyUnicode_Type), 1, "manufacturer", 1))) __PYX_ERR(0, 6273, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model), (&PyUnicode_Type), 1, "model", 1))) __PYX_ERR(0, 6273, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_708midi_device_create(__pyx_self, __pyx_v_name, __pyx_v_manufacturer, __pyx_v_model);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_708midi_device_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_manufacturer, PyObject *__pyx_v_model) {
  MIDIDeviceRef __pyx_v_device;
  CFStringRef __pyx_v_cf_name;
  CFStringRef __pyx_v_cf_manufacturer;
  CFStringRef __pyx_v_cf_model;
  PyObject *__pyx_v_name_bytes = 0;
  PyObject *__pyx_v_manufacturer_bytes = 0;
  PyObject *__pyx_v_model_bytes = 0;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("midi_device_create", 0);

  /* "coremusic/capi.pyx":6289
 *     cdef cm.MIDIDeviceRef device
 *     cdef cf.CFStringRef cf_name, cf_manufacturer, cf_model
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')
 *     cdef bytes model_bytes = model.encode('utf-8')
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6289, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6290
 *     cdef cf.CFStringRef cf_name, cf_manufacturer, cf_model
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef bytes model_bytes = model.encode('utf-8')
 * 
*/
  if (unlikely(__pyx_v_manufacturer == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6290, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_manufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_manufacturer_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6291
 *     cdef bytes name_bytes = name.encode('utf-8')
 *     cdef bytes manufacturer_bytes = manufacturer.encode('utf-8')
 *     cdef bytes model_bytes = model.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     cf_name = cf.CFStringCreateWithCString(
*/
  if (unlikely(__pyx_v_model == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6291, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6294
 * 
 *     cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6294, __pyx_L1_error)

  /* "coremusic/capi.pyx":6293
 *     cdef bytes model_bytes = model.encode('utf-8')
 * 
 *     cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6297
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 *     cf_model = cf.CFStringCreateWithCString(
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_manufacturer_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6297, __pyx_L1_error)

  /* "coremusic/capi.pyx":6296
 *         cf.kCFAllocatorDefault, name_bytes, cf.kCFStringEncodingUTF8
 *     )
 *     cf_manufacturer = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_manufacturer = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6300
 *     )
 *     cf_model = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, model_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_model_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6300, __pyx_L1_error)

  /* "coremusic/capi.pyx":6299
 *         cf.kCFAllocatorDefault, manufacturer_bytes, cf.kCFStringEncodingUTF8
 *     )
 *     cf_model = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, model_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_model = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6304
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         # NULL owner indicates non-driver creation
 *         status = cm.MIDIDeviceCreate(
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6306
 *     try:
 *         # NULL owner indicates non-driver creation
 *         status = cm.MIDIDeviceCreate(             # <<<<<<<<<<<<<<
 *             <cm.MIDIDriverRef>NULL,
 *             cf_name, cf_manufacturer, cf_model, &device
*/
    __pyx_v_status = MIDIDeviceCreate(((MIDIDriverRef)NULL), __pyx_v_cf_name, __pyx_v_cf_manufacturer, __pyx_v_cf_model, (&__pyx_v_device));

    /* "coremusic/capi.pyx":6311
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceCreate"))
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":6312
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceCreate"))             # <<<<<<<<<<<<<<
 * 
 *         return device
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceCreate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6312, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6312, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 6312, __pyx_L4_error)

      /* "coremusic/capi.pyx":6311
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceCreate"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6314
 *             raise RuntimeError(format_osstatus_error(status, "MIDIDeviceCreate"))
 * 
 *         return device             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_device); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6314, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":6317
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ( unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6318
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":6317
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
        }

        /* "coremusic/capi.pyx":6319
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        __pyx_t_3 = (__pyx_v_cf_manufacturer != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6320
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)             # <<<<<<<<<<<<<<
 *         if cf_model:
 *             cf.CFRelease(cf_model)
*/
          CFRelease(__pyx_v_cf_manufacturer);

          /* "coremusic/capi.pyx":6319
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        }

        /* "coremusic/capi.pyx":6321
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        __pyx_t_3 = (__pyx_v_cf_model != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6322
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_dispose(long device):
*/
          CFRelease(__pyx_v_cf_model);

          /* "coremusic/capi.pyx":6321
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":6317
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      __pyx_t_3 = (__pyx_v_cf_name != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6318
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":6317
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      }

      /* "coremusic/capi.pyx":6319
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      __pyx_t_3 = (__pyx_v_cf_manufacturer != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6320
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)             # <<<<<<<<<<<<<<
 *         if cf_model:
 *             cf.CFRelease(cf_model)
*/
        CFRelease(__pyx_v_cf_manufacturer);

        /* "coremusic/capi.pyx":6319
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      }

      /* "coremusic/capi.pyx":6321
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      __pyx_t_3 = (__pyx_v_cf_model != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6322
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_dispose(long device):
*/
        CFRelease(__pyx_v_cf_model);

        /* "coremusic/capi.pyx":6321
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      }
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6273
 * # MIDI Driver Functions
 * 
 * def midi_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new MIDI device (available to non-drivers).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.midi_device_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_bytes);
  __Pyx_XDECREF(__pyx_v_manufacturer_bytes);
  __Pyx_XDECREF(__pyx_v_model_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6324
 *             cf.CFRelease(cf_model)
 * 
 * def midi_device_dispose(long device):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI device that hasn't been added to the system.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_711midi_device_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_710midi_device_dispose, "midi_device_dispose(long device)\n\nDispose a MIDI device that hasn't been added to the system.\n\nArgs:\n    device: The MIDIDeviceRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If device disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_711midi_device_dispose = {"midi_device_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_711midi_device_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_710midi_device_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_711midi_device_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6324, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6324, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_dispose", 0) < (0)) __PYX_ERR(0, 6324, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_dispose", 1, 1, 1, i); __PYX_ERR(0, 6324, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6324, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6324, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6324, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_710midi_device_dispose(__pyx_self, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_710midi_device_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_dispose", 0);

  /* "coremusic/capi.pyx":6336
 *         RuntimeError: If device disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIDeviceDispose(<cm.MIDIDeviceRef>device)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDIDeviceDispose(((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6338
 *     cdef cf.OSStatus status = cm.MIDIDeviceDispose(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6339
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceDispose"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6339, __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_ERR(0, 6339, __pyx_L1_error)

    /* "coremusic/capi.pyx":6338
 *     cdef cf.OSStatus status = cm.MIDIDeviceDispose(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6341
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceDispose"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_device_list_get_number_of_devices(long dev_list):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6324
 *             cf.CFRelease(cf_model)
 * 
 * def midi_device_dispose(long device):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI device that hasn't been added to the system.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_device_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6343
 *     return status
 * 
 * def midi_device_list_get_number_of_devices(long dev_list):             # <<<<<<<<<<<<<<
 *     """Get the number of devices in a device list.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_713midi_device_list_get_number_of_devices(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_712midi_device_list_get_number_of_devices, "midi_device_list_get_number_of_devices(long dev_list)\n\nGet the number of devices in a device list.\n\nArgs:\n    dev_list: The MIDIDeviceListRef\n\nReturns:\n    Number of devices in the list");
static PyMethodDef __pyx_mdef_9coremusic_4capi_713midi_device_list_get_number_of_devices = {"midi_device_list_get_number_of_devices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_713midi_device_list_get_number_of_devices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_712midi_device_list_get_number_of_devices};
static PyObject *__pyx_pw_9coremusic_4capi_713midi_device_list_get_number_of_devices(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_dev_list;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_list_get_number_of_devices (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dev_list,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6343, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6343, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_list_get_number_of_devices", 0) < (0)) __PYX_ERR(0, 6343, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_list_get_number_of_devices", 1, 1, 1, i); __PYX_ERR(0, 6343, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6343, __pyx_L3_error)
    }
    __pyx_v_dev_list = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_dev_list == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6343, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_list_get_number_of_devices", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6343, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_get_number_of_devices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_712midi_device_list_get_number_of_devices(__pyx_self, __pyx_v_dev_list);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_712midi_device_list_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list) {
  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("midi_device_list_get_number_of_devices", 0);

  /* "coremusic/capi.pyx":6352
 *         Number of devices in the list
 *     """
 *     return cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)             # <<<<<<<<<<<<<<
 * 
 * def midi_device_list_get_device(long dev_list, int index):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(MIDIDeviceListGetNumberOfDevices(((MIDIDeviceListRef)__pyx_v_dev_list))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6343
 *     return status
 * 
 * def midi_device_list_get_number_of_devices(long dev_list):             # <<<<<<<<<<<<<<
 *     """Get the number of devices in a device list.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_get_number_of_devices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6354
 *     return cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)
 * 
 * def midi_device_list_get_device(long dev_list, int index):             # <<<<<<<<<<<<<<
 *     """Get a device from a device list.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_715midi_device_list_get_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_714midi_device_list_get_device, "midi_device_list_get_device(long dev_list, int index)\n\nGet a device from a device list.\n\nArgs:\n    dev_list: The MIDIDeviceListRef\n    index: Index of the device to retrieve (0-based)\n\nReturns:\n    The MIDIDeviceRef at the specified index\n\nRaises:\n    IndexError: If index is out of bounds");
static PyMethodDef __pyx_mdef_9coremusic_4capi_715midi_device_list_get_device = {"midi_device_list_get_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_715midi_device_list_get_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_714midi_device_list_get_device};
static PyObject *__pyx_pw_9coremusic_4capi_715midi_device_list_get_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_dev_list;
  int __pyx_v_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_list_get_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dev_list,&__pyx_mstate_global->__pyx_n_u_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6354, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_list_get_device", 0) < (0)) __PYX_ERR(0, 6354, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_list_get_device", 1, 2, 2, i); __PYX_ERR(0, 6354, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6354, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6354, __pyx_L3_error)
    }
    __pyx_v_dev_list = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_dev_list == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6354, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6354, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_list_get_device", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 6354, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_get_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_714midi_device_list_get_device(__pyx_self, __pyx_v_dev_list, __pyx_v_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_714midi_device_list_get_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list, int __pyx_v_index) {
  ItemCount __pyx_v_num_devices;
  MIDIDeviceRef __pyx_v_device;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_list_get_device", 0);

  /* "coremusic/capi.pyx":6367
 *         IndexError: If index is out of bounds
 *     """
 *     cdef cm.ItemCount num_devices = cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)             # <<<<<<<<<<<<<<
 * 
 *     if index < 0 or index >= num_devices:
*/
  __pyx_v_num_devices = MIDIDeviceListGetNumberOfDevices(((MIDIDeviceListRef)__pyx_v_dev_list));

  /* "coremusic/capi.pyx":6369
 *     cdef cm.ItemCount num_devices = cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if index < 0 or index >= num_devices:             # <<<<<<<<<<<<<<
 *         raise IndexError(f"Device index {index} out of bounds (0-{num_devices-1})")
 * 
*/
  __pyx_t_2 = (__pyx_v_index < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_index >= __pyx_v_num_devices);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6370
 * 
 *     if index < 0 or index >= num_devices:
 *         raise IndexError(f"Device index {index} out of bounds (0-{num_devices-1})")             # <<<<<<<<<<<<<<
 * 
 *     cdef cm.MIDIDeviceRef device = cm.MIDIDeviceListGetDevice(
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_long((__pyx_v_num_devices - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Device_index;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_out_of_bounds_0;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127);
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 6370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6370, __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_ERR(0, 6370, __pyx_L1_error)

    /* "coremusic/capi.pyx":6369
 *     cdef cm.ItemCount num_devices = cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if index < 0 or index >= num_devices:             # <<<<<<<<<<<<<<
 *         raise IndexError(f"Device index {index} out of bounds (0-{num_devices-1})")
 * 
*/
  }

  /* "coremusic/capi.pyx":6372
 *         raise IndexError(f"Device index {index} out of bounds (0-{num_devices-1})")
 * 
 *     cdef cm.MIDIDeviceRef device = cm.MIDIDeviceListGetDevice(             # <<<<<<<<<<<<<<
 *         <cm.MIDIDeviceListRef>dev_list, <cm.ItemCount>index
 *     )
*/
  __pyx_v_device = MIDIDeviceListGetDevice(((MIDIDeviceListRef)__pyx_v_dev_list), ((ItemCount)__pyx_v_index));

  /* "coremusic/capi.pyx":6376
 *     )
 * 
 *     if device == 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Failed to get device at index {index}")
 * 
*/
  __pyx_t_1 = (__pyx_v_device == 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6377
 * 
 *     if device == 0:
 *         raise RuntimeError(f"Failed to get device at index {index}")             # <<<<<<<<<<<<<<
 * 
 *     return device
*/
    __pyx_t_8 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_get_device_at_index, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6377, __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_ERR(0, 6377, __pyx_L1_error)

    /* "coremusic/capi.pyx":6376
 *     )
 * 
 *     if device == 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Failed to get device at index {index}")
 * 
*/
  }

  /* "coremusic/capi.pyx":6379
 *         raise RuntimeError(f"Failed to get device at index {index}")
 * 
 *     return device             # <<<<<<<<<<<<<<
 * 
 * def midi_device_list_add_device(long dev_list, long device):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_UInt32(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6354
 *     return cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)
 * 
 * def midi_device_list_get_device(long dev_list, int index):             # <<<<<<<<<<<<<<
 *     """Get a device from a device list.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_get_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6381
 *     return device
 * 
 * def midi_device_list_add_device(long dev_list, long device):             # <<<<<<<<<<<<<<
 *     """Add a device to a device list.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_717midi_device_list_add_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_716midi_device_list_add_device, "midi_device_list_add_device(long dev_list, long device)\n\nAdd a device to a device list.\n\nArgs:\n    dev_list: The MIDIDeviceListRef\n    device: The MIDIDeviceRef to add\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If adding device fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_717midi_device_list_add_device = {"midi_device_list_add_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_717midi_device_list_add_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_716midi_device_list_add_device};
static PyObject *__pyx_pw_9coremusic_4capi_717midi_device_list_add_device(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_dev_list;
  long __pyx_v_device;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_list_add_device (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dev_list,&__pyx_mstate_global->__pyx_n_u_device,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6381, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_list_add_device", 0) < (0)) __PYX_ERR(0, 6381, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_list_add_device", 1, 2, 2, i); __PYX_ERR(0, 6381, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6381, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6381, __pyx_L3_error)
    }
    __pyx_v_dev_list = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_dev_list == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6381, __pyx_L3_error)
    __pyx_v_device = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6381, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_list_add_device", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 6381, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_add_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_716midi_device_list_add_device(__pyx_self, __pyx_v_dev_list, __pyx_v_device);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_716midi_device_list_add_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list, long __pyx_v_device) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_list_add_device", 0);

  /* "coremusic/capi.pyx":6394
 *         RuntimeError: If adding device fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIDeviceListAddDevice(             # <<<<<<<<<<<<<<
 *         <cm.MIDIDeviceListRef>dev_list, <cm.MIDIDeviceRef>device
 *     )
*/
  __pyx_v_status = MIDIDeviceListAddDevice(((MIDIDeviceListRef)__pyx_v_dev_list), ((MIDIDeviceRef)__pyx_v_device));

  /* "coremusic/capi.pyx":6398
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListAddDevice"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6399
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListAddDevice"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceListAddDevice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6399, __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_ERR(0, 6399, __pyx_L1_error)

    /* "coremusic/capi.pyx":6398
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListAddDevice"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6401
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListAddDevice"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_device_list_dispose(long dev_list):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6381
 *     return device
 * 
 * def midi_device_list_add_device(long dev_list, long device):             # <<<<<<<<<<<<<<
 *     """Add a device to a device list.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_add_device", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6403
 *     return status
 * 
 * def midi_device_list_dispose(long dev_list):             # <<<<<<<<<<<<<<
 *     """Dispose a device list (but not the contained devices).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_719midi_device_list_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_718midi_device_list_dispose, "midi_device_list_dispose(long dev_list)\n\nDispose a device list (but not the contained devices).\n\nArgs:\n    dev_list: The MIDIDeviceListRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_719midi_device_list_dispose = {"midi_device_list_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_719midi_device_list_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_718midi_device_list_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_719midi_device_list_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_dev_list;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_device_list_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dev_list,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6403, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6403, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_device_list_dispose", 0) < (0)) __PYX_ERR(0, 6403, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_device_list_dispose", 1, 1, 1, i); __PYX_ERR(0, 6403, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6403, __pyx_L3_error)
    }
    __pyx_v_dev_list = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_dev_list == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6403, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_list_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6403, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_718midi_device_list_dispose(__pyx_self, __pyx_v_dev_list);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_718midi_device_list_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_list_dispose", 0);

  /* "coremusic/capi.pyx":6415
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIDeviceListDispose(<cm.MIDIDeviceListRef>dev_list)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDIDeviceListDispose(((MIDIDeviceListRef)__pyx_v_dev_list));

  /* "coremusic/capi.pyx":6417
 *     cdef cf.OSStatus status = cm.MIDIDeviceListDispose(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6418
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListDispose"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDeviceListDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6418, __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_ERR(0, 6418, __pyx_L1_error)

    /* "coremusic/capi.pyx":6417
 *     cdef cf.OSStatus status = cm.MIDIDeviceListDispose(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6420
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDeviceListDispose"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_endpoint_set_ref_cons(long endpoint, long ref1=0, long ref2=0):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6403
 *     return status
 * 
 * def midi_device_list_dispose(long dev_list):             # <<<<<<<<<<<<<<
 *     """Dispose a device list (but not the contained devices).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_device_list_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6422
 *     return status
 * 
 * def midi_endpoint_set_ref_cons(long endpoint, long ref1=0, long ref2=0):             # <<<<<<<<<<<<<<
 *     """Set reference constants for a MIDI endpoint.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_721midi_endpoint_set_ref_cons(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_720midi_endpoint_set_ref_cons, "midi_endpoint_set_ref_cons(long endpoint, long ref1=0, long ref2=0)\n\nSet reference constants for a MIDI endpoint.\n\nArgs:\n    endpoint: The MIDIEndpointRef\n    ref1: First reference constant (optional)\n    ref2: Second reference constant (optional)\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting refCons fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_721midi_endpoint_set_ref_cons = {"midi_endpoint_set_ref_cons", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_721midi_endpoint_set_ref_cons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_720midi_endpoint_set_ref_cons};
static PyObject *__pyx_pw_9coremusic_4capi_721midi_endpoint_set_ref_cons(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_endpoint;
  long __pyx_v_ref1;
  long __pyx_v_ref2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_endpoint_set_ref_cons (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_endpoint,&__pyx_mstate_global->__pyx_n_u_ref1,&__pyx_mstate_global->__pyx_n_u_ref2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6422, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6422, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6422, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6422, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_endpoint_set_ref_cons", 0) < (0)) __PYX_ERR(0, 6422, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_endpoint_set_ref_cons", 0, 1, 3, i); __PYX_ERR(0, 6422, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 6422, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6422, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6422, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6422, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_ref1 = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_ref1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6422, __pyx_L3_error)
    } else {
      __pyx_v_ref1 = ((long)((long)0));
    }
    if (values[2]) {
      __pyx_v_ref2 = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_ref2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6422, __pyx_L3_error)
    } else {
      __pyx_v_ref2 = ((long)((long)0));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_endpoint_set_ref_cons", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 6422, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_set_ref_cons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_720midi_endpoint_set_ref_cons(__pyx_self, __pyx_v_endpoint, __pyx_v_ref1, __pyx_v_ref2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_720midi_endpoint_set_ref_cons(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint, long __pyx_v_ref1, long __pyx_v_ref2) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_endpoint_set_ref_cons", 0);

  /* "coremusic/capi.pyx":6436
 *         RuntimeError: If setting refCons fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointSetRefCons(             # <<<<<<<<<<<<<<
 *         <cm.MIDIEndpointRef>endpoint,
 *         <void*>ref1,
*/
  __pyx_v_status = MIDIEndpointSetRefCons(((MIDIEndpointRef)__pyx_v_endpoint), ((void *)__pyx_v_ref1), ((void *)__pyx_v_ref2));

  /* "coremusic/capi.pyx":6442
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointSetRefCons"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6443
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointSetRefCons"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIEndpointSetRefCons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6443, __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_ERR(0, 6443, __pyx_L1_error)

    /* "coremusic/capi.pyx":6442
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointSetRefCons"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6445
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointSetRefCons"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_endpoint_get_ref_cons(long endpoint):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6422
 *     return status
 * 
 * def midi_endpoint_set_ref_cons(long endpoint, long ref1=0, long ref2=0):             # <<<<<<<<<<<<<<
 *     """Set reference constants for a MIDI endpoint.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_set_ref_cons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6447
 *     return status
 * 
 * def midi_endpoint_get_ref_cons(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get reference constants for a MIDI endpoint.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_723midi_endpoint_get_ref_cons(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_722midi_endpoint_get_ref_cons, "midi_endpoint_get_ref_cons(long endpoint)\n\nGet reference constants for a MIDI endpoint.\n\nArgs:\n    endpoint: The MIDIEndpointRef\n\nReturns:\n    Tuple of (ref1, ref2) as integers\n\nRaises:\n    RuntimeError: If getting refCons fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_723midi_endpoint_get_ref_cons = {"midi_endpoint_get_ref_cons", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_723midi_endpoint_get_ref_cons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_722midi_endpoint_get_ref_cons};
static PyObject *__pyx_pw_9coremusic_4capi_723midi_endpoint_get_ref_cons(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_endpoint;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_endpoint_get_ref_cons (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_endpoint,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6447, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_endpoint_get_ref_cons", 0) < (0)) __PYX_ERR(0, 6447, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_endpoint_get_ref_cons", 1, 1, 1, i); __PYX_ERR(0, 6447, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6447, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6447, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_endpoint_get_ref_cons", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6447, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_get_ref_cons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_722midi_endpoint_get_ref_cons(__pyx_self, __pyx_v_endpoint);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_722midi_endpoint_get_ref_cons(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint) {
  void *__pyx_v_ref1;
  void *__pyx_v_ref2;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_endpoint_get_ref_cons", 0);

  /* "coremusic/capi.pyx":6461
 *     cdef void* ref1
 *     cdef void* ref2
 *     cdef cf.OSStatus status = cm.MIDIEndpointGetRefCons(             # <<<<<<<<<<<<<<
 *         <cm.MIDIEndpointRef>endpoint, &ref1, &ref2
 *     )
*/
  __pyx_v_status = MIDIEndpointGetRefCons(((MIDIEndpointRef)__pyx_v_endpoint), (&__pyx_v_ref1), (&__pyx_v_ref2));

  /* "coremusic/capi.pyx":6465
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointGetRefCons"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6466
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointGetRefCons"))             # <<<<<<<<<<<<<<
 * 
 *     return (<long>ref1, <long>ref2)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIEndpointGetRefCons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __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_ERR(0, 6466, __pyx_L1_error)

    /* "coremusic/capi.pyx":6465
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointGetRefCons"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6468
 *         raise RuntimeError(format_osstatus_error(status, "MIDIEndpointGetRefCons"))
 * 
 *     return (<long>ref1, <long>ref2)             # <<<<<<<<<<<<<<
 * 
 * def midi_get_driver_io_runloop():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_ref1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_long(((long)__pyx_v_ref2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 6468, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 6468, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6447
 *     return status
 * 
 * def midi_endpoint_get_ref_cons(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get reference constants for a MIDI endpoint.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_endpoint_get_ref_cons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6470
 *     return (<long>ref1, <long>ref2)
 * 
 * def midi_get_driver_io_runloop():             # <<<<<<<<<<<<<<
 *     """Get the driver I/O run loop.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_725midi_get_driver_io_runloop(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_724midi_get_driver_io_runloop, "midi_get_driver_io_runloop()\n\nGet the driver I/O run loop.\n\nReturns:\n    CFRunLoopRef as an integer (for advanced use)\n\nNote:\n    This is primarily used by MIDI drivers for high-priority I/O operations.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_725midi_get_driver_io_runloop = {"midi_get_driver_io_runloop", (PyCFunction)__pyx_pw_9coremusic_4capi_725midi_get_driver_io_runloop, METH_NOARGS, __pyx_doc_9coremusic_4capi_724midi_get_driver_io_runloop};
static PyObject *__pyx_pw_9coremusic_4capi_725midi_get_driver_io_runloop(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_driver_io_runloop (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_724midi_get_driver_io_runloop(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_724midi_get_driver_io_runloop(CYTHON_UNUSED PyObject *__pyx_self) {
  CFRunLoopRef __pyx_v_runloop;
  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("midi_get_driver_io_runloop", 0);

  /* "coremusic/capi.pyx":6479
 *         This is primarily used by MIDI drivers for high-priority I/O operations.
 *     """
 *     cdef ca.CFRunLoopRef runloop = cm.MIDIGetDriverIORunLoop()             # <<<<<<<<<<<<<<
 *     return <long>runloop
 * 
*/
  __pyx_v_runloop = MIDIGetDriverIORunLoop();

  /* "coremusic/capi.pyx":6480
 *     """
 *     cdef ca.CFRunLoopRef runloop = cm.MIDIGetDriverIORunLoop()
 *     return <long>runloop             # <<<<<<<<<<<<<<
 * 
 * def midi_get_driver_device_list(long driver):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_runloop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6470
 *     return (<long>ref1, <long>ref2)
 * 
 * def midi_get_driver_io_runloop():             # <<<<<<<<<<<<<<
 *     """Get the driver I/O run loop.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_get_driver_io_runloop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6482
 *     return <long>runloop
 * 
 * def midi_get_driver_device_list(long driver):             # <<<<<<<<<<<<<<
 *     """Get the device list for a specific driver.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_727midi_get_driver_device_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_726midi_get_driver_device_list, "midi_get_driver_device_list(long driver)\n\nGet the device list for a specific driver.\n\nArgs:\n    driver: The MIDIDriverRef\n\nReturns:\n    MIDIDeviceListRef containing devices owned by the driver\n\nNote:\n    The returned device list should be disposed using midi_device_list_dispose().\n    This function is primarily useful for driver development.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_727midi_get_driver_device_list = {"midi_get_driver_device_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_727midi_get_driver_device_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_726midi_get_driver_device_list};
static PyObject *__pyx_pw_9coremusic_4capi_727midi_get_driver_device_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_driver;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_get_driver_device_list (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_driver,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6482, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6482, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_get_driver_device_list", 0) < (0)) __PYX_ERR(0, 6482, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_get_driver_device_list", 1, 1, 1, i); __PYX_ERR(0, 6482, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6482, __pyx_L3_error)
    }
    __pyx_v_driver = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_driver == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6482, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_driver_device_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6482, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_get_driver_device_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_726midi_get_driver_device_list(__pyx_self, __pyx_v_driver);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_726midi_get_driver_device_list(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver) {
  MIDIDeviceListRef __pyx_v_dev_list;
  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("midi_get_driver_device_list", 0);

  /* "coremusic/capi.pyx":6495
 *         This function is primarily useful for driver development.
 *     """
 *     cdef cm.MIDIDeviceListRef dev_list = cm.MIDIGetDriverDeviceList(<cm.MIDIDriverRef>driver)             # <<<<<<<<<<<<<<
 *     return dev_list
 * 
*/
  __pyx_v_dev_list = MIDIGetDriverDeviceList(((MIDIDriverRef)__pyx_v_driver));

  /* "coremusic/capi.pyx":6496
 *     """
 *     cdef cm.MIDIDeviceListRef dev_list = cm.MIDIGetDriverDeviceList(<cm.MIDIDriverRef>driver)
 *     return dev_list             # <<<<<<<<<<<<<<
 * 
 * def midi_driver_enable_monitoring(long driver, bint enabled):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_dev_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6482
 *     return <long>runloop
 * 
 * def midi_get_driver_device_list(long driver):             # <<<<<<<<<<<<<<
 *     """Get the device list for a specific driver.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.midi_get_driver_device_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6498
 *     return dev_list
 * 
 * def midi_driver_enable_monitoring(long driver, bint enabled):             # <<<<<<<<<<<<<<
 *     """Enable or disable MIDI monitoring for a driver.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_729midi_driver_enable_monitoring(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_728midi_driver_enable_monitoring, "midi_driver_enable_monitoring(long driver, bool enabled)\n\nEnable or disable MIDI monitoring for a driver.\n\nArgs:\n    driver: The MIDIDriverRef\n    enabled: True to enable monitoring, False to disable\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If enabling/disabling monitoring fails\n\nNote:\n    This allows a driver to monitor all outgoing MIDI packets in the system.\n    Primarily used for specialized drivers like MIDI monitor displays.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_729midi_driver_enable_monitoring = {"midi_driver_enable_monitoring", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_729midi_driver_enable_monitoring, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_728midi_driver_enable_monitoring};
static PyObject *__pyx_pw_9coremusic_4capi_729midi_driver_enable_monitoring(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_driver;
  int __pyx_v_enabled;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_driver_enable_monitoring (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_driver,&__pyx_mstate_global->__pyx_n_u_enabled,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6498, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6498, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6498, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_driver_enable_monitoring", 0) < (0)) __PYX_ERR(0, 6498, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_driver_enable_monitoring", 1, 2, 2, i); __PYX_ERR(0, 6498, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6498, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6498, __pyx_L3_error)
    }
    __pyx_v_driver = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_driver == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6498, __pyx_L3_error)
    __pyx_v_enabled = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_enabled == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6498, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_driver_enable_monitoring", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 6498, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_driver_enable_monitoring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_728midi_driver_enable_monitoring(__pyx_self, __pyx_v_driver, __pyx_v_enabled);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_728midi_driver_enable_monitoring(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver, int __pyx_v_enabled) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_driver_enable_monitoring", 0);

  /* "coremusic/capi.pyx":6515
 *         Primarily used for specialized drivers like MIDI monitor displays.
 *     """
 *     cdef cf.OSStatus status = cm.MIDIDriverEnableMonitoring(             # <<<<<<<<<<<<<<
 *         <cm.MIDIDriverRef>driver, <cf.Boolean>enabled
 *     )
*/
  __pyx_v_status = MIDIDriverEnableMonitoring(((MIDIDriverRef)__pyx_v_driver), ((Boolean)__pyx_v_enabled));

  /* "coremusic/capi.pyx":6519
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDriverEnableMonitoring"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6520
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDriverEnableMonitoring"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIDriverEnableMonitoring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6520, __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_ERR(0, 6520, __pyx_L1_error)

    /* "coremusic/capi.pyx":6519
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDriverEnableMonitoring"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6522
 *         raise RuntimeError(format_osstatus_error(status, "MIDIDriverEnableMonitoring"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6498
 *     return dev_list
 * 
 * def midi_driver_enable_monitoring(long driver, bint enabled):             # <<<<<<<<<<<<<<
 *     """Enable or disable MIDI monitoring for a driver.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_driver_enable_monitoring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6527
 * # MIDI Thru Connection Functions
 * 
 * def midi_thru_connection_params_initialize():             # <<<<<<<<<<<<<<
 *     """Initialize a MIDIThruConnectionParams structure with default values.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_731midi_thru_connection_params_initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_730midi_thru_connection_params_initialize, "midi_thru_connection_params_initialize()\n\nInitialize a MIDIThruConnectionParams structure with default values.\n\nReturns:\n    Dictionary containing the default thru connection parameters\n\nNote:\n    This creates a basic structure with no endpoints and no transformations.\n    You can then modify the returned dictionary and use it with other functions.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_731midi_thru_connection_params_initialize = {"midi_thru_connection_params_initialize", (PyCFunction)__pyx_pw_9coremusic_4capi_731midi_thru_connection_params_initialize, METH_NOARGS, __pyx_doc_9coremusic_4capi_730midi_thru_connection_params_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_731midi_thru_connection_params_initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_params_initialize (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_730midi_thru_connection_params_initialize(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_730midi_thru_connection_params_initialize(CYTHON_UNUSED PyObject *__pyx_self) {
  MIDIThruConnectionParams __pyx_v_params;
  PyObject *__pyx_v_result = NULL;
  long __pyx_7genexpr__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_params_initialize", 0);

  /* "coremusic/capi.pyx":6538
 *     """
 *     cdef cm.MIDIThruConnectionParams params
 *     cm.MIDIThruConnectionParamsInitialize(&params)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to Python dictionary for easier manipulation
*/
  MIDIThruConnectionParamsInitialize((&__pyx_v_params));

  /* "coremusic/capi.pyx":6542
 *     # Convert to Python dictionary for easier manipulation
 *     result = {
 *         'version': params.version,             # <<<<<<<<<<<<<<
 *         'sources': [],
 *         'destinations': [],
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_params.version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6543
 *     result = {
 *         'version': params.version,
 *         'sources': [],             # <<<<<<<<<<<<<<
 *         'destinations': [],
 *         'channelMap': [params.channelMap[i] for i in range(16)],
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sources, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6544
 *         'version': params.version,
 *         'sources': [],
 *         'destinations': [],             # <<<<<<<<<<<<<<
 *         'channelMap': [params.channelMap[i] for i in range(16)],
 *         'lowVelocity': params.lowVelocity,
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_destinations, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  { /* enter inner scope */

    /* "coremusic/capi.pyx":6545
 *         'sources': [],
 *         'destinations': [],
 *         'channelMap': [params.channelMap[i] for i in range(16)],             # <<<<<<<<<<<<<<
 *         'lowVelocity': params.lowVelocity,
 *         'highVelocity': params.highVelocity,
*/
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    for (__pyx_t_3 = 0; __pyx_t_3 < 16; __pyx_t_3+=1) {
      __pyx_7genexpr__pyx_v_i = __pyx_t_3;
      __pyx_t_4 = __Pyx_PyLong_From_UInt8((__pyx_v_params.channelMap[__pyx_7genexpr__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 6545, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  } /* exit inner scope */
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_channelMap, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6546
 *         'destinations': [],
 *         'channelMap': [params.channelMap[i] for i in range(16)],
 *         'lowVelocity': params.lowVelocity,             # <<<<<<<<<<<<<<
 *         'highVelocity': params.highVelocity,
 *         'lowNote': params.lowNote,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.lowVelocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lowVelocity, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6547
 *         'channelMap': [params.channelMap[i] for i in range(16)],
 *         'lowVelocity': params.lowVelocity,
 *         'highVelocity': params.highVelocity,             # <<<<<<<<<<<<<<
 *         'lowNote': params.lowNote,
 *         'highNote': params.highNote,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.highVelocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_highVelocity, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6548
 *         'lowVelocity': params.lowVelocity,
 *         'highVelocity': params.highVelocity,
 *         'lowNote': params.lowNote,             # <<<<<<<<<<<<<<
 *         'highNote': params.highNote,
 *         'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.lowNote); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lowNote, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6549
 *         'highVelocity': params.highVelocity,
 *         'lowNote': params.lowNote,
 *         'highNote': params.highNote,             # <<<<<<<<<<<<<<
 *         'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *         'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.highNote); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_highNote, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6550
 *         'lowNote': params.lowNote,
 *         'highNote': params.highNote,
 *         'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},             # <<<<<<<<<<<<<<
 *         'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *         'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.noteNumber.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.noteNumber.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_noteNumber, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6551
 *         'highNote': params.highNote,
 *         'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *         'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},             # <<<<<<<<<<<<<<
 *         'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *         'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.velocity.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.velocity.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6552
 *         'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *         'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *         'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},             # <<<<<<<<<<<<<<
 *         'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *         'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.keyPressure.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.keyPressure.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_keyPressure, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6553
 *         'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *         'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *         'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},             # <<<<<<<<<<<<<<
 *         'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *         'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.channelPressure.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.channelPressure.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_channelPressure, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6554
 *         'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *         'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *         'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},             # <<<<<<<<<<<<<<
 *         'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *         'filterOutSysEx': params.filterOutSysEx,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.programChange.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.programChange.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_programChange, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6555
 *         'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *         'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *         'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},             # <<<<<<<<<<<<<<
 *         'filterOutSysEx': params.filterOutSysEx,
 *         'filterOutMTC': params.filterOutMTC,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params.pitchBend.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 6555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_params.pitchBend.param); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 6555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pitchBend, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6556
 *         'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *         'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *         'filterOutSysEx': params.filterOutSysEx,             # <<<<<<<<<<<<<<
 *         'filterOutMTC': params.filterOutMTC,
 *         'filterOutBeatClock': params.filterOutBeatClock,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.filterOutSysEx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filterOutSysEx, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6557
 *         'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *         'filterOutSysEx': params.filterOutSysEx,
 *         'filterOutMTC': params.filterOutMTC,             # <<<<<<<<<<<<<<
 *         'filterOutBeatClock': params.filterOutBeatClock,
 *         'filterOutTuneRequest': params.filterOutTuneRequest,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.filterOutMTC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filterOutMTC, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6558
 *         'filterOutSysEx': params.filterOutSysEx,
 *         'filterOutMTC': params.filterOutMTC,
 *         'filterOutBeatClock': params.filterOutBeatClock,             # <<<<<<<<<<<<<<
 *         'filterOutTuneRequest': params.filterOutTuneRequest,
 *         'filterOutAllControls': params.filterOutAllControls,
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.filterOutBeatClock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filterOutBeatClock, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6559
 *         'filterOutMTC': params.filterOutMTC,
 *         'filterOutBeatClock': params.filterOutBeatClock,
 *         'filterOutTuneRequest': params.filterOutTuneRequest,             # <<<<<<<<<<<<<<
 *         'filterOutAllControls': params.filterOutAllControls,
 *         'controlTransforms': [],
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.filterOutTuneRequest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filterOutTuneRequest, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6560
 *         'filterOutBeatClock': params.filterOutBeatClock,
 *         'filterOutTuneRequest': params.filterOutTuneRequest,
 *         'filterOutAllControls': params.filterOutAllControls,             # <<<<<<<<<<<<<<
 *         'controlTransforms': [],
 *         'valueMaps': []
*/
  __pyx_t_2 = __Pyx_PyLong_From_UInt8(__pyx_v_params.filterOutAllControls); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filterOutAllControls, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6561
 *         'filterOutTuneRequest': params.filterOutTuneRequest,
 *         'filterOutAllControls': params.filterOutAllControls,
 *         'controlTransforms': [],             # <<<<<<<<<<<<<<
 *         'valueMaps': []
 *     }
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_controlTransforms, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6562
 *         'filterOutAllControls': params.filterOutAllControls,
 *         'controlTransforms': [],
 *         'valueMaps': []             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_valueMaps, __pyx_t_2) < (0)) __PYX_ERR(0, 6542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6565
 *     }
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6527
 * # MIDI Thru Connection Functions
 * 
 * def midi_thru_connection_params_initialize():             # <<<<<<<<<<<<<<
 *     """Initialize a MIDIThruConnectionParams structure with default values.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_params_initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6567
 *     return result
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):             # <<<<<<<<<<<<<<
 *     """Create a MIDI thru connection.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_733midi_thru_connection_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_732midi_thru_connection_create, "midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None)\n\nCreate a MIDI thru connection.\n\nArgs:\n    persistent_owner_id: If provided, connection persists; if None, owned by client\n    connection_params: Dictionary with connection parameters (use midi_thru_connection_params_initialize())\n\nReturns:\n    MIDIThruConnectionRef\n\nRaises:\n    RuntimeError: If connection creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_733midi_thru_connection_create = {"midi_thru_connection_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_733midi_thru_connection_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_732midi_thru_connection_create};
static PyObject *__pyx_pw_9coremusic_4capi_733midi_thru_connection_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_persistent_owner_id = 0;
  PyObject *__pyx_v_connection_params = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_persistent_owner_id,&__pyx_mstate_global->__pyx_n_u_connection_params,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6567, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_thru_connection_create", 0) < (0)) __PYX_ERR(0, 6567, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6567, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None));
    }
    __pyx_v_persistent_owner_id = ((PyObject*)values[0]);
    __pyx_v_connection_params = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_thru_connection_create", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 6567, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_persistent_owner_id), (&PyUnicode_Type), 1, "persistent_owner_id", 1))) __PYX_ERR(0, 6567, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection_params), (&PyDict_Type), 1, "connection_params", 1))) __PYX_ERR(0, 6567, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_732midi_thru_connection_create(__pyx_self, __pyx_v_persistent_owner_id, __pyx_v_connection_params);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_732midi_thru_connection_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_persistent_owner_id, PyObject *__pyx_v_connection_params) {
  MIDIThruConnectionParams __pyx_v_params;
  int __pyx_v_note_transform;
  int __pyx_v_velocity_transform;
  PyObject *__pyx_v_sources = NULL;
  long __pyx_v_i;
  PyObject *__pyx_v_destinations = NULL;
  PyObject *__pyx_v_channel_map = NULL;
  PyObject *__pyx_v_note_number = NULL;
  PyObject *__pyx_v_velocity = NULL;
  CFDataRef __pyx_v_cf_params;
  CFStringRef __pyx_v_cf_owner_id;
  PyObject *__pyx_v_owner_id_bytes = 0;
  MIDIThruConnectionRef __pyx_v_connection;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  UInt32 __pyx_t_6;
  long __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  UInt32 __pyx_t_10;
  MIDIEndpointRef __pyx_t_11;
  MIDIUniqueID __pyx_t_12;
  UInt8 __pyx_t_13;
  UInt8 __pyx_t_14;
  int __pyx_t_15;
  SInt16 __pyx_t_16;
  char const *__pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_create", 0);
  __Pyx_INCREF(__pyx_v_connection_params);

  /* "coremusic/capi.pyx":6580
 *         RuntimeError: If connection creation fails
 *     """
 *     if connection_params is None:             # <<<<<<<<<<<<<<
 *         connection_params = midi_thru_connection_params_initialize()
 * 
*/
  __pyx_t_1 = (__pyx_v_connection_params == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":6581
 *     """
 *     if connection_params is None:
 *         connection_params = midi_thru_connection_params_initialize()             # <<<<<<<<<<<<<<
 * 
 *     # Convert Python dict back to C structure
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_params_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 6581, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_connection_params, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":6580
 *         RuntimeError: If connection creation fails
 *     """
 *     if connection_params is None:             # <<<<<<<<<<<<<<
 *         connection_params = midi_thru_connection_params_initialize()
 * 
*/
  }

  /* "coremusic/capi.pyx":6587
 *     cdef int note_transform
 *     cdef int velocity_transform
 *     cm.MIDIThruConnectionParamsInitialize(&params)             # <<<<<<<<<<<<<<
 * 
 *     # Fill in the structure from the dictionary
*/
  MIDIThruConnectionParamsInitialize((&__pyx_v_params));

  /* "coremusic/capi.pyx":6590
 * 
 *     # Fill in the structure from the dictionary
 *     params.version = connection_params.get('version', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Sources
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6590, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_version, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_6 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.version = __pyx_t_6;

  /* "coremusic/capi.pyx":6593
 * 
 *     # Sources
 *     sources = connection_params.get('sources', [])             # <<<<<<<<<<<<<<
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6593, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_sources, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_sources = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6594
 *     # Sources
 *     sources = connection_params.get('sources', [])
 *     params.numSources = min(len(sources), 8)             # <<<<<<<<<<<<<<
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):
*/
  __pyx_t_7 = 8;
  __pyx_t_8 = PyObject_Length(__pyx_v_sources); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6594, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_7 < __pyx_t_8);
  if (__pyx_t_1) {
    __pyx_t_9 = __pyx_t_7;
  } else {
    __pyx_t_9 = __pyx_t_8;
  }
  __pyx_v_params.numSources = __pyx_t_9;

  /* "coremusic/capi.pyx":6595
 *     sources = connection_params.get('sources', [])
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):             # <<<<<<<<<<<<<<
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
*/
  __pyx_t_6 = __pyx_v_params.numSources;
  __pyx_t_10 = __pyx_t_6;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_10; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "coremusic/capi.pyx":6596
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):             # <<<<<<<<<<<<<<
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyDict_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":6597
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)             # <<<<<<<<<<<<<<
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
 * 
*/
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[7], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_t_4); if (unlikely((__pyx_t_11 == ((MIDIEndpointRef)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6597, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (__pyx_v_params.sources[__pyx_v_i]).endpointRef = ((MIDIEndpointRef)__pyx_t_11);

      /* "coremusic/capi.pyx":6598
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Destinations
*/
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[8], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_4); if (unlikely((__pyx_t_12 == ((MIDIUniqueID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6598, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (__pyx_v_params.sources[__pyx_v_i]).uniqueID = ((MIDIUniqueID)__pyx_t_12);

      /* "coremusic/capi.pyx":6596
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):             # <<<<<<<<<<<<<<
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
*/
    }
  }

  /* "coremusic/capi.pyx":6601
 * 
 *     # Destinations
 *     destinations = connection_params.get('destinations', [])             # <<<<<<<<<<<<<<
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6601, __pyx_L1_error)
  }
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_destinations, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_destinations = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6602
 *     # Destinations
 *     destinations = connection_params.get('destinations', [])
 *     params.numDestinations = min(len(destinations), 8)             # <<<<<<<<<<<<<<
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):
*/
  __pyx_t_7 = 8;
  __pyx_t_9 = PyObject_Length(__pyx_v_destinations); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6602, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_7 < __pyx_t_9);
  if (__pyx_t_1) {
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_9;
  }
  __pyx_v_params.numDestinations = __pyx_t_8;

  /* "coremusic/capi.pyx":6603
 *     destinations = connection_params.get('destinations', [])
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):             # <<<<<<<<<<<<<<
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
*/
  __pyx_t_6 = __pyx_v_params.numDestinations;
  __pyx_t_10 = __pyx_t_6;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_10; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "coremusic/capi.pyx":6604
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):             # <<<<<<<<<<<<<<
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
*/
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyDict_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":6605
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)             # <<<<<<<<<<<<<<
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
 * 
*/
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[7], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_11 == ((MIDIEndpointRef)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6605, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (__pyx_v_params.destinations[__pyx_v_i]).endpointRef = ((MIDIEndpointRef)__pyx_t_11);

      /* "coremusic/capi.pyx":6606
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Channel map
*/
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_12 == ((MIDIUniqueID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6606, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (__pyx_v_params.destinations[__pyx_v_i]).uniqueID = ((MIDIUniqueID)__pyx_t_12);

      /* "coremusic/capi.pyx":6604
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):             # <<<<<<<<<<<<<<
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
*/
    }
  }

  /* "coremusic/capi.pyx":6609
 * 
 *     # Channel map
 *     channel_map = connection_params.get('channelMap', list(range(16)))             # <<<<<<<<<<<<<<
 *     for i in range(16):
 *         params.channelMap[i] = <cf.UInt8>channel_map[i] if i < len(channel_map) else <cf.UInt8>i
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6609, __pyx_L1_error)
  }
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_16};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_channelMap, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_channel_map = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6610
 *     # Channel map
 *     channel_map = connection_params.get('channelMap', list(range(16)))
 *     for i in range(16):             # <<<<<<<<<<<<<<
 *         params.channelMap[i] = <cf.UInt8>channel_map[i] if i < len(channel_map) else <cf.UInt8>i
 * 
*/
  for (__pyx_t_7 = 0; __pyx_t_7 < 16; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "coremusic/capi.pyx":6611
 *     channel_map = connection_params.get('channelMap', list(range(16)))
 *     for i in range(16):
 *         params.channelMap[i] = <cf.UInt8>channel_map[i] if i < len(channel_map) else <cf.UInt8>i             # <<<<<<<<<<<<<<
 * 
 *     # Velocity and note filtering
*/
    __pyx_t_8 = PyObject_Length(__pyx_v_channel_map); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6611, __pyx_L1_error)
    __pyx_t_1 = (__pyx_v_i < __pyx_t_8);
    if (__pyx_t_1) {
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_channel_map, __pyx_v_i, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_14 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6611, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_13 = ((UInt8)__pyx_t_14);
    } else {
      __pyx_t_13 = ((UInt8)__pyx_v_i);
    }
    (__pyx_v_params.channelMap[__pyx_v_i]) = __pyx_t_13;
  }

  /* "coremusic/capi.pyx":6614
 * 
 *     # Velocity and note filtering
 *     params.lowVelocity = <cf.UInt8>connection_params.get('lowVelocity', 0)             # <<<<<<<<<<<<<<
 *     params.highVelocity = <cf.UInt8>connection_params.get('highVelocity', 0)
 *     params.lowNote = <cf.UInt8>connection_params.get('lowNote', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6614, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_lowVelocity, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.lowVelocity = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6615
 *     # Velocity and note filtering
 *     params.lowVelocity = <cf.UInt8>connection_params.get('lowVelocity', 0)
 *     params.highVelocity = <cf.UInt8>connection_params.get('highVelocity', 0)             # <<<<<<<<<<<<<<
 *     params.lowNote = <cf.UInt8>connection_params.get('lowNote', 0)
 *     params.highNote = <cf.UInt8>connection_params.get('highNote', 127)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6615, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_highVelocity, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.highVelocity = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6616
 *     params.lowVelocity = <cf.UInt8>connection_params.get('lowVelocity', 0)
 *     params.highVelocity = <cf.UInt8>connection_params.get('highVelocity', 0)
 *     params.lowNote = <cf.UInt8>connection_params.get('lowNote', 0)             # <<<<<<<<<<<<<<
 *     params.highNote = <cf.UInt8>connection_params.get('highNote', 127)
 * 
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6616, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_lowNote, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.lowNote = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6617
 *     params.highVelocity = <cf.UInt8>connection_params.get('highVelocity', 0)
 *     params.lowNote = <cf.UInt8>connection_params.get('lowNote', 0)
 *     params.highNote = <cf.UInt8>connection_params.get('highNote', 127)             # <<<<<<<<<<<<<<
 * 
 *     # Transform settings
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6617, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_highNote, __pyx_mstate_global->__pyx_int_127); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.highNote = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6620
 * 
 *     # Transform settings
 *     note_number = connection_params.get('noteNumber', {'transform': 0, 'param': 0})             # <<<<<<<<<<<<<<
 *     note_transform = note_number.get('transform', 0)
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6620, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 6620, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 6620, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_noteNumber, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_note_number = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6621
 *     # Transform settings
 *     note_number = connection_params.get('noteNumber', {'transform': 0, 'param': 0})
 *     note_transform = note_number.get('transform', 0)             # <<<<<<<<<<<<<<
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_note_number, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[9], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_note_transform = __pyx_t_15;

  /* "coremusic/capi.pyx":6622
 *     note_number = connection_params.get('noteNumber', {'transform': 0, 'param': 0})
 *     note_transform = note_number.get('transform', 0)
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform             # <<<<<<<<<<<<<<
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)
 * 
*/
  __pyx_v_params.noteNumber.transform = ((MIDITransformType)__pyx_v_note_transform);

  /* "coremusic/capi.pyx":6623
 *     note_transform = note_number.get('transform', 0)
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)             # <<<<<<<<<<<<<<
 * 
 *     velocity = connection_params.get('velocity', {'transform': 0, 'param': 0})
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_note_number, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[10], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_16 = __Pyx_PyLong_As_SInt16(__pyx_t_4); if (unlikely((__pyx_t_16 == ((SInt16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_params.noteNumber.param = ((SInt16)__pyx_t_16);

  /* "coremusic/capi.pyx":6625
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)
 * 
 *     velocity = connection_params.get('velocity', {'transform': 0, 'param': 0})             # <<<<<<<<<<<<<<
 *     velocity_transform = velocity.get('transform', 0)
 *     params.velocity.transform = <cm.MIDITransformType>velocity_transform
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6625, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 6625, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 6625, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_velocity = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":6626
 * 
 *     velocity = connection_params.get('velocity', {'transform': 0, 'param': 0})
 *     velocity_transform = velocity.get('transform', 0)             # <<<<<<<<<<<<<<
 *     params.velocity.transform = <cm.MIDITransformType>velocity_transform
 *     params.velocity.param = <ca.SInt16>velocity.get('param', 0)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_velocity, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[9], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_velocity_transform = __pyx_t_15;

  /* "coremusic/capi.pyx":6627
 *     velocity = connection_params.get('velocity', {'transform': 0, 'param': 0})
 *     velocity_transform = velocity.get('transform', 0)
 *     params.velocity.transform = <cm.MIDITransformType>velocity_transform             # <<<<<<<<<<<<<<
 *     params.velocity.param = <ca.SInt16>velocity.get('param', 0)
 * 
*/
  __pyx_v_params.velocity.transform = ((MIDITransformType)__pyx_v_velocity_transform);

  /* "coremusic/capi.pyx":6628
 *     velocity_transform = velocity.get('transform', 0)
 *     params.velocity.transform = <cm.MIDITransformType>velocity_transform
 *     params.velocity.param = <ca.SInt16>velocity.get('param', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Filter settings
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_velocity, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[10], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_16 = __Pyx_PyLong_As_SInt16(__pyx_t_2); if (unlikely((__pyx_t_16 == ((SInt16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.velocity.param = ((SInt16)__pyx_t_16);

  /* "coremusic/capi.pyx":6631
 * 
 *     # Filter settings
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6631, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutSysEx, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutSysEx = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6632
 *     # Filter settings
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
 *     params.filterOutTuneRequest = <cf.UInt8>connection_params.get('filterOutTuneRequest', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6632, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutMTC, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutMTC = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6633
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutTuneRequest = <cf.UInt8>connection_params.get('filterOutTuneRequest', 0)
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6633, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutBeatClock, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutBeatClock = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6634
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
 *     params.filterOutTuneRequest = <cf.UInt8>connection_params.get('filterOutTuneRequest', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)
 * 
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6634, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutTuneRequest, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutTuneRequest = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6635
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
 *     params.filterOutTuneRequest = <cf.UInt8>connection_params.get('filterOutTuneRequest', 0)
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Note: For simplicity, we're not implementing the variable-length portions
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6635, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutAllControls, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyLong_As_UInt8(__pyx_t_2); if (unlikely((__pyx_t_13 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutAllControls = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":6639
 *     # Note: For simplicity, we're not implementing the variable-length portions
 *     # (control transforms and value maps) in this basic wrapper
 *     params.numControlTransforms = 0             # <<<<<<<<<<<<<<
 *     params.numMaps = 0
 * 
*/
  __pyx_v_params.numControlTransforms = 0;

  /* "coremusic/capi.pyx":6640
 *     # (control transforms and value maps) in this basic wrapper
 *     params.numControlTransforms = 0
 *     params.numMaps = 0             # <<<<<<<<<<<<<<
 * 
 *     # Create CFData from the structure
*/
  __pyx_v_params.numMaps = 0;

  /* "coremusic/capi.pyx":6643
 * 
 *     # Create CFData from the structure
 *     cdef cf.CFDataRef cf_params = ca.CFDataCreate(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         <cf.UInt8*>&params,
*/
  __pyx_v_cf_params = CFDataCreate(kCFAllocatorDefault, ((UInt8 *)(&__pyx_v_params)), (sizeof(MIDIThruConnectionParams)));

  /* "coremusic/capi.pyx":6649
 *     )
 * 
 *     cdef cf.CFStringRef cf_owner_id = NULL             # <<<<<<<<<<<<<<
 *     cdef bytes owner_id_bytes
 *     if persistent_owner_id is not None:
*/
  __pyx_v_cf_owner_id = NULL;

  /* "coremusic/capi.pyx":6651
 *     cdef cf.CFStringRef cf_owner_id = NULL
 *     cdef bytes owner_id_bytes
 *     if persistent_owner_id is not None:             # <<<<<<<<<<<<<<
 *         owner_id_bytes = persistent_owner_id.encode('utf-8')
 *         cf_owner_id = cf.CFStringCreateWithCString(
*/
  __pyx_t_1 = (__pyx_v_persistent_owner_id != ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":6652
 *     cdef bytes owner_id_bytes
 *     if persistent_owner_id is not None:
 *         owner_id_bytes = persistent_owner_id.encode('utf-8')             # <<<<<<<<<<<<<<
 *         cf_owner_id = cf.CFStringCreateWithCString(
 *             cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8
*/
    if (unlikely(__pyx_v_persistent_owner_id == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
      __PYX_ERR(0, 6652, __pyx_L1_error)
    }
    __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_persistent_owner_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_owner_id_bytes = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":6654
 *         owner_id_bytes = persistent_owner_id.encode('utf-8')
 *         cf_owner_id = cf.CFStringCreateWithCString(
 *             cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_17 = __Pyx_PyBytes_AsString(__pyx_v_owner_id_bytes); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 6654, __pyx_L1_error)

    /* "coremusic/capi.pyx":6653
 *     if persistent_owner_id is not None:
 *         owner_id_bytes = persistent_owner_id.encode('utf-8')
 *         cf_owner_id = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *             cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8
 *         )
*/
    __pyx_v_cf_owner_id = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_17, kCFStringEncodingUTF8);

    /* "coremusic/capi.pyx":6651
 *     cdef cf.CFStringRef cf_owner_id = NULL
 *     cdef bytes owner_id_bytes
 *     if persistent_owner_id is not None:             # <<<<<<<<<<<<<<
 *         owner_id_bytes = persistent_owner_id.encode('utf-8')
 *         cf_owner_id = cf.CFStringCreateWithCString(
*/
  }

  /* "coremusic/capi.pyx":6660
 *     cdef cf.OSStatus status
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6661
 * 
 *     try:
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)             # <<<<<<<<<<<<<<
 * 
 *         if status != 0:
*/
    __pyx_v_status = MIDIThruConnectionCreate(__pyx_v_cf_owner_id, __pyx_v_cf_params, (&__pyx_v_connection));

    /* "coremusic/capi.pyx":6663
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionCreate"))
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":6664
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionCreate"))             # <<<<<<<<<<<<<<
 * 
 *         return connection
*/
      __pyx_t_4 = NULL;
      __pyx_t_3 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIThruConnectionCreate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6664, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6664, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 6664, __pyx_L14_error)

      /* "coremusic/capi.pyx":6663
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionCreate"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6666
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionCreate"))
 * 
 *         return connection             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6666, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L13_return;
  }

  /* "coremusic/capi.pyx":6669
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
  /*finally:*/ {
    __pyx_L14_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
      if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_25);
      __pyx_t_15 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
      {
        __pyx_t_1 = (__pyx_v_cf_params != 0);
        if (__pyx_t_1) {

          /* "coremusic/capi.pyx":6670
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
*/
          CFRelease(__pyx_v_cf_params);

          /* "coremusic/capi.pyx":6669
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
        }

        /* "coremusic/capi.pyx":6671
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
        __pyx_t_1 = (__pyx_v_cf_owner_id != 0);
        if (__pyx_t_1) {

          /* "coremusic/capi.pyx":6672
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_dispose(long connection):
*/
          CFRelease(__pyx_v_cf_owner_id);

          /* "coremusic/capi.pyx":6671
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
      __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
      goto __pyx_L1_error;
    }
    __pyx_L13_return: {
      __pyx_t_25 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":6669
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
      __pyx_t_1 = (__pyx_v_cf_params != 0);
      if (__pyx_t_1) {

        /* "coremusic/capi.pyx":6670
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
*/
        CFRelease(__pyx_v_cf_params);

        /* "coremusic/capi.pyx":6669
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
      }

      /* "coremusic/capi.pyx":6671
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
      __pyx_t_1 = (__pyx_v_cf_owner_id != 0);
      if (__pyx_t_1) {

        /* "coremusic/capi.pyx":6672
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_dispose(long connection):
*/
        CFRelease(__pyx_v_cf_owner_id);

        /* "coremusic/capi.pyx":6671
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
      }
      __pyx_r = __pyx_t_25;
      __pyx_t_25 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6567
 *     return result
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):             # <<<<<<<<<<<<<<
 *     """Create a MIDI thru connection.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sources);
  __Pyx_XDECREF(__pyx_v_destinations);
  __Pyx_XDECREF(__pyx_v_channel_map);
  __Pyx_XDECREF(__pyx_v_note_number);
  __Pyx_XDECREF(__pyx_v_velocity);
  __Pyx_XDECREF(__pyx_v_owner_id_bytes);
  __Pyx_XDECREF(__pyx_v_connection_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6674
 *             cf.CFRelease(cf_owner_id)
 * 
 * def midi_thru_connection_dispose(long connection):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI thru connection.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_735midi_thru_connection_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_734midi_thru_connection_dispose, "midi_thru_connection_dispose(long connection)\n\nDispose a MIDI thru connection.\n\nArgs:\n    connection: The MIDIThruConnectionRef to dispose\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_735midi_thru_connection_dispose = {"midi_thru_connection_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_735midi_thru_connection_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_734midi_thru_connection_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_735midi_thru_connection_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_connection;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_connection,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6674, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6674, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_thru_connection_dispose", 0) < (0)) __PYX_ERR(0, 6674, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_thru_connection_dispose", 1, 1, 1, i); __PYX_ERR(0, 6674, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6674, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6674, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_thru_connection_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6674, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_734midi_thru_connection_dispose(__pyx_self, __pyx_v_connection);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_734midi_thru_connection_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_dispose", 0);

  /* "coremusic/capi.pyx":6686
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionDispose(<cm.MIDIThruConnectionRef>connection)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = MIDIThruConnectionDispose(((MIDIThruConnectionRef)__pyx_v_connection));

  /* "coremusic/capi.pyx":6688
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionDispose(<cm.MIDIThruConnectionRef>connection)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6689
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionDispose"))             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIThruConnectionDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6689, __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_ERR(0, 6689, __pyx_L1_error)

    /* "coremusic/capi.pyx":6688
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionDispose(<cm.MIDIThruConnectionRef>connection)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6691
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionDispose"))
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_get_params(long connection):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6674
 *             cf.CFRelease(cf_owner_id)
 * 
 * def midi_thru_connection_dispose(long connection):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI thru connection.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6693
 *     return status
 * 
 * def midi_thru_connection_get_params(long connection):             # <<<<<<<<<<<<<<
 *     """Get the parameters of a MIDI thru connection.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_737midi_thru_connection_get_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_736midi_thru_connection_get_params, "midi_thru_connection_get_params(long connection)\n\nGet the parameters of a MIDI thru connection.\n\nArgs:\n    connection: The MIDIThruConnectionRef\n\nReturns:\n    Dictionary containing the connection parameters\n\nRaises:\n    RuntimeError: If getting parameters fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_737midi_thru_connection_get_params = {"midi_thru_connection_get_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_737midi_thru_connection_get_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_736midi_thru_connection_get_params};
static PyObject *__pyx_pw_9coremusic_4capi_737midi_thru_connection_get_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_connection;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_get_params (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_connection,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6693, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6693, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_thru_connection_get_params", 0) < (0)) __PYX_ERR(0, 6693, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_thru_connection_get_params", 1, 1, 1, i); __PYX_ERR(0, 6693, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6693, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6693, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_thru_connection_get_params", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6693, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_get_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_736midi_thru_connection_get_params(__pyx_self, __pyx_v_connection);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_736midi_thru_connection_get_params(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection) {
  CFDataRef __pyx_v_cf_params;
  OSStatus __pyx_v_status;
  CFIndex __pyx_v_data_length;
  UInt8 *__pyx_v_data_ptr;
  MIDIThruConnectionParams *__pyx_v_params;
  PyObject *__pyx_v_result = NULL;
  UInt32 __pyx_v_i;
  PyObject *__pyx_v_source = NULL;
  PyObject *__pyx_v_dest = NULL;
  long __pyx_8genexpr1__pyx_v_i;
  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;
  size_t __pyx_t_5;
  long __pyx_t_6;
  UInt32 __pyx_t_7;
  UInt32 __pyx_t_8;
  UInt32 __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_get_params", 0);

  /* "coremusic/capi.pyx":6706
 *     """
 *     cdef cf.CFDataRef cf_params
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionGetParams(             # <<<<<<<<<<<<<<
 *         <cm.MIDIThruConnectionRef>connection, &cf_params
 *     )
*/
  __pyx_v_status = MIDIThruConnectionGetParams(((MIDIThruConnectionRef)__pyx_v_connection), (&__pyx_v_cf_params));

  /* "coremusic/capi.pyx":6710
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionGetParams"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":6711
 * 
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionGetParams"))             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.CFIndex data_length
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIThruConnectionGetParams); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6711, __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_ERR(0, 6711, __pyx_L1_error)

    /* "coremusic/capi.pyx":6710
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionGetParams"))
 * 
*/
  }

  /* "coremusic/capi.pyx":6717
 *     cdef cm.MIDIThruConnectionParams* params
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Extract the data
 *         data_length = ca.CFDataGetLength(cf_params)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6719
 *     try:
 *         # Extract the data
 *         data_length = ca.CFDataGetLength(cf_params)             # <<<<<<<<<<<<<<
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_params)
 * 
*/
    __pyx_v_data_length = CFDataGetLength(__pyx_v_cf_params);

    /* "coremusic/capi.pyx":6720
 *         # Extract the data
 *         data_length = ca.CFDataGetLength(cf_params)
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_params)             # <<<<<<<<<<<<<<
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):
*/
    __pyx_v_data_ptr = ((UInt8 *)CFDataGetBytePtr(__pyx_v_cf_params));

    /* "coremusic/capi.pyx":6722
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_params)
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Invalid connection parameters data")
 * 
*/
    __pyx_t_1 = (__pyx_v_data_length < (sizeof(MIDIThruConnectionParams)));
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":6723
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):
 *             raise RuntimeError("Invalid connection parameters data")             # <<<<<<<<<<<<<<
 * 
 *         params = <cm.MIDIThruConnectionParams*>data_ptr
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Invalid_connection_parameters_da};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6723, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 6723, __pyx_L5_error)

      /* "coremusic/capi.pyx":6722
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_params)
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Invalid connection parameters data")
 * 
*/
    }

    /* "coremusic/capi.pyx":6725
 *             raise RuntimeError("Invalid connection parameters data")
 * 
 *         params = <cm.MIDIThruConnectionParams*>data_ptr             # <<<<<<<<<<<<<<
 * 
 *         # Convert to Python dictionary
*/
    __pyx_v_params = ((MIDIThruConnectionParams *)__pyx_v_data_ptr);

    /* "coremusic/capi.pyx":6729
 *         # Convert to Python dictionary
 *         result = {
 *             'version': params.version,             # <<<<<<<<<<<<<<
 *             'sources': [],
 *             'destinations': [],
*/
    __pyx_t_2 = __Pyx_PyDict_NewPresized(21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_params->version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6730
 *         result = {
 *             'version': params.version,
 *             'sources': [],             # <<<<<<<<<<<<<<
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],
*/
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6730, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sources, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6731
 *             'version': params.version,
 *             'sources': [],
 *             'destinations': [],             # <<<<<<<<<<<<<<
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,
*/
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6731, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_destinations, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    { /* enter inner scope */

      /* "coremusic/capi.pyx":6732
 *             'sources': [],
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],             # <<<<<<<<<<<<<<
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,
*/
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6732, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      for (__pyx_t_6 = 0; __pyx_t_6 < 16; __pyx_t_6+=1) {
        __pyx_8genexpr1__pyx_v_i = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyLong_From_UInt8((__pyx_v_params->channelMap[__pyx_8genexpr1__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6732, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 6732, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    } /* exit inner scope */
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_channelMap, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6733
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,             # <<<<<<<<<<<<<<
 *             'highVelocity': params.highVelocity,
 *             'lowNote': params.lowNote,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->lowVelocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6733, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lowVelocity, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6734
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,             # <<<<<<<<<<<<<<
 *             'lowNote': params.lowNote,
 *             'highNote': params.highNote,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->highVelocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6734, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_highVelocity, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6735
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,
 *             'lowNote': params.lowNote,             # <<<<<<<<<<<<<<
 *             'highNote': params.highNote,
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->lowNote); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6735, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lowNote, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6736
 *             'highVelocity': params.highVelocity,
 *             'lowNote': params.lowNote,
 *             'highNote': params.highNote,             # <<<<<<<<<<<<<<
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *             'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->highNote); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6736, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_highNote, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6737
 *             'lowNote': params.lowNote,
 *             'highNote': params.highNote,
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},             # <<<<<<<<<<<<<<
 *             'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *             'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6737, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->noteNumber.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6737, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6737, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->noteNumber.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6737, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6737, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_noteNumber, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6738
 *             'highNote': params.highNote,
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *             'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},             # <<<<<<<<<<<<<<
 *             'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *             'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6738, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->velocity.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6738, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6738, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->velocity.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6738, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6738, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6739
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
 *             'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *             'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},             # <<<<<<<<<<<<<<
 *             'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *             'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6739, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->keyPressure.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6739, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6739, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->keyPressure.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6739, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6739, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_keyPressure, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6740
 *             'velocity': {'transform': params.velocity.transform, 'param': params.velocity.param},
 *             'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *             'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},             # <<<<<<<<<<<<<<
 *             'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6740, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->channelPressure.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6740, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6740, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->channelPressure.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6740, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6740, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_channelPressure, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6741
 *             'keyPressure': {'transform': params.keyPressure.transform, 'param': params.keyPressure.param},
 *             'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *             'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},             # <<<<<<<<<<<<<<
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *             'filterOutSysEx': params.filterOutSysEx,
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6741, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->programChange.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6741, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6741, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->programChange.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6741, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6741, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_programChange, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6742
 *             'channelPressure': {'transform': params.channelPressure.transform, 'param': params.channelPressure.param},
 *             'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},             # <<<<<<<<<<<<<<
 *             'filterOutSysEx': params.filterOutSysEx,
 *             'filterOutMTC': params.filterOutMTC,
*/
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6742, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->pitchBend.transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6742, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_3) < (0)) __PYX_ERR(0, 6742, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyLong_From_SInt16(__pyx_v_params->pitchBend.param); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6742, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_3) < (0)) __PYX_ERR(0, 6742, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pitchBend, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6743
 *             'programChange': {'transform': params.programChange.transform, 'param': params.programChange.param},
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *             'filterOutSysEx': params.filterOutSysEx,             # <<<<<<<<<<<<<<
 *             'filterOutMTC': params.filterOutMTC,
 *             'filterOutBeatClock': params.filterOutBeatClock,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutSysEx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6743, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutSysEx, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6744
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *             'filterOutSysEx': params.filterOutSysEx,
 *             'filterOutMTC': params.filterOutMTC,             # <<<<<<<<<<<<<<
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutMTC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6744, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutMTC, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6745
 *             'filterOutSysEx': params.filterOutSysEx,
 *             'filterOutMTC': params.filterOutMTC,
 *             'filterOutBeatClock': params.filterOutBeatClock,             # <<<<<<<<<<<<<<
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutBeatClock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6745, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutBeatClock, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6746
 *             'filterOutMTC': params.filterOutMTC,
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,             # <<<<<<<<<<<<<<
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutTuneRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6746, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutTuneRequest, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6747
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,             # <<<<<<<<<<<<<<
 *             'numControlTransforms': params.numControlTransforms,
 *             'numMaps': params.numMaps
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutAllControls); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6747, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutAllControls, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6748
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,             # <<<<<<<<<<<<<<
 *             'numMaps': params.numMaps
 *         }
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt16(__pyx_v_params->numControlTransforms); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6748, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numControlTransforms, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":6749
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,
 *             'numMaps': params.numMaps             # <<<<<<<<<<<<<<
 *         }
 * 
*/
    __pyx_t_4 = __Pyx_PyLong_From_UInt16(__pyx_v_params->numMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6749, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numMaps, __pyx_t_4) < (0)) __PYX_ERR(0, 6729, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":6753
 * 
 *         # Add sources
 *         for i in range(params.numSources):             # <<<<<<<<<<<<<<
 *             source = {
 *                 'endpointRef': params.sources[i].endpointRef,
*/
    __pyx_t_7 = __pyx_v_params->numSources;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "coremusic/capi.pyx":6755
 *         for i in range(params.numSources):
 *             source = {
 *                 'endpointRef': params.sources[i].endpointRef,             # <<<<<<<<<<<<<<
 *                 'uniqueID': params.sources[i].uniqueID
 *             }
*/
      __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6755, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyLong_From_UInt32((__pyx_v_params->sources[__pyx_v_i]).endpointRef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6755, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_t_4) < (0)) __PYX_ERR(0, 6755, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":6756
 *             source = {
 *                 'endpointRef': params.sources[i].endpointRef,
 *                 'uniqueID': params.sources[i].uniqueID             # <<<<<<<<<<<<<<
 *             }
 *             result['sources'].append(source)
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32((__pyx_v_params->sources[__pyx_v_i]).uniqueID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6756, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_t_4) < (0)) __PYX_ERR(0, 6755, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_source, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":6758
 *                 'uniqueID': params.sources[i].uniqueID
 *             }
 *             result['sources'].append(source)             # <<<<<<<<<<<<<<
 * 
 *         # Add destinations
*/
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_sources); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6758, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_source); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6758, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "coremusic/capi.pyx":6761
 * 
 *         # Add destinations
 *         for i in range(params.numDestinations):             # <<<<<<<<<<<<<<
 *             dest = {
 *                 'endpointRef': params.destinations[i].endpointRef,
*/
    __pyx_t_7 = __pyx_v_params->numDestinations;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "coremusic/capi.pyx":6763
 *         for i in range(params.numDestinations):
 *             dest = {
 *                 'endpointRef': params.destinations[i].endpointRef,             # <<<<<<<<<<<<<<
 *                 'uniqueID': params.destinations[i].uniqueID
 *             }
*/
      __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6763, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyLong_From_UInt32((__pyx_v_params->destinations[__pyx_v_i]).endpointRef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6763, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_t_4) < (0)) __PYX_ERR(0, 6763, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":6764
 *             dest = {
 *                 'endpointRef': params.destinations[i].endpointRef,
 *                 'uniqueID': params.destinations[i].uniqueID             # <<<<<<<<<<<<<<
 *             }
 *             result['destinations'].append(dest)
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32((__pyx_v_params->destinations[__pyx_v_i]).uniqueID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6764, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_t_4) < (0)) __PYX_ERR(0, 6763, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_dest, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":6766
 *                 'uniqueID': params.destinations[i].uniqueID
 *             }
 *             result['destinations'].append(dest)             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_destinations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6766, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_dest); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6766, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "coremusic/capi.pyx":6768
 *             result['destinations'].append(dest)
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":6771
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
  /*finally:*/ {
    __pyx_L5_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
      {
        __pyx_t_1 = (__pyx_v_cf_params != 0);
        if (__pyx_t_1) {

          /* "coremusic/capi.pyx":6772
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_set_params(long connection, dict connection_params):
*/
          CFRelease(__pyx_v_cf_params);

          /* "coremusic/capi.pyx":6771
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_19 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_1 = (__pyx_v_cf_params != 0);
      if (__pyx_t_1) {

        /* "coremusic/capi.pyx":6772
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_set_params(long connection, dict connection_params):
*/
        CFRelease(__pyx_v_cf_params);

        /* "coremusic/capi.pyx":6771
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
      }
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6693
 *     return status
 * 
 * def midi_thru_connection_get_params(long connection):             # <<<<<<<<<<<<<<
 *     """Get the parameters of a MIDI thru connection.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_get_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XDECREF(__pyx_v_dest);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6774
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_set_params(long connection, dict connection_params):             # <<<<<<<<<<<<<<
 *     """Set the parameters of a MIDI thru connection.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_739midi_thru_connection_set_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_738midi_thru_connection_set_params, "midi_thru_connection_set_params(long connection, dict connection_params)\n\nSet the parameters of a MIDI thru connection.\n\nArgs:\n    connection: The MIDIThruConnectionRef\n    connection_params: Dictionary with new connection parameters\n\nReturns:\n    OSStatus result code (0 on success)\n\nRaises:\n    RuntimeError: If setting parameters fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_739midi_thru_connection_set_params = {"midi_thru_connection_set_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_739midi_thru_connection_set_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_738midi_thru_connection_set_params};
static PyObject *__pyx_pw_9coremusic_4capi_739midi_thru_connection_set_params(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_connection;
  PyObject *__pyx_v_connection_params = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_set_params (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_connection,&__pyx_mstate_global->__pyx_n_u_connection_params,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6774, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_thru_connection_set_params", 0) < (0)) __PYX_ERR(0, 6774, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_thru_connection_set_params", 1, 2, 2, i); __PYX_ERR(0, 6774, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6774, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 6774, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 6774, __pyx_L3_error)
    __pyx_v_connection_params = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_thru_connection_set_params", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 6774, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_set_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection_params), (&PyDict_Type), 1, "connection_params", 1))) __PYX_ERR(0, 6774, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_738midi_thru_connection_set_params(__pyx_self, __pyx_v_connection, __pyx_v_connection_params);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_738midi_thru_connection_set_params(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection, PyObject *__pyx_v_connection_params) {
  MIDIThruConnectionParams __pyx_v_params;
  PyObject *__pyx_v_sources = NULL;
  UInt32 __pyx_v_i;
  PyObject *__pyx_v_destinations = NULL;
  CFDataRef __pyx_v_cf_params;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt32 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  UInt32 __pyx_t_8;
  UInt32 __pyx_t_9;
  MIDIEndpointRef __pyx_t_10;
  MIDIUniqueID __pyx_t_11;
  UInt8 __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  size_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_set_params", 0);

  /* "coremusic/capi.pyx":6789
 *     # Convert Python dict to C structure (similar to create function)
 *     cdef cm.MIDIThruConnectionParams params
 *     cm.MIDIThruConnectionParamsInitialize(&params)             # <<<<<<<<<<<<<<
 * 
 *     # Fill in the structure from the dictionary (abbreviated version)
*/
  MIDIThruConnectionParamsInitialize((&__pyx_v_params));

  /* "coremusic/capi.pyx":6792
 * 
 *     # Fill in the structure from the dictionary (abbreviated version)
 *     params.version = connection_params.get('version', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Sources
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6792, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_version, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.version = __pyx_t_2;

  /* "coremusic/capi.pyx":6795
 * 
 *     # Sources
 *     sources = connection_params.get('sources', [])             # <<<<<<<<<<<<<<
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6795, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_sources, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sources = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":6796
 *     # Sources
 *     sources = connection_params.get('sources', [])
 *     params.numSources = min(len(sources), 8)             # <<<<<<<<<<<<<<
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):
*/
  __pyx_t_4 = 8;
  __pyx_t_5 = PyObject_Length(__pyx_v_sources); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6796, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_4 < __pyx_t_5);
  if (__pyx_t_7) {
    __pyx_t_6 = __pyx_t_4;
  } else {
    __pyx_t_6 = __pyx_t_5;
  }
  __pyx_v_params.numSources = __pyx_t_6;

  /* "coremusic/capi.pyx":6797
 *     sources = connection_params.get('sources', [])
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):             # <<<<<<<<<<<<<<
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
*/
  __pyx_t_2 = __pyx_v_params.numSources;
  __pyx_t_8 = __pyx_t_2;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "coremusic/capi.pyx":6798
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):             # <<<<<<<<<<<<<<
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
*/
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyDict_Check(__pyx_t_3); 
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "coremusic/capi.pyx":6799
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)             # <<<<<<<<<<<<<<
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
 * 
*/
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[7], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_10 == ((MIDIEndpointRef)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6799, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      (__pyx_v_params.sources[__pyx_v_i]).endpointRef = ((MIDIEndpointRef)__pyx_t_10);

      /* "coremusic/capi.pyx":6800
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Destinations
*/
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sources, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[8], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_11 == ((MIDIUniqueID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6800, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      (__pyx_v_params.sources[__pyx_v_i]).uniqueID = ((MIDIUniqueID)__pyx_t_11);

      /* "coremusic/capi.pyx":6798
 *     params.numSources = min(len(sources), 8)
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):             # <<<<<<<<<<<<<<
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
*/
    }
  }

  /* "coremusic/capi.pyx":6803
 * 
 *     # Destinations
 *     destinations = connection_params.get('destinations', [])             # <<<<<<<<<<<<<<
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6803, __pyx_L1_error)
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_destinations, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_destinations = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6804
 *     # Destinations
 *     destinations = connection_params.get('destinations', [])
 *     params.numDestinations = min(len(destinations), 8)             # <<<<<<<<<<<<<<
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):
*/
  __pyx_t_4 = 8;
  __pyx_t_6 = PyObject_Length(__pyx_v_destinations); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 6804, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_4 < __pyx_t_6);
  if (__pyx_t_7) {
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_6;
  }
  __pyx_v_params.numDestinations = __pyx_t_5;

  /* "coremusic/capi.pyx":6805
 *     destinations = connection_params.get('destinations', [])
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):             # <<<<<<<<<<<<<<
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
*/
  __pyx_t_2 = __pyx_v_params.numDestinations;
  __pyx_t_8 = __pyx_t_2;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "coremusic/capi.pyx":6806
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):             # <<<<<<<<<<<<<<
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
*/
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyDict_Check(__pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "coremusic/capi.pyx":6807
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)             # <<<<<<<<<<<<<<
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
 * 
*/
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[7], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_10 == ((MIDIEndpointRef)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6807, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      (__pyx_v_params.destinations[__pyx_v_i]).endpointRef = ((MIDIEndpointRef)__pyx_t_10);

      /* "coremusic/capi.pyx":6808
 *         if isinstance(destinations[i], dict):
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Basic parameters
*/
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_destinations, __pyx_v_i, UInt32, 0, __Pyx_PyLong_From_UInt32, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[8], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_11 == ((MIDIUniqueID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6808, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      (__pyx_v_params.destinations[__pyx_v_i]).uniqueID = ((MIDIUniqueID)__pyx_t_11);

      /* "coremusic/capi.pyx":6806
 *     params.numDestinations = min(len(destinations), 8)
 *     for i in range(params.numDestinations):
 *         if isinstance(destinations[i], dict):             # <<<<<<<<<<<<<<
 *             params.destinations[i].endpointRef = <cm.MIDIEndpointRef>destinations[i].get('endpointRef', 0)
 *             params.destinations[i].uniqueID = <cm.MIDIUniqueID>destinations[i].get('uniqueID', 0)
*/
    }
  }

  /* "coremusic/capi.pyx":6811
 * 
 *     # Basic parameters
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6811, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutSysEx, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt8(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutSysEx = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":6812
 *     # Basic parameters
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6812, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutMTC, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt8(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutMTC = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":6813
 *     params.filterOutSysEx = <cf.UInt8>connection_params.get('filterOutSysEx', 0)
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)             # <<<<<<<<<<<<<<
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)
 * 
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6813, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutBeatClock, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt8(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutBeatClock = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":6814
 *     params.filterOutMTC = <cf.UInt8>connection_params.get('filterOutMTC', 0)
 *     params.filterOutBeatClock = <cf.UInt8>connection_params.get('filterOutBeatClock', 0)
 *     params.filterOutAllControls = <cf.UInt8>connection_params.get('filterOutAllControls', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Create CFData from the structure
*/
  if (unlikely(__pyx_v_connection_params == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 6814, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_filterOutAllControls, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt8(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 6814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutAllControls = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":6817
 * 
 *     # Create CFData from the structure
 *     cdef cf.CFDataRef cf_params = ca.CFDataCreate(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         <cf.UInt8*>&params,
*/
  __pyx_v_cf_params = CFDataCreate(kCFAllocatorDefault, ((UInt8 *)(&__pyx_v_params)), (sizeof(MIDIThruConnectionParams)));

  /* "coremusic/capi.pyx":6824
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionSetParams(
 *             <cm.MIDIThruConnectionRef>connection, cf_params
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6825
 *     cdef cf.OSStatus status
 *     try:
 *         status = cm.MIDIThruConnectionSetParams(             # <<<<<<<<<<<<<<
 *             <cm.MIDIThruConnectionRef>connection, cf_params
 *         )
*/
    __pyx_v_status = MIDIThruConnectionSetParams(((MIDIThruConnectionRef)__pyx_v_connection), __pyx_v_cf_params);

    /* "coremusic/capi.pyx":6829
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionSetParams"))
 * 
*/
    __pyx_t_7 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_7)) {

      /* "coremusic/capi.pyx":6830
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionSetParams"))             # <<<<<<<<<<<<<<
 * 
 *         return status
*/
      __pyx_t_3 = NULL;
      __pyx_t_13 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIThruConnectionSetParams); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 6830, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_13};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6830, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 6830, __pyx_L10_error)

      /* "coremusic/capi.pyx":6829
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionSetParams"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6832
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionSetParams"))
 * 
 *         return status             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6832, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L9_return;
  }

  /* "coremusic/capi.pyx":6835
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
  /*finally:*/ {
    __pyx_L10_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
      if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __pyx_t_15 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
      {
        __pyx_t_7 = (__pyx_v_cf_params != 0);
        if (__pyx_t_7) {

          /* "coremusic/capi.pyx":6836
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_find(str persistent_owner_id):
*/
          CFRelease(__pyx_v_cf_params);

          /* "coremusic/capi.pyx":6835
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
      __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
      goto __pyx_L1_error;
    }
    __pyx_L9_return: {
      __pyx_t_23 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_7 = (__pyx_v_cf_params != 0);
      if (__pyx_t_7) {

        /* "coremusic/capi.pyx":6836
 *     finally:
 *         if cf_params:
 *             cf.CFRelease(cf_params)             # <<<<<<<<<<<<<<
 * 
 * def midi_thru_connection_find(str persistent_owner_id):
*/
        CFRelease(__pyx_v_cf_params);

        /* "coremusic/capi.pyx":6835
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
      }
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6774
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_set_params(long connection, dict connection_params):             # <<<<<<<<<<<<<<
 *     """Set the parameters of a MIDI thru connection.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_set_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sources);
  __Pyx_XDECREF(__pyx_v_destinations);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6838
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_find(str persistent_owner_id):             # <<<<<<<<<<<<<<
 *     """Find all thru connections created by a specific owner.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_741midi_thru_connection_find(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_740midi_thru_connection_find, "midi_thru_connection_find(str persistent_owner_id)\n\nFind all thru connections created by a specific owner.\n\nArgs:\n    persistent_owner_id: The ID of the owner whose connections to find\n\nReturns:\n    List of MIDIThruConnectionRef values\n\nRaises:\n    RuntimeError: If finding connections fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_741midi_thru_connection_find = {"midi_thru_connection_find", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_741midi_thru_connection_find, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_740midi_thru_connection_find};
static PyObject *__pyx_pw_9coremusic_4capi_741midi_thru_connection_find(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_persistent_owner_id = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("midi_thru_connection_find (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_persistent_owner_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 6838, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6838, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "midi_thru_connection_find", 0) < (0)) __PYX_ERR(0, 6838, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("midi_thru_connection_find", 1, 1, 1, i); __PYX_ERR(0, 6838, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 6838, __pyx_L3_error)
    }
    __pyx_v_persistent_owner_id = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_thru_connection_find", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 6838, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_find", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_persistent_owner_id), (&PyUnicode_Type), 1, "persistent_owner_id", 1))) __PYX_ERR(0, 6838, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_740midi_thru_connection_find(__pyx_self, __pyx_v_persistent_owner_id);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_740midi_thru_connection_find(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_persistent_owner_id) {
  PyObject *__pyx_v_owner_id_bytes = 0;
  CFStringRef __pyx_v_cf_owner_id;
  CFDataRef __pyx_v_cf_connection_list;
  OSStatus __pyx_v_status;
  CFIndex __pyx_v_data_length;
  UInt8 *__pyx_v_data_ptr;
  CFIndex __pyx_v_num_connections;
  MIDIThruConnectionRef *__pyx_v_connections;
  PyObject *__pyx_v_result = NULL;
  CFIndex __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  CFIndex __pyx_t_7;
  CFIndex __pyx_t_8;
  CFIndex __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_thru_connection_find", 0);

  /* "coremusic/capi.pyx":6850
 *         RuntimeError: If finding connections fails
 *     """
 *     cdef bytes owner_id_bytes = persistent_owner_id.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef cf.CFStringRef cf_owner_id = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8
*/
  if (unlikely(__pyx_v_persistent_owner_id == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 6850, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_persistent_owner_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_owner_id_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":6852
 *     cdef bytes owner_id_bytes = persistent_owner_id.encode('utf-8')
 *     cdef cf.CFStringRef cf_owner_id = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_owner_id_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 6852, __pyx_L1_error)

  /* "coremusic/capi.pyx":6851
 *     """
 *     cdef bytes owner_id_bytes = persistent_owner_id.encode('utf-8')
 *     cdef cf.CFStringRef cf_owner_id = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault, owner_id_bytes, cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_v_cf_owner_id = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":6862
 *     cdef cm.MIDIThruConnectionRef* connections
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":6863
 * 
 *     try:
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)             # <<<<<<<<<<<<<<
 * 
 *         if status != 0:
*/
    __pyx_v_status = MIDIThruConnectionFind(__pyx_v_cf_owner_id, (&__pyx_v_cf_connection_list));

    /* "coremusic/capi.pyx":6865
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionFind"))
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":6866
 * 
 *         if status != 0:
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionFind"))             # <<<<<<<<<<<<<<
 * 
 *         # Extract the connection list
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_MIDIThruConnectionFind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6866, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6866, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 6866, __pyx_L4_error)

      /* "coremusic/capi.pyx":6865
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(format_osstatus_error(status, "MIDIThruConnectionFind"))
 * 
*/
    }

    /* "coremusic/capi.pyx":6869
 * 
 *         # Extract the connection list
 *         data_length = ca.CFDataGetLength(cf_connection_list)             # <<<<<<<<<<<<<<
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_connection_list)
 * 
*/
    __pyx_v_data_length = CFDataGetLength(__pyx_v_cf_connection_list);

    /* "coremusic/capi.pyx":6870
 *         # Extract the connection list
 *         data_length = ca.CFDataGetLength(cf_connection_list)
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_connection_list)             # <<<<<<<<<<<<<<
 * 
 *         # Each connection is a MIDIThruConnectionRef (which is a MIDIObjectRef)
*/
    __pyx_v_data_ptr = ((UInt8 *)CFDataGetBytePtr(__pyx_v_cf_connection_list));

    /* "coremusic/capi.pyx":6873
 * 
 *         # Each connection is a MIDIThruConnectionRef (which is a MIDIObjectRef)
 *         num_connections = data_length // sizeof(cm.MIDIThruConnectionRef)             # <<<<<<<<<<<<<<
 *         connections = <cm.MIDIThruConnectionRef*>data_ptr
 * 
*/
    __pyx_t_6 = (sizeof(MIDIThruConnectionRef));
    if (unlikely(__pyx_t_6 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(0, 6873, __pyx_L4_error)
    }
    __pyx_v_num_connections = (__pyx_v_data_length / __pyx_t_6);

    /* "coremusic/capi.pyx":6874
 *         # Each connection is a MIDIThruConnectionRef (which is a MIDIObjectRef)
 *         num_connections = data_length // sizeof(cm.MIDIThruConnectionRef)
 *         connections = <cm.MIDIThruConnectionRef*>data_ptr             # <<<<<<<<<<<<<<
 * 
 *         result = []
*/
    __pyx_v_connections = ((MIDIThruConnectionRef *)__pyx_v_data_ptr);

    /* "coremusic/capi.pyx":6876
 *         connections = <cm.MIDIThruConnectionRef*>data_ptr
 * 
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(num_connections):
 *             result.append(connections[i])
*/
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6876, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":6877
 * 
 *         result = []
 *         for i in range(num_connections):             # <<<<<<<<<<<<<<
 *             result.append(connections[i])
 * 
*/
    __pyx_t_7 = __pyx_v_num_connections;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_i = __pyx_t_9;

      /* "coremusic/capi.pyx":6878
 *         result = []
 *         for i in range(num_connections):
 *             result.append(connections[i])             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
      __pyx_t_1 = __Pyx_PyLong_From_UInt32((__pyx_v_connections[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6878, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 6878, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "coremusic/capi.pyx":6880
 *             result.append(connections[i])
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":6883
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
      {
        __pyx_t_3 = (__pyx_v_cf_owner_id != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6884
 *     finally:
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)             # <<<<<<<<<<<<<<
 *         if cf_connection_list:
 *             cf.CFRelease(cf_connection_list)
*/
          CFRelease(__pyx_v_cf_owner_id);

          /* "coremusic/capi.pyx":6883
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
        }

        /* "coremusic/capi.pyx":6885
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_list)
 * 
*/
        __pyx_t_3 = (__pyx_v_cf_connection_list != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":6886
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
 *             cf.CFRelease(cf_connection_list)             # <<<<<<<<<<<<<<
 * 
 * # MIDI Thru Connection Constants
*/
          CFRelease(__pyx_v_cf_connection_list);

          /* "coremusic/capi.pyx":6885
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_list)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_19 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":6883
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
      __pyx_t_3 = (__pyx_v_cf_owner_id != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6884
 *     finally:
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)             # <<<<<<<<<<<<<<
 *         if cf_connection_list:
 *             cf.CFRelease(cf_connection_list)
*/
        CFRelease(__pyx_v_cf_owner_id);

        /* "coremusic/capi.pyx":6883
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
      }

      /* "coremusic/capi.pyx":6885
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_list)
 * 
*/
      __pyx_t_3 = (__pyx_v_cf_connection_list != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":6886
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
 *             cf.CFRelease(cf_connection_list)             # <<<<<<<<<<<<<<
 * 
 * # MIDI Thru Connection Constants
*/
        CFRelease(__pyx_v_cf_connection_list);

        /* "coremusic/capi.pyx":6885
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_list)
 * 
*/
      }
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":6838
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_find(str persistent_owner_id):             # <<<<<<<<<<<<<<
 *     """Find all thru connections created by a specific owner.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.midi_thru_connection_find", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_owner_id_bytes);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6890
 * # MIDI Thru Connection Constants
 * 
 * def get_midi_transform_none():             # <<<<<<<<<<<<<<
 *     """Get the 'None' transform type constant."""
 *     return cm.kMIDITransform_None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_743get_midi_transform_none(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_742get_midi_transform_none, "get_midi_transform_none()\n\nGet the 'None' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_743get_midi_transform_none = {"get_midi_transform_none", (PyCFunction)__pyx_pw_9coremusic_4capi_743get_midi_transform_none, METH_NOARGS, __pyx_doc_9coremusic_4capi_742get_midi_transform_none};
static PyObject *__pyx_pw_9coremusic_4capi_743get_midi_transform_none(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_none (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_742get_midi_transform_none(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_742get_midi_transform_none(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_none", 0);

  /* "coremusic/capi.pyx":6892
 * def get_midi_transform_none():
 *     """Get the 'None' transform type constant."""
 *     return cm.kMIDITransform_None             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_filter_out():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6890
 * # MIDI Thru Connection Constants
 * 
 * def get_midi_transform_none():             # <<<<<<<<<<<<<<
 *     """Get the 'None' transform type constant."""
 *     return cm.kMIDITransform_None
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_none", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6894
 *     return cm.kMIDITransform_None
 * 
 * def get_midi_transform_filter_out():             # <<<<<<<<<<<<<<
 *     """Get the 'FilterOut' transform type constant."""
 *     return cm.kMIDITransform_FilterOut
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_745get_midi_transform_filter_out(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_744get_midi_transform_filter_out, "get_midi_transform_filter_out()\n\nGet the 'FilterOut' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_745get_midi_transform_filter_out = {"get_midi_transform_filter_out", (PyCFunction)__pyx_pw_9coremusic_4capi_745get_midi_transform_filter_out, METH_NOARGS, __pyx_doc_9coremusic_4capi_744get_midi_transform_filter_out};
static PyObject *__pyx_pw_9coremusic_4capi_745get_midi_transform_filter_out(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_filter_out (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_744get_midi_transform_filter_out(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_744get_midi_transform_filter_out(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_filter_out", 0);

  /* "coremusic/capi.pyx":6896
 * def get_midi_transform_filter_out():
 *     """Get the 'FilterOut' transform type constant."""
 *     return cm.kMIDITransform_FilterOut             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_map_control():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_FilterOut); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6894
 *     return cm.kMIDITransform_None
 * 
 * def get_midi_transform_filter_out():             # <<<<<<<<<<<<<<
 *     """Get the 'FilterOut' transform type constant."""
 *     return cm.kMIDITransform_FilterOut
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_filter_out", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6898
 *     return cm.kMIDITransform_FilterOut
 * 
 * def get_midi_transform_map_control():             # <<<<<<<<<<<<<<
 *     """Get the 'MapControl' transform type constant."""
 *     return cm.kMIDITransform_MapControl
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_747get_midi_transform_map_control(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_746get_midi_transform_map_control, "get_midi_transform_map_control()\n\nGet the 'MapControl' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_747get_midi_transform_map_control = {"get_midi_transform_map_control", (PyCFunction)__pyx_pw_9coremusic_4capi_747get_midi_transform_map_control, METH_NOARGS, __pyx_doc_9coremusic_4capi_746get_midi_transform_map_control};
static PyObject *__pyx_pw_9coremusic_4capi_747get_midi_transform_map_control(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_map_control (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_746get_midi_transform_map_control(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_746get_midi_transform_map_control(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_map_control", 0);

  /* "coremusic/capi.pyx":6900
 * def get_midi_transform_map_control():
 *     """Get the 'MapControl' transform type constant."""
 *     return cm.kMIDITransform_MapControl             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_add():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_MapControl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6898
 *     return cm.kMIDITransform_FilterOut
 * 
 * def get_midi_transform_map_control():             # <<<<<<<<<<<<<<
 *     """Get the 'MapControl' transform type constant."""
 *     return cm.kMIDITransform_MapControl
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_map_control", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6902
 *     return cm.kMIDITransform_MapControl
 * 
 * def get_midi_transform_add():             # <<<<<<<<<<<<<<
 *     """Get the 'Add' transform type constant."""
 *     return cm.kMIDITransform_Add
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_749get_midi_transform_add(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_748get_midi_transform_add, "get_midi_transform_add()\n\nGet the 'Add' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_749get_midi_transform_add = {"get_midi_transform_add", (PyCFunction)__pyx_pw_9coremusic_4capi_749get_midi_transform_add, METH_NOARGS, __pyx_doc_9coremusic_4capi_748get_midi_transform_add};
static PyObject *__pyx_pw_9coremusic_4capi_749get_midi_transform_add(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_add (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_748get_midi_transform_add(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_748get_midi_transform_add(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_add", 0);

  /* "coremusic/capi.pyx":6904
 * def get_midi_transform_add():
 *     """Get the 'Add' transform type constant."""
 *     return cm.kMIDITransform_Add             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_scale():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_Add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6902
 *     return cm.kMIDITransform_MapControl
 * 
 * def get_midi_transform_add():             # <<<<<<<<<<<<<<
 *     """Get the 'Add' transform type constant."""
 *     return cm.kMIDITransform_Add
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6906
 *     return cm.kMIDITransform_Add
 * 
 * def get_midi_transform_scale():             # <<<<<<<<<<<<<<
 *     """Get the 'Scale' transform type constant."""
 *     return cm.kMIDITransform_Scale
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_751get_midi_transform_scale(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_750get_midi_transform_scale, "get_midi_transform_scale()\n\nGet the 'Scale' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_751get_midi_transform_scale = {"get_midi_transform_scale", (PyCFunction)__pyx_pw_9coremusic_4capi_751get_midi_transform_scale, METH_NOARGS, __pyx_doc_9coremusic_4capi_750get_midi_transform_scale};
static PyObject *__pyx_pw_9coremusic_4capi_751get_midi_transform_scale(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_scale (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_750get_midi_transform_scale(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_750get_midi_transform_scale(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_scale", 0);

  /* "coremusic/capi.pyx":6908
 * def get_midi_transform_scale():
 *     """Get the 'Scale' transform type constant."""
 *     return cm.kMIDITransform_Scale             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_min_value():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_Scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6906
 *     return cm.kMIDITransform_Add
 * 
 * def get_midi_transform_scale():             # <<<<<<<<<<<<<<
 *     """Get the 'Scale' transform type constant."""
 *     return cm.kMIDITransform_Scale
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6910
 *     return cm.kMIDITransform_Scale
 * 
 * def get_midi_transform_min_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MinValue' transform type constant."""
 *     return cm.kMIDITransform_MinValue
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_753get_midi_transform_min_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_752get_midi_transform_min_value, "get_midi_transform_min_value()\n\nGet the 'MinValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_753get_midi_transform_min_value = {"get_midi_transform_min_value", (PyCFunction)__pyx_pw_9coremusic_4capi_753get_midi_transform_min_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_752get_midi_transform_min_value};
static PyObject *__pyx_pw_9coremusic_4capi_753get_midi_transform_min_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_min_value (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_752get_midi_transform_min_value(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_752get_midi_transform_min_value(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_min_value", 0);

  /* "coremusic/capi.pyx":6912
 * def get_midi_transform_min_value():
 *     """Get the 'MinValue' transform type constant."""
 *     return cm.kMIDITransform_MinValue             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_max_value():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_MinValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6910
 *     return cm.kMIDITransform_Scale
 * 
 * def get_midi_transform_min_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MinValue' transform type constant."""
 *     return cm.kMIDITransform_MinValue
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_min_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6914
 *     return cm.kMIDITransform_MinValue
 * 
 * def get_midi_transform_max_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MaxValue' transform type constant."""
 *     return cm.kMIDITransform_MaxValue
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_755get_midi_transform_max_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_754get_midi_transform_max_value, "get_midi_transform_max_value()\n\nGet the 'MaxValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_755get_midi_transform_max_value = {"get_midi_transform_max_value", (PyCFunction)__pyx_pw_9coremusic_4capi_755get_midi_transform_max_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_754get_midi_transform_max_value};
static PyObject *__pyx_pw_9coremusic_4capi_755get_midi_transform_max_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_max_value (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_754get_midi_transform_max_value(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_754get_midi_transform_max_value(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_max_value", 0);

  /* "coremusic/capi.pyx":6916
 * def get_midi_transform_max_value():
 *     """Get the 'MaxValue' transform type constant."""
 *     return cm.kMIDITransform_MaxValue             # <<<<<<<<<<<<<<
 * 
 * def get_midi_transform_map_value():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_MaxValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6914
 *     return cm.kMIDITransform_MinValue
 * 
 * def get_midi_transform_max_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MaxValue' transform type constant."""
 *     return cm.kMIDITransform_MaxValue
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_max_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6918
 *     return cm.kMIDITransform_MaxValue
 * 
 * def get_midi_transform_map_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MapValue' transform type constant."""
 *     return cm.kMIDITransform_MapValue
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_757get_midi_transform_map_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_756get_midi_transform_map_value, "get_midi_transform_map_value()\n\nGet the 'MapValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_757get_midi_transform_map_value = {"get_midi_transform_map_value", (PyCFunction)__pyx_pw_9coremusic_4capi_757get_midi_transform_map_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_756get_midi_transform_map_value};
static PyObject *__pyx_pw_9coremusic_4capi_757get_midi_transform_map_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_transform_map_value (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_756get_midi_transform_map_value(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_756get_midi_transform_map_value(CYTHON_UNUSED PyObject *__pyx_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_midi_transform_map_value", 0);

  /* "coremusic/capi.pyx":6920
 * def get_midi_transform_map_value():
 *     """Get the 'MapValue' transform type constant."""
 *     return cm.kMIDITransform_MapValue             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_7bit():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformType(kMIDITransform_MapValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6918
 *     return cm.kMIDITransform_MaxValue
 * 
 * def get_midi_transform_map_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MapValue' transform type constant."""
 *     return cm.kMIDITransform_MapValue
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_transform_map_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6922
 *     return cm.kMIDITransform_MapValue
 * 
 * def get_midi_control_type_7bit():             # <<<<<<<<<<<<<<
 *     """Get the '7Bit' control type constant."""
 *     return cm.kMIDIControlType_7Bit
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_759get_midi_control_type_7bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_758get_midi_control_type_7bit, "get_midi_control_type_7bit()\n\nGet the '7Bit' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_759get_midi_control_type_7bit = {"get_midi_control_type_7bit", (PyCFunction)__pyx_pw_9coremusic_4capi_759get_midi_control_type_7bit, METH_NOARGS, __pyx_doc_9coremusic_4capi_758get_midi_control_type_7bit};
static PyObject *__pyx_pw_9coremusic_4capi_759get_midi_control_type_7bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_7bit (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_758get_midi_control_type_7bit(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_758get_midi_control_type_7bit(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_7bit", 0);

  /* "coremusic/capi.pyx":6924
 * def get_midi_control_type_7bit():
 *     """Get the '7Bit' control type constant."""
 *     return cm.kMIDIControlType_7Bit             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_14bit():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_7Bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6922
 *     return cm.kMIDITransform_MapValue
 * 
 * def get_midi_control_type_7bit():             # <<<<<<<<<<<<<<
 *     """Get the '7Bit' control type constant."""
 *     return cm.kMIDIControlType_7Bit
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_7bit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6926
 *     return cm.kMIDIControlType_7Bit
 * 
 * def get_midi_control_type_14bit():             # <<<<<<<<<<<<<<
 *     """Get the '14Bit' control type constant."""
 *     return cm.kMIDIControlType_14Bit
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_761get_midi_control_type_14bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_760get_midi_control_type_14bit, "get_midi_control_type_14bit()\n\nGet the '14Bit' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_761get_midi_control_type_14bit = {"get_midi_control_type_14bit", (PyCFunction)__pyx_pw_9coremusic_4capi_761get_midi_control_type_14bit, METH_NOARGS, __pyx_doc_9coremusic_4capi_760get_midi_control_type_14bit};
static PyObject *__pyx_pw_9coremusic_4capi_761get_midi_control_type_14bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_14bit (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_760get_midi_control_type_14bit(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_760get_midi_control_type_14bit(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_14bit", 0);

  /* "coremusic/capi.pyx":6928
 * def get_midi_control_type_14bit():
 *     """Get the '14Bit' control type constant."""
 *     return cm.kMIDIControlType_14Bit             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_7bit_rpn():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_14Bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6926
 *     return cm.kMIDIControlType_7Bit
 * 
 * def get_midi_control_type_14bit():             # <<<<<<<<<<<<<<
 *     """Get the '14Bit' control type constant."""
 *     return cm.kMIDIControlType_14Bit
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_14bit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6930
 *     return cm.kMIDIControlType_14Bit
 * 
 * def get_midi_control_type_7bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitRPN
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_763get_midi_control_type_7bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_762get_midi_control_type_7bit_rpn, "get_midi_control_type_7bit_rpn()\n\nGet the '7BitRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_763get_midi_control_type_7bit_rpn = {"get_midi_control_type_7bit_rpn", (PyCFunction)__pyx_pw_9coremusic_4capi_763get_midi_control_type_7bit_rpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_762get_midi_control_type_7bit_rpn};
static PyObject *__pyx_pw_9coremusic_4capi_763get_midi_control_type_7bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_7bit_rpn (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_762get_midi_control_type_7bit_rpn(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_762get_midi_control_type_7bit_rpn(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_7bit_rpn", 0);

  /* "coremusic/capi.pyx":6932
 * def get_midi_control_type_7bit_rpn():
 *     """Get the '7BitRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitRPN             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_14bit_rpn():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_7BitRPN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6930
 *     return cm.kMIDIControlType_14Bit
 * 
 * def get_midi_control_type_7bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitRPN
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_7bit_rpn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6934
 *     return cm.kMIDIControlType_7BitRPN
 * 
 * def get_midi_control_type_14bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitRPN
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_765get_midi_control_type_14bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_764get_midi_control_type_14bit_rpn, "get_midi_control_type_14bit_rpn()\n\nGet the '14BitRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_765get_midi_control_type_14bit_rpn = {"get_midi_control_type_14bit_rpn", (PyCFunction)__pyx_pw_9coremusic_4capi_765get_midi_control_type_14bit_rpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_764get_midi_control_type_14bit_rpn};
static PyObject *__pyx_pw_9coremusic_4capi_765get_midi_control_type_14bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_14bit_rpn (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_764get_midi_control_type_14bit_rpn(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_764get_midi_control_type_14bit_rpn(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_14bit_rpn", 0);

  /* "coremusic/capi.pyx":6936
 * def get_midi_control_type_14bit_rpn():
 *     """Get the '14BitRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitRPN             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_7bit_nrpn():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_14BitRPN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6934
 *     return cm.kMIDIControlType_7BitRPN
 * 
 * def get_midi_control_type_14bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitRPN
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_14bit_rpn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6938
 *     return cm.kMIDIControlType_14BitRPN
 * 
 * def get_midi_control_type_7bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitNRPN
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_767get_midi_control_type_7bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_766get_midi_control_type_7bit_nrpn, "get_midi_control_type_7bit_nrpn()\n\nGet the '7BitNRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_767get_midi_control_type_7bit_nrpn = {"get_midi_control_type_7bit_nrpn", (PyCFunction)__pyx_pw_9coremusic_4capi_767get_midi_control_type_7bit_nrpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_766get_midi_control_type_7bit_nrpn};
static PyObject *__pyx_pw_9coremusic_4capi_767get_midi_control_type_7bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_7bit_nrpn (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_766get_midi_control_type_7bit_nrpn(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_766get_midi_control_type_7bit_nrpn(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_7bit_nrpn", 0);

  /* "coremusic/capi.pyx":6940
 * def get_midi_control_type_7bit_nrpn():
 *     """Get the '7BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitNRPN             # <<<<<<<<<<<<<<
 * 
 * def get_midi_control_type_14bit_nrpn():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_7BitNRPN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6938
 *     return cm.kMIDIControlType_14BitRPN
 * 
 * def get_midi_control_type_7bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitNRPN
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_7bit_nrpn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6942
 *     return cm.kMIDIControlType_7BitNRPN
 * 
 * def get_midi_control_type_14bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitNRPN
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_769get_midi_control_type_14bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_768get_midi_control_type_14bit_nrpn, "get_midi_control_type_14bit_nrpn()\n\nGet the '14BitNRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_769get_midi_control_type_14bit_nrpn = {"get_midi_control_type_14bit_nrpn", (PyCFunction)__pyx_pw_9coremusic_4capi_769get_midi_control_type_14bit_nrpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_768get_midi_control_type_14bit_nrpn};
static PyObject *__pyx_pw_9coremusic_4capi_769get_midi_control_type_14bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_control_type_14bit_nrpn (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_768get_midi_control_type_14bit_nrpn(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_768get_midi_control_type_14bit_nrpn(CYTHON_UNUSED PyObject *__pyx_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_midi_control_type_14bit_nrpn", 0);

  /* "coremusic/capi.pyx":6944
 * def get_midi_control_type_14bit_nrpn():
 *     """Get the '14BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitNRPN             # <<<<<<<<<<<<<<
 * 
 * def get_midi_thru_connection_max_endpoints():
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_MIDITransformControlType(kMIDIControlType_14BitNRPN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6942
 *     return cm.kMIDIControlType_7BitNRPN
 * 
 * def get_midi_control_type_14bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitNRPN
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_midi_control_type_14bit_nrpn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6946
 *     return cm.kMIDIControlType_14BitNRPN
 * 
 * def get_midi_thru_connection_max_endpoints():             # <<<<<<<<<<<<<<
 *     """Get the maximum number of endpoints for a thru connection."""
 *     return 8  # kMIDIThruConnection_MaxEndpoints
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_771get_midi_thru_connection_max_endpoints(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_770get_midi_thru_connection_max_endpoints, "get_midi_thru_connection_max_endpoints()\n\nGet the maximum number of endpoints for a thru connection.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_771get_midi_thru_connection_max_endpoints = {"get_midi_thru_connection_max_endpoints", (PyCFunction)__pyx_pw_9coremusic_4capi_771get_midi_thru_connection_max_endpoints, METH_NOARGS, __pyx_doc_9coremusic_4capi_770get_midi_thru_connection_max_endpoints};
static PyObject *__pyx_pw_9coremusic_4capi_771get_midi_thru_connection_max_endpoints(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_thru_connection_max_endpoints (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_770get_midi_thru_connection_max_endpoints(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_770get_midi_thru_connection_max_endpoints(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_thru_connection_max_endpoints", 0);

  /* "coremusic/capi.pyx":6948
 * def get_midi_thru_connection_max_endpoints():
 *     """Get the maximum number of endpoints for a thru connection."""
 *     return 8  # kMIDIThruConnection_MaxEndpoints             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_8);
  __pyx_r = __pyx_mstate_global->__pyx_int_8;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6946
 *     return cm.kMIDIControlType_14BitNRPN
 * 
 * def get_midi_thru_connection_max_endpoints():             # <<<<<<<<<<<<<<
 *     """Get the maximum number of endpoints for a thru connection."""
 *     return 8  # kMIDIThruConnection_MaxEndpoints
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6970
 *     cdef bint _is_disposed
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._object_id = 0
 *         self._is_disposed = False
*/

/* Python wrapper */
static int __pyx_pw_9coremusic_4capi_15CoreAudioObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9coremusic_4capi_15CoreAudioObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject___cinit__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9coremusic_4capi_15CoreAudioObject___cinit__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {
  int __pyx_r;

  /* "coremusic/capi.pyx":6971
 * 
 *     def __cinit__(self):
 *         self._object_id = 0             # <<<<<<<<<<<<<<
 *         self._is_disposed = False
 * 
*/
  __pyx_v_self->_object_id = 0;

  /* "coremusic/capi.pyx":6972
 *     def __cinit__(self):
 *         self._object_id = 0
 *         self._is_disposed = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __pyx_v_self->_is_disposed = 0;

  /* "coremusic/capi.pyx":6970
 *     cdef bint _is_disposed
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self._object_id = 0
 *         self._is_disposed = False
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "coremusic/capi.pyx":6974
 *         self._is_disposed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:
*/

/* Python wrapper */
static void __pyx_pw_9coremusic_4capi_15CoreAudioObject_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9coremusic_4capi_15CoreAudioObject_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_9coremusic_4capi_15CoreAudioObject_2__dealloc__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_9coremusic_4capi_15CoreAudioObject_2__dealloc__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "coremusic/capi.pyx":6976
 *     def __dealloc__(self):
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->_is_disposed);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":6977
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:
 *             self._dispose_internal()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
    ((struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject *)__pyx_v_self->__pyx_vtab)->_dispose_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6977, __pyx_L1_error)

    /* "coremusic/capi.pyx":6976
 *     def __dealloc__(self):
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  }

  /* "coremusic/capi.pyx":6974
 *         self._is_disposed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("coremusic.capi.CoreAudioObject.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "coremusic/capi.pyx":6979
 *             self._dispose_internal()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_disposed(self) -> bool:
 *         """Check if the object has been disposed"""
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_11is_disposed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_11is_disposed_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_11is_disposed___get__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_11is_disposed___get__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__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);

  /* "coremusic/capi.pyx":6982
 *     def is_disposed(self) -> bool:
 *         """Check if the object has been disposed"""
 *         return self._is_disposed             # <<<<<<<<<<<<<<
 * 
 *     def dispose(self) -> None:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_disposed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6979
 *             self._dispose_internal()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_disposed(self) -> bool:
 *         """Check if the object has been disposed"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.is_disposed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6984
 *         return self._is_disposed
 * 
 *     def dispose(self) -> None:             # <<<<<<<<<<<<<<
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_5dispose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_15CoreAudioObject_4dispose, "CoreAudioObject.dispose(self) -> None\n\nExplicitly dispose of the object's resources");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15CoreAudioObject_5dispose = {"dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_5dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_4dispose};
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_5dispose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("dispose", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("dispose", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_4dispose(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_4dispose(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dispose", 0);

  /* "coremusic/capi.pyx":6986
 *     def dispose(self) -> None:
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->_is_disposed);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":6987
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:
 *             self._dispose_internal()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _dispose_internal(self):
*/
    ((struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject *)__pyx_v_self->__pyx_vtab)->_dispose_internal(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6987, __pyx_L1_error)

    /* "coremusic/capi.pyx":6986
 *     def dispose(self) -> None:
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  }

  /* "coremusic/capi.pyx":6984
 *         return self._is_disposed
 * 
 *     def dispose(self) -> None:             # <<<<<<<<<<<<<<
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6989
 *             self._dispose_internal()
 * 
 *     cdef void _dispose_internal(self):             # <<<<<<<<<<<<<<
 *         """Internal disposal implementation"""
 *         self._is_disposed = True
*/

static void __pyx_f_9coremusic_4capi_15CoreAudioObject__dispose_internal(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {

  /* "coremusic/capi.pyx":6991
 *     cdef void _dispose_internal(self):
 *         """Internal disposal implementation"""
 *         self._is_disposed = True             # <<<<<<<<<<<<<<
 *         self._object_id = 0
 * 
*/
  __pyx_v_self->_is_disposed = 1;

  /* "coremusic/capi.pyx":6992
 *         """Internal disposal implementation"""
 *         self._is_disposed = True
 *         self._object_id = 0             # <<<<<<<<<<<<<<
 * 
 *     def _ensure_not_disposed(self) -> None:
*/
  __pyx_v_self->_object_id = 0;

  /* "coremusic/capi.pyx":6989
 *             self._dispose_internal()
 * 
 *     cdef void _dispose_internal(self):             # <<<<<<<<<<<<<<
 *         """Internal disposal implementation"""
 *         self._is_disposed = True
*/

  /* function exit code */
}

/* "coremusic/capi.pyx":6994
 *         self._object_id = 0
 * 
 *     def _ensure_not_disposed(self) -> None:             # <<<<<<<<<<<<<<
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed, "CoreAudioObject._ensure_not_disposed(self) -> None\n\nEnsure the object has not been disposed");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed = {"_ensure_not_disposed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed};
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_ensure_not_disposed (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_ensure_not_disposed", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_ensure_not_disposed", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ensure_not_disposed", 0);

  /* "coremusic/capi.pyx":6996
 *     def _ensure_not_disposed(self) -> None:
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{self.__class__.__name__} has been disposed")
 * 
*/
  if (unlikely(__pyx_v_self->_is_disposed)) {

    /* "coremusic/capi.pyx":6997
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:
 *             raise RuntimeError(f"{self.__class__.__name__} has been disposed")             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_has_been_disposed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6997, __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_ERR(0, 6997, __pyx_L1_error)

    /* "coremusic/capi.pyx":6996
 *     def _ensure_not_disposed(self) -> None:
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{self.__class__.__name__} has been disposed")
 * 
*/
  }

  /* "coremusic/capi.pyx":6994
 *         self._object_id = 0
 * 
 *     def _ensure_not_disposed(self) -> None:             # <<<<<<<<<<<<<<
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_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_4);
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject._ensure_not_disposed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":6999
 *             raise RuntimeError(f"{self.__class__.__name__} has been disposed")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def object_id(self) -> int:
 *         """Expose object ID for testing purposes"""
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_9object_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_9object_id_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_9object_id___get__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_9object_id___get__(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__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);

  /* "coremusic/capi.pyx":7002
 *     def object_id(self) -> int:
 *         """Expose object ID for testing purposes"""
 *         return self._object_id             # <<<<<<<<<<<<<<
 * 
 *     def _set_object_id(self, object_id: int) -> None:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_self->_object_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":6999
 *             raise RuntimeError(f"{self.__class__.__name__} has been disposed")
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def object_id(self) -> int:
 *         """Expose object ID for testing purposes"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.object_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7004
 *         return self._object_id
 * 
 *     def _set_object_id(self, object_id: int) -> None:             # <<<<<<<<<<<<<<
 *         """Set object ID (for internal use)"""
 *         self._object_id = object_id
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_9_set_object_id(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_15CoreAudioObject_8_set_object_id, "CoreAudioObject._set_object_id(self, int object_id: int) -> None\n\nSet object ID (for internal use)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15CoreAudioObject_9_set_object_id = {"_set_object_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_9_set_object_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_8_set_object_id};
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_9_set_object_id(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_object_id = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set_object_id (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_object_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7004, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7004, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_object_id", 0) < (0)) __PYX_ERR(0, 7004, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_object_id", 1, 1, 1, i); __PYX_ERR(0, 7004, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7004, __pyx_L3_error)
    }
    if (__Pyx_PyInt_FromNumber(&values[0], "object_id", 0) < (0)) __PYX_ERR(0, 7004, __pyx_L3_error)
    __pyx_v_object_id = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set_object_id", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7004, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject._set_object_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_object_id), (&PyLong_Type), 0, "object_id", 2))) __PYX_ERR(0, 7004, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_8_set_object_id(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self), __pyx_v_object_id);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_8_set_object_id(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self, PyObject *__pyx_v_object_id) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_object_id", 0);

  /* "coremusic/capi.pyx":7006
 *     def _set_object_id(self, object_id: int) -> None:
 *         """Set object ID (for internal use)"""
 *         self._object_id = object_id             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_long(__pyx_v_object_id); if (unlikely((__pyx_t_1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7006, __pyx_L1_error)
  __pyx_v_self->_object_id = __pyx_t_1;

  /* "coremusic/capi.pyx":7004
 *         return self._object_id
 * 
 *     def _set_object_id(self, object_id: int) -> None:             # <<<<<<<<<<<<<<
 *         """Set object ID (for internal use)"""
 *         self._object_id = object_id
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject._set_object_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__, "CoreAudioObject.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__, "CoreAudioObject.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__(((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.CoreAudioObject.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7013
 * # ============================================================================
 * 
 * def au_graph_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_773au_graph_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_772au_graph_new, "au_graph_new() -> int\n\nCreate a new AUGraph\n\nReturns:\n    AUGraph ID\n\nRaises:\n    RuntimeError: If graph creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_773au_graph_new = {"au_graph_new", (PyCFunction)__pyx_pw_9coremusic_4capi_773au_graph_new, METH_NOARGS, __pyx_doc_9coremusic_4capi_772au_graph_new};
static PyObject *__pyx_pw_9coremusic_4capi_773au_graph_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_new (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_772au_graph_new(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_772au_graph_new(CYTHON_UNUSED PyObject *__pyx_self) {
  AUGraph __pyx_v_graph;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_new", 0);

  /* "coremusic/capi.pyx":7025
 *     cdef cf.OSStatus status
 * 
 *     status = at.NewAUGraph(&graph)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewAUGraph"))
*/
  __pyx_v_status = NewAUGraph((&__pyx_v_graph));

  /* "coremusic/capi.pyx":7026
 * 
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewAUGraph"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7027
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "NewAUGraph"))             # <<<<<<<<<<<<<<
 * 
 *     return <long>graph
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_NewAUGraph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7027, __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_ERR(0, 7027, __pyx_L1_error)

    /* "coremusic/capi.pyx":7026
 * 
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "NewAUGraph"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7029
 *         raise RuntimeError(format_osstatus_error(status, "NewAUGraph"))
 * 
 *     return <long>graph             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_graph)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 7029, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7013
 * # ============================================================================
 * 
 * def au_graph_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AUGraph
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7032
 * 
 * 
 * def au_graph_dispose(long graph_id):             # <<<<<<<<<<<<<<
 *     """Dispose an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_775au_graph_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_774au_graph_dispose, "au_graph_dispose(long graph_id)\n\nDispose an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_775au_graph_dispose = {"au_graph_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_775au_graph_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_774au_graph_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_775au_graph_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7032, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7032, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_dispose", 0) < (0)) __PYX_ERR(0, 7032, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_dispose", 1, 1, 1, i); __PYX_ERR(0, 7032, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7032, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7032, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7032, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_774au_graph_dispose(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_774au_graph_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_dispose", 0);

  /* "coremusic/capi.pyx":7041
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeAUGraph"))
*/
  __pyx_v_status = DisposeAUGraph(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7042
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeAUGraph"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7043
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "DisposeAUGraph"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_DisposeAUGraph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7043, __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_ERR(0, 7043, __pyx_L1_error)

    /* "coremusic/capi.pyx":7042
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "DisposeAUGraph"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7032
 * 
 * 
 * def au_graph_dispose(long graph_id):             # <<<<<<<<<<<<<<
 *     """Dispose an AUGraph
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7046
 * 
 * 
 * def au_graph_open(long graph_id):             # <<<<<<<<<<<<<<
 *     """Open an AUGraph (opens AudioUnits but doesn't initialize)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_777au_graph_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_776au_graph_open, "au_graph_open(long graph_id)\n\nOpen an AUGraph (opens AudioUnits but doesn't initialize)\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If open fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_777au_graph_open = {"au_graph_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_777au_graph_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_776au_graph_open};
static PyObject *__pyx_pw_9coremusic_4capi_777au_graph_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_open (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7046, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7046, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_open", 0) < (0)) __PYX_ERR(0, 7046, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_open", 1, 1, 1, i); __PYX_ERR(0, 7046, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7046, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7046, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_open", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7046, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_776au_graph_open(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_776au_graph_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_open", 0);

  /* "coremusic/capi.pyx":7055
 *         RuntimeError: If open fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphOpen"))
*/
  __pyx_v_status = AUGraphOpen(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7056
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphOpen"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7057
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphOpen"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphOpen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7057, __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_ERR(0, 7057, __pyx_L1_error)

    /* "coremusic/capi.pyx":7056
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphOpen"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7046
 * 
 * 
 * def au_graph_open(long graph_id):             # <<<<<<<<<<<<<<
 *     """Open an AUGraph (opens AudioUnits but doesn't initialize)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7060
 * 
 * 
 * def au_graph_close(long graph_id):             # <<<<<<<<<<<<<<
 *     """Close an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_779au_graph_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_778au_graph_close, "au_graph_close(long graph_id)\n\nClose an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If close fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_779au_graph_close = {"au_graph_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_779au_graph_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_778au_graph_close};
static PyObject *__pyx_pw_9coremusic_4capi_779au_graph_close(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7060, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7060, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_close", 0) < (0)) __PYX_ERR(0, 7060, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_close", 1, 1, 1, i); __PYX_ERR(0, 7060, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7060, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7060, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7060, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_778au_graph_close(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_778au_graph_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_close", 0);

  /* "coremusic/capi.pyx":7069
 *         RuntimeError: If close fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClose"))
*/
  __pyx_v_status = AUGraphClose(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7070
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7071
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClose"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphClose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7071, __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_ERR(0, 7071, __pyx_L1_error)

    /* "coremusic/capi.pyx":7070
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7060
 * 
 * 
 * def au_graph_close(long graph_id):             # <<<<<<<<<<<<<<
 *     """Close an AUGraph
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7074
 * 
 * 
 * def au_graph_initialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Initialize an AUGraph (prepares for rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_781au_graph_initialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_780au_graph_initialize, "au_graph_initialize(long graph_id)\n\nInitialize an AUGraph (prepares for rendering)\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If initialization fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_781au_graph_initialize = {"au_graph_initialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_781au_graph_initialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_780au_graph_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_781au_graph_initialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_initialize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7074, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7074, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_initialize", 0) < (0)) __PYX_ERR(0, 7074, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_initialize", 1, 1, 1, i); __PYX_ERR(0, 7074, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7074, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7074, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_initialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7074, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_780au_graph_initialize(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_780au_graph_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_initialize", 0);

  /* "coremusic/capi.pyx":7083
 *         RuntimeError: If initialization fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphInitialize"))
*/
  __pyx_v_status = AUGraphInitialize(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7084
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphInitialize"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7085
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphInitialize"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphInitialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7085, __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_ERR(0, 7085, __pyx_L1_error)

    /* "coremusic/capi.pyx":7084
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphInitialize"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7074
 * 
 * 
 * def au_graph_initialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Initialize an AUGraph (prepares for rendering)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7088
 * 
 * 
 * def au_graph_uninitialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_783au_graph_uninitialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_782au_graph_uninitialize, "au_graph_uninitialize(long graph_id)\n\nUninitialize an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If uninitialization fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_783au_graph_uninitialize = {"au_graph_uninitialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_783au_graph_uninitialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_782au_graph_uninitialize};
static PyObject *__pyx_pw_9coremusic_4capi_783au_graph_uninitialize(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_uninitialize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7088, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7088, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_uninitialize", 0) < (0)) __PYX_ERR(0, 7088, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_uninitialize", 1, 1, 1, i); __PYX_ERR(0, 7088, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7088, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7088, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_uninitialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7088, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_uninitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_782au_graph_uninitialize(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_782au_graph_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_uninitialize", 0);

  /* "coremusic/capi.pyx":7097
 *         RuntimeError: If uninitialization fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUninitialize"))
*/
  __pyx_v_status = AUGraphUninitialize(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7098
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUninitialize"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7099
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUninitialize"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphUninitialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7099, __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_ERR(0, 7099, __pyx_L1_error)

    /* "coremusic/capi.pyx":7098
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUninitialize"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7088
 * 
 * 
 * def au_graph_uninitialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an AUGraph
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_uninitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7102
 * 
 * 
 * def au_graph_start(long graph_id):             # <<<<<<<<<<<<<<
 *     """Start an AUGraph (begins rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_785au_graph_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_784au_graph_start, "au_graph_start(long graph_id)\n\nStart an AUGraph (begins rendering)\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If start fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_785au_graph_start = {"au_graph_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_785au_graph_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_784au_graph_start};
static PyObject *__pyx_pw_9coremusic_4capi_785au_graph_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7102, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7102, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_start", 0) < (0)) __PYX_ERR(0, 7102, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_start", 1, 1, 1, i); __PYX_ERR(0, 7102, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7102, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7102, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7102, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_784au_graph_start(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_784au_graph_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_start", 0);

  /* "coremusic/capi.pyx":7111
 *         RuntimeError: If start fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStart"))
*/
  __pyx_v_status = AUGraphStart(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7112
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStart"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7113
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStart"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphStart); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7113, __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_ERR(0, 7113, __pyx_L1_error)

    /* "coremusic/capi.pyx":7112
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStart"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7102
 * 
 * 
 * def au_graph_start(long graph_id):             # <<<<<<<<<<<<<<
 *     """Start an AUGraph (begins rendering)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7116
 * 
 * 
 * def au_graph_stop(long graph_id):             # <<<<<<<<<<<<<<
 *     """Stop an AUGraph (stops rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_787au_graph_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_786au_graph_stop, "au_graph_stop(long graph_id)\n\nStop an AUGraph (stops rendering)\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If stop fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_787au_graph_stop = {"au_graph_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_787au_graph_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_786au_graph_stop};
static PyObject *__pyx_pw_9coremusic_4capi_787au_graph_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7116, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7116, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_stop", 0) < (0)) __PYX_ERR(0, 7116, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_stop", 1, 1, 1, i); __PYX_ERR(0, 7116, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7116, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7116, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7116, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_786au_graph_stop(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_786au_graph_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_stop", 0);

  /* "coremusic/capi.pyx":7125
 *         RuntimeError: If stop fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStop"))
*/
  __pyx_v_status = AUGraphStop(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7126
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStop"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7127
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStop"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphStop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7127, __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_ERR(0, 7127, __pyx_L1_error)

    /* "coremusic/capi.pyx":7126
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphStop"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7116
 * 
 * 
 * def au_graph_stop(long graph_id):             # <<<<<<<<<<<<<<
 *     """Stop an AUGraph (stops rendering)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7130
 * 
 * 
 * def au_graph_is_open(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is open
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_789au_graph_is_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_788au_graph_is_open, "au_graph_is_open(long graph_id) -> bool\n\nCheck if AUGraph is open\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    True if open, False otherwise\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_789au_graph_is_open = {"au_graph_is_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_789au_graph_is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_788au_graph_is_open};
static PyObject *__pyx_pw_9coremusic_4capi_789au_graph_is_open(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_is_open (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7130, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7130, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_is_open", 0) < (0)) __PYX_ERR(0, 7130, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_is_open", 1, 1, 1, i); __PYX_ERR(0, 7130, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7130, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7130, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_is_open", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7130, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_788au_graph_is_open(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_788au_graph_is_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Boolean __pyx_v_is_open;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_is_open", 0);

  /* "coremusic/capi.pyx":7143
 *     """
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsOpen"))
*/
  __pyx_v_status = AUGraphIsOpen(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_open));

  /* "coremusic/capi.pyx":7144
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsOpen"))
 *     return bool(is_open)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7145
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsOpen"))             # <<<<<<<<<<<<<<
 *     return bool(is_open)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphIsOpen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7145, __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_ERR(0, 7145, __pyx_L1_error)

    /* "coremusic/capi.pyx":7144
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsOpen"))
 *     return bool(is_open)
*/
  }

  /* "coremusic/capi.pyx":7146
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsOpen"))
 *     return bool(is_open)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_open != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7130
 * 
 * 
 * def au_graph_is_open(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is open
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7149
 * 
 * 
 * def au_graph_is_initialized(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is initialized
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_791au_graph_is_initialized(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_790au_graph_is_initialized, "au_graph_is_initialized(long graph_id) -> bool\n\nCheck if AUGraph is initialized\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    True if initialized, False otherwise\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_791au_graph_is_initialized = {"au_graph_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_791au_graph_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_790au_graph_is_initialized};
static PyObject *__pyx_pw_9coremusic_4capi_791au_graph_is_initialized(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_is_initialized (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7149, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_is_initialized", 0) < (0)) __PYX_ERR(0, 7149, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_is_initialized", 1, 1, 1, i); __PYX_ERR(0, 7149, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7149, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7149, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_is_initialized", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_790au_graph_is_initialized(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_790au_graph_is_initialized(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Boolean __pyx_v_is_initialized;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_is_initialized", 0);

  /* "coremusic/capi.pyx":7162
 *     """
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsInitialized"))
*/
  __pyx_v_status = AUGraphIsInitialized(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_initialized));

  /* "coremusic/capi.pyx":7163
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsInitialized"))
 *     return bool(is_initialized)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7164
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsInitialized"))             # <<<<<<<<<<<<<<
 *     return bool(is_initialized)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphIsInitialized); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7164, __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_ERR(0, 7164, __pyx_L1_error)

    /* "coremusic/capi.pyx":7163
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsInitialized"))
 *     return bool(is_initialized)
*/
  }

  /* "coremusic/capi.pyx":7165
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsInitialized"))
 *     return bool(is_initialized)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_initialized != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7149
 * 
 * 
 * def au_graph_is_initialized(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is initialized
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7168
 * 
 * 
 * def au_graph_is_running(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is running
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_793au_graph_is_running(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_792au_graph_is_running, "au_graph_is_running(long graph_id) -> bool\n\nCheck if AUGraph is running\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    True if running, False otherwise\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_793au_graph_is_running = {"au_graph_is_running", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_793au_graph_is_running, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_792au_graph_is_running};
static PyObject *__pyx_pw_9coremusic_4capi_793au_graph_is_running(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_is_running (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7168, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7168, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_is_running", 0) < (0)) __PYX_ERR(0, 7168, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_is_running", 1, 1, 1, i); __PYX_ERR(0, 7168, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7168, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7168, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_is_running", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7168, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_running", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_792au_graph_is_running(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_792au_graph_is_running(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Boolean __pyx_v_is_running;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_is_running", 0);

  /* "coremusic/capi.pyx":7181
 *     """
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsRunning"))
*/
  __pyx_v_status = AUGraphIsRunning(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_running));

  /* "coremusic/capi.pyx":7182
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsRunning"))
 *     return bool(is_running)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7183
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsRunning"))             # <<<<<<<<<<<<<<
 *     return bool(is_running)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphIsRunning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7183, __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_ERR(0, 7183, __pyx_L1_error)

    /* "coremusic/capi.pyx":7182
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsRunning"))
 *     return bool(is_running)
*/
  }

  /* "coremusic/capi.pyx":7184
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphIsRunning"))
 *     return bool(is_running)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_running != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7168
 * 
 * 
 * def au_graph_is_running(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is running
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_is_running", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7187
 * 
 * 
 * def au_graph_add_node(long graph_id, dict description) -> int:             # <<<<<<<<<<<<<<
 *     """Add a node to an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_795au_graph_add_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_794au_graph_add_node, "au_graph_add_node(long graph_id, dict description) -> int\n\nAdd a node to an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n    description: AudioComponentDescription as dict with keys:\n                'type', 'subtype', 'manufacturer', 'flags', 'flags_mask'\n\nReturns:\n    Node ID\n\nRaises:\n    RuntimeError: If adding node fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_795au_graph_add_node = {"au_graph_add_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_795au_graph_add_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_794au_graph_add_node};
static PyObject *__pyx_pw_9coremusic_4capi_795au_graph_add_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  PyObject *__pyx_v_description = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_add_node (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_description,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7187, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7187, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7187, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_add_node", 0) < (0)) __PYX_ERR(0, 7187, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_add_node", 1, 2, 2, i); __PYX_ERR(0, 7187, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7187, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7187, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7187, __pyx_L3_error)
    __pyx_v_description = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_add_node", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7187, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_add_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_description), (&PyDict_Type), 1, "description", 1))) __PYX_ERR(0, 7187, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_794au_graph_add_node(__pyx_self, __pyx_v_graph_id, __pyx_v_description);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_794au_graph_add_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, PyObject *__pyx_v_description) {
  AudioComponentDescription __pyx_v_desc;
  AUNode __pyx_v_node;
  OSStatus __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  UInt32 __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_add_node", 0);

  /* "coremusic/capi.pyx":7206
 * 
 *     # Convert dict to AudioComponentDescription
 *     desc.componentType = description['type']             # <<<<<<<<<<<<<<
 *     desc.componentSubType = description['subtype']
 *     desc.componentManufacturer = description['manufacturer']
*/
  if (unlikely(__pyx_v_description == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 7206, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_description, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentType = __pyx_t_2;

  /* "coremusic/capi.pyx":7207
 *     # Convert dict to AudioComponentDescription
 *     desc.componentType = description['type']
 *     desc.componentSubType = description['subtype']             # <<<<<<<<<<<<<<
 *     desc.componentManufacturer = description['manufacturer']
 *     desc.componentFlags = description.get('flags', 0)
*/
  if (unlikely(__pyx_v_description == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 7207, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_description, __pyx_mstate_global->__pyx_n_u_subtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentSubType = __pyx_t_2;

  /* "coremusic/capi.pyx":7208
 *     desc.componentType = description['type']
 *     desc.componentSubType = description['subtype']
 *     desc.componentManufacturer = description['manufacturer']             # <<<<<<<<<<<<<<
 *     desc.componentFlags = description.get('flags', 0)
 *     desc.componentFlagsMask = description.get('flags_mask', 0)
*/
  if (unlikely(__pyx_v_description == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 7208, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_description, __pyx_mstate_global->__pyx_n_u_manufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentManufacturer = __pyx_t_2;

  /* "coremusic/capi.pyx":7209
 *     desc.componentSubType = description['subtype']
 *     desc.componentManufacturer = description['manufacturer']
 *     desc.componentFlags = description.get('flags', 0)             # <<<<<<<<<<<<<<
 *     desc.componentFlagsMask = description.get('flags_mask', 0)
 * 
*/
  if (unlikely(__pyx_v_description == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 7209, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_description, __pyx_mstate_global->__pyx_n_u_flags, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentFlags = __pyx_t_2;

  /* "coremusic/capi.pyx":7210
 *     desc.componentManufacturer = description['manufacturer']
 *     desc.componentFlags = description.get('flags', 0)
 *     desc.componentFlagsMask = description.get('flags_mask', 0)             # <<<<<<<<<<<<<<
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
*/
  if (unlikely(__pyx_v_description == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 7210, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_description, __pyx_mstate_global->__pyx_n_u_flags_mask, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_2 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 7210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentFlagsMask = __pyx_t_2;

  /* "coremusic/capi.pyx":7212
 *     desc.componentFlagsMask = description.get('flags_mask', 0)
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphAddNode"))
*/
  __pyx_v_status = AUGraphAddNode(((AUGraph)__pyx_v_graph_id), (&__pyx_v_desc), (&__pyx_v_node));

  /* "coremusic/capi.pyx":7213
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphAddNode"))
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":7214
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphAddNode"))             # <<<<<<<<<<<<<<
 * 
 *     return node
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphAddNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7214, __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_ERR(0, 7214, __pyx_L1_error)

    /* "coremusic/capi.pyx":7213
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphAddNode"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7216
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphAddNode"))
 * 
 *     return node             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7216, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7187
 * 
 * 
 * def au_graph_add_node(long graph_id, dict description) -> int:             # <<<<<<<<<<<<<<
 *     """Add a node to an AUGraph
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("coremusic.capi.au_graph_add_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7219
 * 
 * 
 * def au_graph_remove_node(long graph_id, int node_id):             # <<<<<<<<<<<<<<
 *     """Remove a node from an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_797au_graph_remove_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_796au_graph_remove_node, "au_graph_remove_node(long graph_id, int node_id)\n\nRemove a node from an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n    node_id: Node ID to remove\n\nRaises:\n    RuntimeError: If removing node fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_797au_graph_remove_node = {"au_graph_remove_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_797au_graph_remove_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_796au_graph_remove_node};
static PyObject *__pyx_pw_9coremusic_4capi_797au_graph_remove_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  int __pyx_v_node_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_remove_node (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_node_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7219, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7219, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7219, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_remove_node", 0) < (0)) __PYX_ERR(0, 7219, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_remove_node", 1, 2, 2, i); __PYX_ERR(0, 7219, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7219, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7219, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7219, __pyx_L3_error)
    __pyx_v_node_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_node_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7219, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_remove_node", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7219, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_remove_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_796au_graph_remove_node(__pyx_self, __pyx_v_graph_id, __pyx_v_node_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_796au_graph_remove_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_node_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_remove_node", 0);

  /* "coremusic/capi.pyx":7229
 *         RuntimeError: If removing node fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphRemoveNode"))
*/
  __pyx_v_status = AUGraphRemoveNode(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_node_id));

  /* "coremusic/capi.pyx":7230
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphRemoveNode"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7231
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphRemoveNode"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphRemoveNode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7231, __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_ERR(0, 7231, __pyx_L1_error)

    /* "coremusic/capi.pyx":7230
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphRemoveNode"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7219
 * 
 * 
 * def au_graph_remove_node(long graph_id, int node_id):             # <<<<<<<<<<<<<<
 *     """Remove a node from an AUGraph
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_remove_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7234
 * 
 * 
 * def au_graph_get_node_count(long graph_id) -> int:             # <<<<<<<<<<<<<<
 *     """Get the number of nodes in an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_799au_graph_get_node_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_798au_graph_get_node_count, "au_graph_get_node_count(long graph_id) -> int\n\nGet the number of nodes in an AUGraph\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    Number of nodes\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_799au_graph_get_node_count = {"au_graph_get_node_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_799au_graph_get_node_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_798au_graph_get_node_count};
static PyObject *__pyx_pw_9coremusic_4capi_799au_graph_get_node_count(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_get_node_count (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7234, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7234, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_get_node_count", 0) < (0)) __PYX_ERR(0, 7234, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_get_node_count", 1, 1, 1, i); __PYX_ERR(0, 7234, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7234, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7234, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_get_node_count", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7234, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_node_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_798au_graph_get_node_count(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_798au_graph_get_node_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  UInt32 __pyx_v_count;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_get_node_count", 0);

  /* "coremusic/capi.pyx":7247
 *     """
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetNodeCount"))
*/
  __pyx_v_status = AUGraphGetNodeCount(((AUGraph)__pyx_v_graph_id), (&__pyx_v_count));

  /* "coremusic/capi.pyx":7248
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetNodeCount"))
 *     return count
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7249
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetNodeCount"))             # <<<<<<<<<<<<<<
 *     return count
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphGetNodeCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7249, __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_ERR(0, 7249, __pyx_L1_error)

    /* "coremusic/capi.pyx":7248
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetNodeCount"))
 *     return count
*/
  }

  /* "coremusic/capi.pyx":7250
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetNodeCount"))
 *     return count             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 7250, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7234
 * 
 * 
 * def au_graph_get_node_count(long graph_id) -> int:             # <<<<<<<<<<<<<<
 *     """Get the number of nodes in an AUGraph
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_node_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7253
 * 
 * 
 * def au_graph_get_ind_node(long graph_id, int index) -> int:             # <<<<<<<<<<<<<<
 *     """Get node at index
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_801au_graph_get_ind_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_800au_graph_get_ind_node, "au_graph_get_ind_node(long graph_id, int index) -> int\n\nGet node at index\n\nArgs:\n    graph_id: AUGraph ID\n    index: Node index\n\nReturns:\n    Node ID\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_801au_graph_get_ind_node = {"au_graph_get_ind_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_801au_graph_get_ind_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_800au_graph_get_ind_node};
static PyObject *__pyx_pw_9coremusic_4capi_801au_graph_get_ind_node(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  int __pyx_v_index;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_get_ind_node (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_index,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7253, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7253, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7253, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_get_ind_node", 0) < (0)) __PYX_ERR(0, 7253, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_get_ind_node", 1, 2, 2, i); __PYX_ERR(0, 7253, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7253, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7253, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7253, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7253, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_get_ind_node", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7253, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_ind_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_800au_graph_get_ind_node(__pyx_self, __pyx_v_graph_id, __pyx_v_index);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_800au_graph_get_ind_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_index) {
  AUNode __pyx_v_node;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_get_ind_node", 0);

  /* "coremusic/capi.pyx":7267
 *     """
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetIndNode"))
*/
  __pyx_v_status = AUGraphGetIndNode(((AUGraph)__pyx_v_graph_id), __pyx_v_index, (&__pyx_v_node));

  /* "coremusic/capi.pyx":7268
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetIndNode"))
 *     return node
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7269
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetIndNode"))             # <<<<<<<<<<<<<<
 *     return node
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphGetIndNode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7269, __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_ERR(0, 7269, __pyx_L1_error)

    /* "coremusic/capi.pyx":7268
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetIndNode"))
 *     return node
*/
  }

  /* "coremusic/capi.pyx":7270
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetIndNode"))
 *     return node             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 7270, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7253
 * 
 * 
 * def au_graph_get_ind_node(long graph_id, int index) -> int:             # <<<<<<<<<<<<<<
 *     """Get node at index
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_ind_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7273
 * 
 * 
 * def au_graph_node_info(long graph_id, int node_id) -> tuple:             # <<<<<<<<<<<<<<
 *     """Get information about a node
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_803au_graph_node_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_802au_graph_node_info, "au_graph_node_info(long graph_id, int node_id) -> tuple\n\nGet information about a node\n\nArgs:\n    graph_id: AUGraph ID\n    node_id: Node ID\n\nReturns:\n    Tuple of (description_dict, audio_unit_id)\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_803au_graph_node_info = {"au_graph_node_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_803au_graph_node_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_802au_graph_node_info};
static PyObject *__pyx_pw_9coremusic_4capi_803au_graph_node_info(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  int __pyx_v_node_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_node_info (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_node_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_node_info", 0) < (0)) __PYX_ERR(0, 7273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_node_info", 1, 2, 2, i); __PYX_ERR(0, 7273, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7273, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7273, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7273, __pyx_L3_error)
    __pyx_v_node_id = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_node_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7273, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_node_info", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_node_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_802au_graph_node_info(__pyx_self, __pyx_v_graph_id, __pyx_v_node_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_802au_graph_node_info(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_node_id) {
  AudioComponentDescription __pyx_v_desc;
  AudioUnit __pyx_v_audio_unit;
  OSStatus __pyx_v_status;
  PyObject *__pyx_v_desc_dict = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_node_info", 0);

  /* "coremusic/capi.pyx":7290
 *     cdef cf.OSStatus status
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphNodeInfo"))
*/
  __pyx_v_status = AUGraphNodeInfo(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_node_id), (&__pyx_v_desc), (&__pyx_v_audio_unit));

  /* "coremusic/capi.pyx":7291
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphNodeInfo"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7292
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphNodeInfo"))             # <<<<<<<<<<<<<<
 * 
 *     desc_dict = {
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphNodeInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7292, __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_ERR(0, 7292, __pyx_L1_error)

    /* "coremusic/capi.pyx":7291
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphNodeInfo"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7295
 * 
 *     desc_dict = {
 *         'type': desc.componentType,             # <<<<<<<<<<<<<<
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_4) < (0)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":7296
 *     desc_dict = {
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,             # <<<<<<<<<<<<<<
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentSubType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_subtype, __pyx_t_4) < (0)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":7297
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,             # <<<<<<<<<<<<<<
 *         'flags': desc.componentFlags,
 *         'flags_mask': desc.componentFlagsMask
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentManufacturer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_manufacturer, __pyx_t_4) < (0)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":7298
 *         'subtype': desc.componentSubType,
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,             # <<<<<<<<<<<<<<
 *         'flags_mask': desc.componentFlagsMask
 *     }
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":7299
 *         'manufacturer': desc.componentManufacturer,
 *         'flags': desc.componentFlags,
 *         'flags_mask': desc.componentFlagsMask             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc.componentFlagsMask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags_mask, __pyx_t_4) < (0)) __PYX_ERR(0, 7295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_desc_dict = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":7302
 *     }
 * 
 *     return (desc_dict, <long>audio_unit)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_audio_unit)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_desc_dict);
  __Pyx_GIVEREF(__pyx_v_desc_dict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_desc_dict) != (0)) __PYX_ERR(0, 7302, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 7302, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7273
 * 
 * 
 * def au_graph_node_info(long graph_id, int node_id) -> tuple:             # <<<<<<<<<<<<<<
 *     """Get information about a node
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_node_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_desc_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7305
 * 
 * 
 * def au_graph_connect_node_input(long graph_id, int source_node, int source_output,             # <<<<<<<<<<<<<<
 *                                   int dest_node, int dest_input):
 *     """Connect two nodes
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_805au_graph_connect_node_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_804au_graph_connect_node_input, "au_graph_connect_node_input(long graph_id, int source_node, int source_output, int dest_node, int dest_input)\n\nConnect two nodes\n\nArgs:\n    graph_id: AUGraph ID\n    source_node: Source node ID\n    source_output: Source output bus number\n    dest_node: Destination node ID\n    dest_input: Destination input bus number\n\nRaises:\n    RuntimeError: If connection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_805au_graph_connect_node_input = {"au_graph_connect_node_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_805au_graph_connect_node_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_804au_graph_connect_node_input};
static PyObject *__pyx_pw_9coremusic_4capi_805au_graph_connect_node_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  int __pyx_v_source_node;
  int __pyx_v_source_output;
  int __pyx_v_dest_node;
  int __pyx_v_dest_input;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_connect_node_input (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_source_node,&__pyx_mstate_global->__pyx_n_u_source_output,&__pyx_mstate_global->__pyx_n_u_dest_node,&__pyx_mstate_global->__pyx_n_u_dest_input,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7305, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 7305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_connect_node_input", 0) < (0)) __PYX_ERR(0, 7305, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_connect_node_input", 1, 5, 5, i); __PYX_ERR(0, 7305, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7305, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7305, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7305, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7305, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 7305, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7305, __pyx_L3_error)
    __pyx_v_source_node = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_source_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7305, __pyx_L3_error)
    __pyx_v_source_output = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_source_output == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7305, __pyx_L3_error)
    __pyx_v_dest_node = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_dest_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7306, __pyx_L3_error)
    __pyx_v_dest_input = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_dest_input == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7306, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_connect_node_input", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 7305, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_connect_node_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_804au_graph_connect_node_input(__pyx_self, __pyx_v_graph_id, __pyx_v_source_node, __pyx_v_source_output, __pyx_v_dest_node, __pyx_v_dest_input);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_804au_graph_connect_node_input(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_source_node, int __pyx_v_source_output, int __pyx_v_dest_node, int __pyx_v_dest_input) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_connect_node_input", 0);

  /* "coremusic/capi.pyx":7321
 *     cdef cf.OSStatus status
 * 
 *     status = at.AUGraphConnectNodeInput(             # <<<<<<<<<<<<<<
 *         <at.AUGraph>graph_id,
 *         <at.AUNode>source_node,
*/
  __pyx_v_status = AUGraphConnectNodeInput(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_source_node), __pyx_v_source_output, ((AUNode)__pyx_v_dest_node), __pyx_v_dest_input);

  /* "coremusic/capi.pyx":7328
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphConnectNodeInput"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7329
 *     )
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphConnectNodeInput"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphConnectNodeInput); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7329, __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_ERR(0, 7329, __pyx_L1_error)

    /* "coremusic/capi.pyx":7328
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphConnectNodeInput"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7305
 * 
 * 
 * def au_graph_connect_node_input(long graph_id, int source_node, int source_output,             # <<<<<<<<<<<<<<
 *                                   int dest_node, int dest_input):
 *     """Connect two nodes
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_connect_node_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7332
 * 
 * 
 * def au_graph_disconnect_node_input(long graph_id, int dest_node, int dest_input):             # <<<<<<<<<<<<<<
 *     """Disconnect a node's input
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_807au_graph_disconnect_node_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_806au_graph_disconnect_node_input, "au_graph_disconnect_node_input(long graph_id, int dest_node, int dest_input)\n\nDisconnect a node's input\n\nArgs:\n    graph_id: AUGraph ID\n    dest_node: Destination node ID\n    dest_input: Destination input bus number\n\nRaises:\n    RuntimeError: If disconnection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_807au_graph_disconnect_node_input = {"au_graph_disconnect_node_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_807au_graph_disconnect_node_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_806au_graph_disconnect_node_input};
static PyObject *__pyx_pw_9coremusic_4capi_807au_graph_disconnect_node_input(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  int __pyx_v_dest_node;
  int __pyx_v_dest_input;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_disconnect_node_input (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,&__pyx_mstate_global->__pyx_n_u_dest_node,&__pyx_mstate_global->__pyx_n_u_dest_input,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7332, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7332, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7332, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7332, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_disconnect_node_input", 0) < (0)) __PYX_ERR(0, 7332, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_disconnect_node_input", 1, 3, 3, i); __PYX_ERR(0, 7332, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7332, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7332, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7332, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7332, __pyx_L3_error)
    __pyx_v_dest_node = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_dest_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7332, __pyx_L3_error)
    __pyx_v_dest_input = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_dest_input == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7332, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_disconnect_node_input", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 7332, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_disconnect_node_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_806au_graph_disconnect_node_input(__pyx_self, __pyx_v_graph_id, __pyx_v_dest_node, __pyx_v_dest_input);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_806au_graph_disconnect_node_input(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, int __pyx_v_dest_node, int __pyx_v_dest_input) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_disconnect_node_input", 0);

  /* "coremusic/capi.pyx":7345
 *     cdef cf.OSStatus status
 * 
 *     status = at.AUGraphDisconnectNodeInput(             # <<<<<<<<<<<<<<
 *         <at.AUGraph>graph_id,
 *         <at.AUNode>dest_node,
*/
  __pyx_v_status = AUGraphDisconnectNodeInput(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_dest_node), __pyx_v_dest_input);

  /* "coremusic/capi.pyx":7350
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphDisconnectNodeInput"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7351
 *     )
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphDisconnectNodeInput"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphDisconnectNodeInput); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7351, __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_ERR(0, 7351, __pyx_L1_error)

    /* "coremusic/capi.pyx":7350
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphDisconnectNodeInput"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7332
 * 
 * 
 * def au_graph_disconnect_node_input(long graph_id, int dest_node, int dest_input):             # <<<<<<<<<<<<<<
 *     """Disconnect a node's input
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_disconnect_node_input", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7354
 * 
 * 
 * def au_graph_clear_connections(long graph_id):             # <<<<<<<<<<<<<<
 *     """Clear all connections in a graph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_809au_graph_clear_connections(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_808au_graph_clear_connections, "au_graph_clear_connections(long graph_id)\n\nClear all connections in a graph\n\nArgs:\n    graph_id: AUGraph ID\n\nRaises:\n    RuntimeError: If clearing connections fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_809au_graph_clear_connections = {"au_graph_clear_connections", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_809au_graph_clear_connections, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_808au_graph_clear_connections};
static PyObject *__pyx_pw_9coremusic_4capi_809au_graph_clear_connections(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_clear_connections (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7354, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_clear_connections", 0) < (0)) __PYX_ERR(0, 7354, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_clear_connections", 1, 1, 1, i); __PYX_ERR(0, 7354, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7354, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7354, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_clear_connections", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7354, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_clear_connections", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_808au_graph_clear_connections(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_808au_graph_clear_connections(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_clear_connections", 0);

  /* "coremusic/capi.pyx":7363
 *         RuntimeError: If clearing connections fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClearConnections"))
*/
  __pyx_v_status = AUGraphClearConnections(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":7364
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClearConnections"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7365
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClearConnections"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphClearConnections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7365, __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_ERR(0, 7365, __pyx_L1_error)

    /* "coremusic/capi.pyx":7364
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphClearConnections"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7354
 * 
 * 
 * def au_graph_clear_connections(long graph_id):             # <<<<<<<<<<<<<<
 *     """Clear all connections in a graph
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_clear_connections", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7368
 * 
 * 
 * def au_graph_update(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Update the graph after making changes
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_811au_graph_update(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_810au_graph_update, "au_graph_update(long graph_id) -> bool\n\nUpdate the graph after making changes\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    True if update completed, False if pending\n\nRaises:\n    RuntimeError: If update fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_811au_graph_update = {"au_graph_update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_811au_graph_update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_810au_graph_update};
static PyObject *__pyx_pw_9coremusic_4capi_811au_graph_update(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_update (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7368, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7368, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_update", 0) < (0)) __PYX_ERR(0, 7368, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_update", 1, 1, 1, i); __PYX_ERR(0, 7368, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7368, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7368, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7368, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_810au_graph_update(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_810au_graph_update(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Boolean __pyx_v_is_updated;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_update", 0);

  /* "coremusic/capi.pyx":7381
 *     """
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUpdate"))
*/
  __pyx_v_status = AUGraphUpdate(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_updated));

  /* "coremusic/capi.pyx":7382
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUpdate"))
 *     return bool(is_updated)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7383
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUpdate"))             # <<<<<<<<<<<<<<
 *     return bool(is_updated)
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphUpdate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7383, __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_ERR(0, 7383, __pyx_L1_error)

    /* "coremusic/capi.pyx":7382
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUpdate"))
 *     return bool(is_updated)
*/
  }

  /* "coremusic/capi.pyx":7384
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphUpdate"))
 *     return bool(is_updated)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_v_is_updated != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7368
 * 
 * 
 * def au_graph_update(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Update the graph after making changes
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7387
 * 
 * 
 * def au_graph_get_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current CPU load of the graph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_813au_graph_get_cpu_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_812au_graph_get_cpu_load, "au_graph_get_cpu_load(long graph_id) -> float\n\nGet current CPU load of the graph\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    CPU load as percentage (0.0-1.0)\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_813au_graph_get_cpu_load = {"au_graph_get_cpu_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_813au_graph_get_cpu_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_812au_graph_get_cpu_load};
static PyObject *__pyx_pw_9coremusic_4capi_813au_graph_get_cpu_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_get_cpu_load (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7387, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7387, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_get_cpu_load", 0) < (0)) __PYX_ERR(0, 7387, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_get_cpu_load", 1, 1, 1, i); __PYX_ERR(0, 7387, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7387, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7387, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_get_cpu_load", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7387, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_cpu_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_812au_graph_get_cpu_load(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_812au_graph_get_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Float32 __pyx_v_cpu_load;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_get_cpu_load", 0);

  /* "coremusic/capi.pyx":7400
 *     """
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetCPULoad"))
*/
  __pyx_v_status = AUGraphGetCPULoad(((AUGraph)__pyx_v_graph_id), (&__pyx_v_cpu_load));

  /* "coremusic/capi.pyx":7401
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetCPULoad"))
 *     return cpu_load
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7402
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetCPULoad"))             # <<<<<<<<<<<<<<
 *     return cpu_load
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphGetCPULoad); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7402, __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_ERR(0, 7402, __pyx_L1_error)

    /* "coremusic/capi.pyx":7401
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetCPULoad"))
 *     return cpu_load
*/
  }

  /* "coremusic/capi.pyx":7403
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetCPULoad"))
 *     return cpu_load             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cpu_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7387
 * 
 * 
 * def au_graph_get_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current CPU load of the graph
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_cpu_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7406
 * 
 * 
 * def au_graph_get_max_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get maximum CPU load of the graph since last query
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_815au_graph_get_max_cpu_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_814au_graph_get_max_cpu_load, "au_graph_get_max_cpu_load(long graph_id) -> float\n\nGet maximum CPU load of the graph since last query\n\nArgs:\n    graph_id: AUGraph ID\n\nReturns:\n    Maximum CPU load as percentage (0.0-1.0)\n\nRaises:\n    RuntimeError: If query fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_815au_graph_get_max_cpu_load = {"au_graph_get_max_cpu_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_815au_graph_get_max_cpu_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_814au_graph_get_max_cpu_load};
static PyObject *__pyx_pw_9coremusic_4capi_815au_graph_get_max_cpu_load(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_graph_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("au_graph_get_max_cpu_load (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_graph_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7406, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7406, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "au_graph_get_max_cpu_load", 0) < (0)) __PYX_ERR(0, 7406, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("au_graph_get_max_cpu_load", 1, 1, 1, i); __PYX_ERR(0, 7406, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7406, __pyx_L3_error)
    }
    __pyx_v_graph_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_graph_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7406, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_get_max_cpu_load", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7406, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_max_cpu_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_814au_graph_get_max_cpu_load(__pyx_self, __pyx_v_graph_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_814au_graph_get_max_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id) {
  Float32 __pyx_v_max_load;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("au_graph_get_max_cpu_load", 0);

  /* "coremusic/capi.pyx":7419
 *     """
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetMaxCPULoad"))
*/
  __pyx_v_status = AUGraphGetMaxCPULoad(((AUGraph)__pyx_v_graph_id), (&__pyx_v_max_load));

  /* "coremusic/capi.pyx":7420
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetMaxCPULoad"))
 *     return max_load
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7421
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetMaxCPULoad"))             # <<<<<<<<<<<<<<
 *     return max_load
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_AUGraphGetMaxCPULoad); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7421, __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_ERR(0, 7421, __pyx_L1_error)

    /* "coremusic/capi.pyx":7420
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetMaxCPULoad"))
 *     return max_load
*/
  }

  /* "coremusic/capi.pyx":7422
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "AUGraphGetMaxCPULoad"))
 *     return max_load             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_max_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7406
 * 
 * 
 * def au_graph_get_max_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get maximum CPU load of the graph since last query
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.au_graph_get_max_cpu_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7426
 * 
 * # AUGraph error code getters
 * def get_au_graph_err_node_not_found() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for node not found"""
 *     return -10860
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_817get_au_graph_err_node_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_816get_au_graph_err_node_not_found, "get_au_graph_err_node_not_found() -> int\n\nGet error code for node not found");
static PyMethodDef __pyx_mdef_9coremusic_4capi_817get_au_graph_err_node_not_found = {"get_au_graph_err_node_not_found", (PyCFunction)__pyx_pw_9coremusic_4capi_817get_au_graph_err_node_not_found, METH_NOARGS, __pyx_doc_9coremusic_4capi_816get_au_graph_err_node_not_found};
static PyObject *__pyx_pw_9coremusic_4capi_817get_au_graph_err_node_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_node_not_found (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_816get_au_graph_err_node_not_found(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_816get_au_graph_err_node_not_found(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_node_not_found", 0);

  /* "coremusic/capi.pyx":7428
 * def get_au_graph_err_node_not_found() -> int:
 *     """Get error code for node not found"""
 *     return -10860             # <<<<<<<<<<<<<<
 * 
 * def get_au_graph_err_invalid_connection() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_10860);
  __pyx_r = __pyx_mstate_global->__pyx_int_neg_10860;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7426
 * 
 * # AUGraph error code getters
 * def get_au_graph_err_node_not_found() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for node not found"""
 *     return -10860
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7430
 *     return -10860
 * 
 * def get_au_graph_err_invalid_connection() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid connection"""
 *     return -10861
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_819get_au_graph_err_invalid_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_818get_au_graph_err_invalid_connection, "get_au_graph_err_invalid_connection() -> int\n\nGet error code for invalid connection");
static PyMethodDef __pyx_mdef_9coremusic_4capi_819get_au_graph_err_invalid_connection = {"get_au_graph_err_invalid_connection", (PyCFunction)__pyx_pw_9coremusic_4capi_819get_au_graph_err_invalid_connection, METH_NOARGS, __pyx_doc_9coremusic_4capi_818get_au_graph_err_invalid_connection};
static PyObject *__pyx_pw_9coremusic_4capi_819get_au_graph_err_invalid_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_invalid_connection (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_818get_au_graph_err_invalid_connection(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_818get_au_graph_err_invalid_connection(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_invalid_connection", 0);

  /* "coremusic/capi.pyx":7432
 * def get_au_graph_err_invalid_connection() -> int:
 *     """Get error code for invalid connection"""
 *     return -10861             # <<<<<<<<<<<<<<
 * 
 * def get_au_graph_err_output_node_err() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_10861);
  __pyx_r = __pyx_mstate_global->__pyx_int_neg_10861;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7430
 *     return -10860
 * 
 * def get_au_graph_err_invalid_connection() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid connection"""
 *     return -10861
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7434
 *     return -10861
 * 
 * def get_au_graph_err_output_node_err() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for output node error"""
 *     return -10862
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_821get_au_graph_err_output_node_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_820get_au_graph_err_output_node_err, "get_au_graph_err_output_node_err() -> int\n\nGet error code for output node error");
static PyMethodDef __pyx_mdef_9coremusic_4capi_821get_au_graph_err_output_node_err = {"get_au_graph_err_output_node_err", (PyCFunction)__pyx_pw_9coremusic_4capi_821get_au_graph_err_output_node_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_820get_au_graph_err_output_node_err};
static PyObject *__pyx_pw_9coremusic_4capi_821get_au_graph_err_output_node_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_output_node_err (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_820get_au_graph_err_output_node_err(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_820get_au_graph_err_output_node_err(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_output_node_err", 0);

  /* "coremusic/capi.pyx":7436
 * def get_au_graph_err_output_node_err() -> int:
 *     """Get error code for output node error"""
 *     return -10862             # <<<<<<<<<<<<<<
 * 
 * def get_au_graph_err_cannot_do_in_current_context() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_10862);
  __pyx_r = __pyx_mstate_global->__pyx_int_neg_10862;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7434
 *     return -10861
 * 
 * def get_au_graph_err_output_node_err() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for output node error"""
 *     return -10862
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7438
 *     return -10862
 * 
 * def get_au_graph_err_cannot_do_in_current_context() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for cannot do in current context"""
 *     return -10863
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_823get_au_graph_err_cannot_do_in_current_context(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_822get_au_graph_err_cannot_do_in_current_context, "get_au_graph_err_cannot_do_in_current_context() -> int\n\nGet error code for cannot do in current context");
static PyMethodDef __pyx_mdef_9coremusic_4capi_823get_au_graph_err_cannot_do_in_current_context = {"get_au_graph_err_cannot_do_in_current_context", (PyCFunction)__pyx_pw_9coremusic_4capi_823get_au_graph_err_cannot_do_in_current_context, METH_NOARGS, __pyx_doc_9coremusic_4capi_822get_au_graph_err_cannot_do_in_current_context};
static PyObject *__pyx_pw_9coremusic_4capi_823get_au_graph_err_cannot_do_in_current_context(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_cannot_do_in_current_context (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_822get_au_graph_err_cannot_do_in_current_context(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_822get_au_graph_err_cannot_do_in_current_context(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_cannot_do_in_current_context", 0);

  /* "coremusic/capi.pyx":7440
 * def get_au_graph_err_cannot_do_in_current_context() -> int:
 *     """Get error code for cannot do in current context"""
 *     return -10863             # <<<<<<<<<<<<<<
 * 
 * def get_au_graph_err_invalid_audio_unit() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_10863);
  __pyx_r = __pyx_mstate_global->__pyx_int_neg_10863;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7438
 *     return -10862
 * 
 * def get_au_graph_err_cannot_do_in_current_context() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for cannot do in current context"""
 *     return -10863
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7442
 *     return -10863
 * 
 * def get_au_graph_err_invalid_audio_unit() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid audio unit"""
 *     return -10864
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_825get_au_graph_err_invalid_audio_unit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_824get_au_graph_err_invalid_audio_unit, "get_au_graph_err_invalid_audio_unit() -> int\n\nGet error code for invalid audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_825get_au_graph_err_invalid_audio_unit = {"get_au_graph_err_invalid_audio_unit", (PyCFunction)__pyx_pw_9coremusic_4capi_825get_au_graph_err_invalid_audio_unit, METH_NOARGS, __pyx_doc_9coremusic_4capi_824get_au_graph_err_invalid_audio_unit};
static PyObject *__pyx_pw_9coremusic_4capi_825get_au_graph_err_invalid_audio_unit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_invalid_audio_unit (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_824get_au_graph_err_invalid_audio_unit(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_824get_au_graph_err_invalid_audio_unit(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_au_graph_err_invalid_audio_unit", 0);

  /* "coremusic/capi.pyx":7444
 * def get_au_graph_err_invalid_audio_unit() -> int:
 *     """Get error code for invalid audio unit"""
 *     return -10864             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_10864);
  __pyx_r = __pyx_mstate_global->__pyx_int_neg_10864;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7442
 *     return -10863
 * 
 * def get_au_graph_err_invalid_audio_unit() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid audio unit"""
 *     return -10864
*/

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7451
 * # ============================================================================
 * 
 * def ca_clock_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new CoreAudio clock
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_827ca_clock_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_826ca_clock_new, "ca_clock_new() -> int\n\nCreate a new CoreAudio clock\n\nReturns:\n    Clock ID as integer\n\nRaises:\n    RuntimeError: If clock creation fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_827ca_clock_new = {"ca_clock_new", (PyCFunction)__pyx_pw_9coremusic_4capi_827ca_clock_new, METH_NOARGS, __pyx_doc_9coremusic_4capi_826ca_clock_new};
static PyObject *__pyx_pw_9coremusic_4capi_827ca_clock_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_new (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_826ca_clock_new(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_826ca_clock_new(CYTHON_UNUSED PyObject *__pyx_self) {
  CAClockRef __pyx_v_clock_ref;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_new", 0);

  /* "coremusic/capi.pyx":7461
 *     """
 *     cdef at.CAClockRef clock_ref
 *     cdef cf.OSStatus status = at.CAClockNew(0, &clock_ref)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockNew"))
*/
  __pyx_v_status = CAClockNew(0, (&__pyx_v_clock_ref));

  /* "coremusic/capi.pyx":7462
 *     cdef at.CAClockRef clock_ref
 *     cdef cf.OSStatus status = at.CAClockNew(0, &clock_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockNew"))
 *     return <long>clock_ref
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7463
 *     cdef cf.OSStatus status = at.CAClockNew(0, &clock_ref)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockNew"))             # <<<<<<<<<<<<<<
 *     return <long>clock_ref
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockNew); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7463, __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_ERR(0, 7463, __pyx_L1_error)

    /* "coremusic/capi.pyx":7462
 *     cdef at.CAClockRef clock_ref
 *     cdef cf.OSStatus status = at.CAClockNew(0, &clock_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockNew"))
 *     return <long>clock_ref
*/
  }

  /* "coremusic/capi.pyx":7464
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockNew"))
 *     return <long>clock_ref             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)__pyx_v_clock_ref)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(0, 7464, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7451
 * # ============================================================================
 * 
 * def ca_clock_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new CoreAudio clock
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7467
 * 
 * 
 * def ca_clock_dispose(long clock_id):             # <<<<<<<<<<<<<<
 *     """Dispose a CoreAudio clock
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_829ca_clock_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_828ca_clock_dispose, "ca_clock_dispose(long clock_id)\n\nDispose a CoreAudio clock\n\nArgs:\n    clock_id: Clock ID to dispose\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_829ca_clock_dispose = {"ca_clock_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_829ca_clock_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_828ca_clock_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_829ca_clock_dispose(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_dispose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7467, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7467, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_dispose", 0) < (0)) __PYX_ERR(0, 7467, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_dispose", 1, 1, 1, i); __PYX_ERR(0, 7467, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7467, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7467, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7467, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_828ca_clock_dispose(__pyx_self, __pyx_v_clock_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_828ca_clock_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_dispose", 0);

  /* "coremusic/capi.pyx":7476
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = at.CAClockDispose(<at.CAClockRef>clock_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockDispose"))
*/
  __pyx_v_status = CAClockDispose(((CAClockRef)__pyx_v_clock_id));

  /* "coremusic/capi.pyx":7477
 *     """
 *     cdef cf.OSStatus status = at.CAClockDispose(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockDispose"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7478
 *     cdef cf.OSStatus status = at.CAClockDispose(<at.CAClockRef>clock_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockDispose"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockDispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7478, __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_ERR(0, 7478, __pyx_L1_error)

    /* "coremusic/capi.pyx":7477
 *     """
 *     cdef cf.OSStatus status = at.CAClockDispose(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockDispose"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7467
 * 
 * 
 * def ca_clock_dispose(long clock_id):             # <<<<<<<<<<<<<<
 *     """Dispose a CoreAudio clock
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_dispose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7481
 * 
 * 
 * def ca_clock_get_current_time(long clock_id, int time_format) -> dict:             # <<<<<<<<<<<<<<
 *     """Get current time from clock
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_831ca_clock_get_current_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_830ca_clock_get_current_time, "ca_clock_get_current_time(long clock_id, int time_format) -> dict\n\nGet current time from clock\n\nArgs:\n    clock_id: Clock ID\n    time_format: Time format (use get_ca_clock_time_format_* functions)\n\nReturns:\n    Dictionary with time information\n\nRaises:\n    RuntimeError: If getting time fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_831ca_clock_get_current_time = {"ca_clock_get_current_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_831ca_clock_get_current_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_830ca_clock_get_current_time};
static PyObject *__pyx_pw_9coremusic_4capi_831ca_clock_get_current_time(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  int __pyx_v_time_format;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_get_current_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,&__pyx_mstate_global->__pyx_n_u_time_format,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7481, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7481, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7481, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_get_current_time", 0) < (0)) __PYX_ERR(0, 7481, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_get_current_time", 1, 2, 2, i); __PYX_ERR(0, 7481, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7481, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7481, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7481, __pyx_L3_error)
    __pyx_v_time_format = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_time_format == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7481, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_get_current_time", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7481, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_get_current_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_830ca_clock_get_current_time(__pyx_self, __pyx_v_clock_id, __pyx_v_time_format);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_830ca_clock_get_current_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id, int __pyx_v_time_format) {
  CAClockTime __pyx_v_clock_time;
  OSStatus __pyx_v_status;
  PyObject *__pyx_v_result = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_get_current_time", 0);

  /* "coremusic/capi.pyx":7495
 *     """
 *     cdef at.CAClockTime clock_time
 *     cdef cf.OSStatus status = at.CAClockGetCurrentTime(             # <<<<<<<<<<<<<<
 *         <at.CAClockRef>clock_id,
 *         <at.CAClockTimeFormat>time_format,
*/
  __pyx_v_status = CAClockGetCurrentTime(((CAClockRef)__pyx_v_clock_id), ((CAClockTimeFormat)__pyx_v_time_format), (&__pyx_v_clock_time));

  /* "coremusic/capi.pyx":7500
 *         &clock_time
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetCurrentTime"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7501
 *     )
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetCurrentTime"))             # <<<<<<<<<<<<<<
 * 
 *     result = {"format": clock_time.format}
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockGetCurrentTime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7501, __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_ERR(0, 7501, __pyx_L1_error)

    /* "coremusic/capi.pyx":7500
 *         &clock_time
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetCurrentTime"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7503
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetCurrentTime"))
 * 
 *     result = {"format": clock_time.format}             # <<<<<<<<<<<<<<
 * 
 *     # Extract value based on format
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_From_CAClockTimeFormat(__pyx_v_clock_time.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_format, __pyx_t_4) < (0)) __PYX_ERR(0, 7503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":7506
 * 
 *     # Extract value based on format
 *     if clock_time.format == at.kCAClockTimeFormat_HostTime:             # <<<<<<<<<<<<<<
 *         result["value"] = clock_time.time.hostTime
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:
*/
  switch (__pyx_v_clock_time.format) {
    case kCAClockTimeFormat_HostTime:

    /* "coremusic/capi.pyx":7507
 *     # Extract value based on format
 *     if clock_time.format == at.kCAClockTimeFormat_HostTime:
 *         result["value"] = clock_time.time.hostTime             # <<<<<<<<<<<<<<
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:
 *         result["value"] = clock_time.time.samples
*/
    __pyx_t_2 = __Pyx_PyLong_From_uint64_t(__pyx_v_clock_time.time.hostTime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < 0))) __PYX_ERR(0, 7507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":7506
 * 
 *     # Extract value based on format
 *     if clock_time.format == at.kCAClockTimeFormat_HostTime:             # <<<<<<<<<<<<<<
 *         result["value"] = clock_time.time.hostTime
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:
*/
    break;
    case kCAClockTimeFormat_Samples:

    /* "coremusic/capi.pyx":7509
 *         result["value"] = clock_time.time.hostTime
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:
 *         result["value"] = clock_time.time.samples             # <<<<<<<<<<<<<<
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:
 *         result["value"] = clock_time.time.beats
*/
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_clock_time.time.samples); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < 0))) __PYX_ERR(0, 7509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":7508
 *     if clock_time.format == at.kCAClockTimeFormat_HostTime:
 *         result["value"] = clock_time.time.hostTime
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:             # <<<<<<<<<<<<<<
 *         result["value"] = clock_time.time.samples
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:
*/
    break;
    case kCAClockTimeFormat_Beats:

    /* "coremusic/capi.pyx":7511
 *         result["value"] = clock_time.time.samples
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:
 *         result["value"] = clock_time.time.beats             # <<<<<<<<<<<<<<
 *     elif clock_time.format in (at.kCAClockTimeFormat_Seconds,
 *                                 at.kCAClockTimeFormat_SMPTESeconds,
*/
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_clock_time.time.beats); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < 0))) __PYX_ERR(0, 7511, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":7510
 *     elif clock_time.format == at.kCAClockTimeFormat_Samples:
 *         result["value"] = clock_time.time.samples
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:             # <<<<<<<<<<<<<<
 *         result["value"] = clock_time.time.beats
 *     elif clock_time.format in (at.kCAClockTimeFormat_Seconds,
*/
    break;
    case kCAClockTimeFormat_Seconds:

    /* "coremusic/capi.pyx":7512
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:
 *         result["value"] = clock_time.time.beats
 *     elif clock_time.format in (at.kCAClockTimeFormat_Seconds,             # <<<<<<<<<<<<<<
 *                                 at.kCAClockTimeFormat_SMPTESeconds,
 *                                 at.kCAClockTimeFormat_AbsoluteSeconds):
*/
    case kCAClockTimeFormat_SMPTESeconds:

    /* "coremusic/capi.pyx":7513
 *         result["value"] = clock_time.time.beats
 *     elif clock_time.format in (at.kCAClockTimeFormat_Seconds,
 *                                 at.kCAClockTimeFormat_SMPTESeconds,             # <<<<<<<<<<<<<<
 *                                 at.kCAClockTimeFormat_AbsoluteSeconds):
 *         result["value"] = clock_time.time.seconds
*/
    case kCAClockTimeFormat_AbsoluteSeconds:

    /* "coremusic/capi.pyx":7515
 *                                 at.kCAClockTimeFormat_SMPTESeconds,
 *                                 at.kCAClockTimeFormat_AbsoluteSeconds):
 *         result["value"] = clock_time.time.seconds             # <<<<<<<<<<<<<<
 *     elif clock_time.format == at.kCAClockTimeFormat_SMPTETime:
 *         result["value"] = {
*/
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_clock_time.time.seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < 0))) __PYX_ERR(0, 7515, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":7512
 *     elif clock_time.format == at.kCAClockTimeFormat_Beats:
 *         result["value"] = clock_time.time.beats
 *     elif clock_time.format in (at.kCAClockTimeFormat_Seconds,             # <<<<<<<<<<<<<<
 *                                 at.kCAClockTimeFormat_SMPTESeconds,
 *                                 at.kCAClockTimeFormat_AbsoluteSeconds):
*/
    break;
    case kCAClockTimeFormat_SMPTETime:

    /* "coremusic/capi.pyx":7518
 *     elif clock_time.format == at.kCAClockTimeFormat_SMPTETime:
 *         result["value"] = {
 *             "hours": clock_time.time.smpte.mHours,             # <<<<<<<<<<<<<<
 *             "minutes": clock_time.time.smpte.mMinutes,
 *             "seconds": clock_time.time.smpte.mSeconds,
*/
    __pyx_t_2 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mHours); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hours, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7519
 *         result["value"] = {
 *             "hours": clock_time.time.smpte.mHours,
 *             "minutes": clock_time.time.smpte.mMinutes,             # <<<<<<<<<<<<<<
 *             "seconds": clock_time.time.smpte.mSeconds,
 *             "frames": clock_time.time.smpte.mFrames,
*/
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mMinutes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minutes, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7520
 *             "hours": clock_time.time.smpte.mHours,
 *             "minutes": clock_time.time.smpte.mMinutes,
 *             "seconds": clock_time.time.smpte.mSeconds,             # <<<<<<<<<<<<<<
 *             "frames": clock_time.time.smpte.mFrames,
 *             "subframes": clock_time.time.smpte.mSubframes,
*/
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mSeconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7521
 *             "minutes": clock_time.time.smpte.mMinutes,
 *             "seconds": clock_time.time.smpte.mSeconds,
 *             "frames": clock_time.time.smpte.mFrames,             # <<<<<<<<<<<<<<
 *             "subframes": clock_time.time.smpte.mSubframes,
 *             "subframe_divisor": clock_time.time.smpte.mSubframeDivisor,
*/
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mFrames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_frames_3, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7522
 *             "seconds": clock_time.time.smpte.mSeconds,
 *             "frames": clock_time.time.smpte.mFrames,
 *             "subframes": clock_time.time.smpte.mSubframes,             # <<<<<<<<<<<<<<
 *             "subframe_divisor": clock_time.time.smpte.mSubframeDivisor,
 *             "type": clock_time.time.smpte.mType,
*/
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mSubframes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_subframes, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7523
 *             "frames": clock_time.time.smpte.mFrames,
 *             "subframes": clock_time.time.smpte.mSubframes,
 *             "subframe_divisor": clock_time.time.smpte.mSubframeDivisor,             # <<<<<<<<<<<<<<
 *             "type": clock_time.time.smpte.mType,
 *             "flags": clock_time.time.smpte.mFlags
*/
    __pyx_t_4 = __Pyx_PyLong_From_SInt16(__pyx_v_clock_time.time.smpte.mSubframeDivisor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_subframe_divisor, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7524
 *             "subframes": clock_time.time.smpte.mSubframes,
 *             "subframe_divisor": clock_time.time.smpte.mSubframeDivisor,
 *             "type": clock_time.time.smpte.mType,             # <<<<<<<<<<<<<<
 *             "flags": clock_time.time.smpte.mFlags
 *         }
*/
    __pyx_t_4 = __Pyx_PyLong_From_SMPTETimeType(__pyx_v_clock_time.time.smpte.mType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7525
 *             "subframe_divisor": clock_time.time.smpte.mSubframeDivisor,
 *             "type": clock_time.time.smpte.mType,
 *             "flags": clock_time.time.smpte.mFlags             # <<<<<<<<<<<<<<
 *         }
 * 
*/
    __pyx_t_4 = __Pyx_PyLong_From_SMPTETimeFlags(__pyx_v_clock_time.time.smpte.mFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 7518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7517
 *         result["value"] = clock_time.time.seconds
 *     elif clock_time.format == at.kCAClockTimeFormat_SMPTETime:
 *         result["value"] = {             # <<<<<<<<<<<<<<
 *             "hours": clock_time.time.smpte.mHours,
 *             "minutes": clock_time.time.smpte.mMinutes,
*/
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value, __pyx_t_2) < 0))) __PYX_ERR(0, 7517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":7516
 *                                 at.kCAClockTimeFormat_AbsoluteSeconds):
 *         result["value"] = clock_time.time.seconds
 *     elif clock_time.format == at.kCAClockTimeFormat_SMPTETime:             # <<<<<<<<<<<<<<
 *         result["value"] = {
 *             "hours": clock_time.time.smpte.mHours,
*/
    break;
    default: break;
  }

  /* "coremusic/capi.pyx":7528
 *         }
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7481
 * 
 * 
 * def ca_clock_get_current_time(long clock_id, int time_format) -> dict:             # <<<<<<<<<<<<<<
 *     """Get current time from clock
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_get_current_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7531
 * 
 * 
 * def ca_clock_start(long clock_id):             # <<<<<<<<<<<<<<
 *     """Start the clock
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_833ca_clock_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_832ca_clock_start, "ca_clock_start(long clock_id)\n\nStart the clock\n\nArgs:\n    clock_id: Clock ID\n\nRaises:\n    RuntimeError: If starting clock fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_833ca_clock_start = {"ca_clock_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_833ca_clock_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_832ca_clock_start};
static PyObject *__pyx_pw_9coremusic_4capi_833ca_clock_start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7531, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7531, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_start", 0) < (0)) __PYX_ERR(0, 7531, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_start", 1, 1, 1, i); __PYX_ERR(0, 7531, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7531, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7531, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7531, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_832ca_clock_start(__pyx_self, __pyx_v_clock_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_832ca_clock_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_start", 0);

  /* "coremusic/capi.pyx":7540
 *         RuntimeError: If starting clock fails
 *     """
 *     cdef cf.OSStatus status = at.CAClockStart(<at.CAClockRef>clock_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStart"))
*/
  __pyx_v_status = CAClockStart(((CAClockRef)__pyx_v_clock_id));

  /* "coremusic/capi.pyx":7541
 *     """
 *     cdef cf.OSStatus status = at.CAClockStart(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStart"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7542
 *     cdef cf.OSStatus status = at.CAClockStart(<at.CAClockRef>clock_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStart"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockStart); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7542, __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_ERR(0, 7542, __pyx_L1_error)

    /* "coremusic/capi.pyx":7541
 *     """
 *     cdef cf.OSStatus status = at.CAClockStart(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStart"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7531
 * 
 * 
 * def ca_clock_start(long clock_id):             # <<<<<<<<<<<<<<
 *     """Start the clock
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7545
 * 
 * 
 * def ca_clock_stop(long clock_id):             # <<<<<<<<<<<<<<
 *     """Stop the clock
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_835ca_clock_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_834ca_clock_stop, "ca_clock_stop(long clock_id)\n\nStop the clock\n\nArgs:\n    clock_id: Clock ID\n\nRaises:\n    RuntimeError: If stopping clock fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_835ca_clock_stop = {"ca_clock_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_835ca_clock_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_834ca_clock_stop};
static PyObject *__pyx_pw_9coremusic_4capi_835ca_clock_stop(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_stop (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7545, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7545, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_stop", 0) < (0)) __PYX_ERR(0, 7545, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_stop", 1, 1, 1, i); __PYX_ERR(0, 7545, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7545, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7545, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7545, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_834ca_clock_stop(__pyx_self, __pyx_v_clock_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_834ca_clock_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_stop", 0);

  /* "coremusic/capi.pyx":7554
 *         RuntimeError: If stopping clock fails
 *     """
 *     cdef cf.OSStatus status = at.CAClockStop(<at.CAClockRef>clock_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStop"))
*/
  __pyx_v_status = CAClockStop(((CAClockRef)__pyx_v_clock_id));

  /* "coremusic/capi.pyx":7555
 *     """
 *     cdef cf.OSStatus status = at.CAClockStop(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStop"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7556
 *     cdef cf.OSStatus status = at.CAClockStop(<at.CAClockRef>clock_id)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStop"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockStop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7556, __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_ERR(0, 7556, __pyx_L1_error)

    /* "coremusic/capi.pyx":7555
 *     """
 *     cdef cf.OSStatus status = at.CAClockStop(<at.CAClockRef>clock_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockStop"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7545
 * 
 * 
 * def ca_clock_stop(long clock_id):             # <<<<<<<<<<<<<<
 *     """Stop the clock
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7559
 * 
 * 
 * def ca_clock_set_play_rate(long clock_id, double rate):             # <<<<<<<<<<<<<<
 *     """Set playback rate
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_837ca_clock_set_play_rate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_836ca_clock_set_play_rate, "ca_clock_set_play_rate(long clock_id, double rate)\n\nSet playback rate\n\nArgs:\n    clock_id: Clock ID\n    rate: Playback rate (1.0 = normal speed)\n\nRaises:\n    RuntimeError: If setting rate fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_837ca_clock_set_play_rate = {"ca_clock_set_play_rate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_837ca_clock_set_play_rate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_836ca_clock_set_play_rate};
static PyObject *__pyx_pw_9coremusic_4capi_837ca_clock_set_play_rate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  double __pyx_v_rate;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_set_play_rate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,&__pyx_mstate_global->__pyx_n_u_rate,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7559, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7559, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7559, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_set_play_rate", 0) < (0)) __PYX_ERR(0, 7559, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_set_play_rate", 1, 2, 2, i); __PYX_ERR(0, 7559, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7559, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7559, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7559, __pyx_L3_error)
    __pyx_v_rate = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_rate == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7559, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_set_play_rate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7559, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_set_play_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_836ca_clock_set_play_rate(__pyx_self, __pyx_v_clock_id, __pyx_v_rate);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_836ca_clock_set_play_rate(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id, double __pyx_v_rate) {
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_set_play_rate", 0);

  /* "coremusic/capi.pyx":7569
 *         RuntimeError: If setting rate fails
 *     """
 *     cdef cf.OSStatus status = at.CAClockSetPlayRate(<at.CAClockRef>clock_id, rate)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockSetPlayRate"))
*/
  __pyx_v_status = CAClockSetPlayRate(((CAClockRef)__pyx_v_clock_id), __pyx_v_rate);

  /* "coremusic/capi.pyx":7570
 *     """
 *     cdef cf.OSStatus status = at.CAClockSetPlayRate(<at.CAClockRef>clock_id, rate)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockSetPlayRate"))
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7571
 *     cdef cf.OSStatus status = at.CAClockSetPlayRate(<at.CAClockRef>clock_id, rate)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockSetPlayRate"))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockSetPlayRate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7571, __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_ERR(0, 7571, __pyx_L1_error)

    /* "coremusic/capi.pyx":7570
 *     """
 *     cdef cf.OSStatus status = at.CAClockSetPlayRate(<at.CAClockRef>clock_id, rate)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockSetPlayRate"))
 * 
*/
  }

  /* "coremusic/capi.pyx":7559
 * 
 * 
 * def ca_clock_set_play_rate(long clock_id, double rate):             # <<<<<<<<<<<<<<
 *     """Set playback rate
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_set_play_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7574
 * 
 * 
 * def ca_clock_get_play_rate(long clock_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current playback rate
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_839ca_clock_get_play_rate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_838ca_clock_get_play_rate, "ca_clock_get_play_rate(long clock_id) -> float\n\nGet current playback rate\n\nArgs:\n    clock_id: Clock ID\n\nReturns:\n    Current playback rate\n\nRaises:\n    RuntimeError: If getting rate fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_839ca_clock_get_play_rate = {"ca_clock_get_play_rate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_839ca_clock_get_play_rate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_838ca_clock_get_play_rate};
static PyObject *__pyx_pw_9coremusic_4capi_839ca_clock_get_play_rate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  long __pyx_v_clock_id;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ca_clock_get_play_rate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_clock_id,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7574, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ca_clock_get_play_rate", 0) < (0)) __PYX_ERR(0, 7574, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ca_clock_get_play_rate", 1, 1, 1, i); __PYX_ERR(0, 7574, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7574, __pyx_L3_error)
    }
    __pyx_v_clock_id = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_clock_id == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 7574, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ca_clock_get_play_rate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7574, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.ca_clock_get_play_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_838ca_clock_get_play_rate(__pyx_self, __pyx_v_clock_id);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_838ca_clock_get_play_rate(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_clock_id) {
  double __pyx_v_rate;
  OSStatus __pyx_v_status;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ca_clock_get_play_rate", 0);

  /* "coremusic/capi.pyx":7587
 *     """
 *     cdef double rate
 *     cdef cf.OSStatus status = at.CAClockGetPlayRate(<at.CAClockRef>clock_id, &rate)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetPlayRate"))
*/
  __pyx_v_status = CAClockGetPlayRate(((CAClockRef)__pyx_v_clock_id), (&__pyx_v_rate));

  /* "coremusic/capi.pyx":7588
 *     cdef double rate
 *     cdef cf.OSStatus status = at.CAClockGetPlayRate(<at.CAClockRef>clock_id, &rate)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetPlayRate"))
 *     return rate
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":7589
 *     cdef cf.OSStatus status = at.CAClockGetPlayRate(<at.CAClockRef>clock_id, &rate)
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetPlayRate"))             # <<<<<<<<<<<<<<
 *     return rate
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __pyx_f_9coremusic_4capi_format_osstatus_error(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_CAClockGetPlayRate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7589, __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_ERR(0, 7589, __pyx_L1_error)

    /* "coremusic/capi.pyx":7588
 *     cdef double rate
 *     cdef cf.OSStatus status = at.CAClockGetPlayRate(<at.CAClockRef>clock_id, &rate)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetPlayRate"))
 *     return rate
*/
  }

  /* "coremusic/capi.pyx":7590
 *     if status != 0:
 *         raise RuntimeError(format_osstatus_error(status, "CAClockGetPlayRate"))
 *     return rate             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_rate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7574
 * 
 * 
 * def ca_clock_get_play_rate(long clock_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current playback rate
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.ca_clock_get_play_rate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7593
 * 
 * 
 * def get_ca_clock_time_format_host_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for host time"""
 *     return at.kCAClockTimeFormat_HostTime
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_841get_ca_clock_time_format_host_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_840get_ca_clock_time_format_host_time, "get_ca_clock_time_format_host_time() -> int\n\nGet time format for host time");
static PyMethodDef __pyx_mdef_9coremusic_4capi_841get_ca_clock_time_format_host_time = {"get_ca_clock_time_format_host_time", (PyCFunction)__pyx_pw_9coremusic_4capi_841get_ca_clock_time_format_host_time, METH_NOARGS, __pyx_doc_9coremusic_4capi_840get_ca_clock_time_format_host_time};
static PyObject *__pyx_pw_9coremusic_4capi_841get_ca_clock_time_format_host_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ca_clock_time_format_host_time (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_840get_ca_clock_time_format_host_time(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_840get_ca_clock_time_format_host_time(CYTHON_UNUSED PyObject *__pyx_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_ca_clock_time_format_host_time", 0);

  /* "coremusic/capi.pyx":7595
 * def get_ca_clock_time_format_host_time() -> int:
 *     """Get time format for host time"""
 *     return at.kCAClockTimeFormat_HostTime             # <<<<<<<<<<<<<<
 * 
 * def get_ca_clock_time_format_samples() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_CAClockTimeFormat(kCAClockTimeFormat_HostTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7595, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7593
 * 
 * 
 * def get_ca_clock_time_format_host_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for host time"""
 *     return at.kCAClockTimeFormat_HostTime
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_ca_clock_time_format_host_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7597
 *     return at.kCAClockTimeFormat_HostTime
 * 
 * def get_ca_clock_time_format_samples() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for audio samples"""
 *     return at.kCAClockTimeFormat_Samples
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_843get_ca_clock_time_format_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_842get_ca_clock_time_format_samples, "get_ca_clock_time_format_samples() -> int\n\nGet time format for audio samples");
static PyMethodDef __pyx_mdef_9coremusic_4capi_843get_ca_clock_time_format_samples = {"get_ca_clock_time_format_samples", (PyCFunction)__pyx_pw_9coremusic_4capi_843get_ca_clock_time_format_samples, METH_NOARGS, __pyx_doc_9coremusic_4capi_842get_ca_clock_time_format_samples};
static PyObject *__pyx_pw_9coremusic_4capi_843get_ca_clock_time_format_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ca_clock_time_format_samples (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_842get_ca_clock_time_format_samples(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_842get_ca_clock_time_format_samples(CYTHON_UNUSED PyObject *__pyx_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_ca_clock_time_format_samples", 0);

  /* "coremusic/capi.pyx":7599
 * def get_ca_clock_time_format_samples() -> int:
 *     """Get time format for audio samples"""
 *     return at.kCAClockTimeFormat_Samples             # <<<<<<<<<<<<<<
 * 
 * def get_ca_clock_time_format_beats() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_CAClockTimeFormat(kCAClockTimeFormat_Samples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7599, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7597
 *     return at.kCAClockTimeFormat_HostTime
 * 
 * def get_ca_clock_time_format_samples() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for audio samples"""
 *     return at.kCAClockTimeFormat_Samples
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_ca_clock_time_format_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7601
 *     return at.kCAClockTimeFormat_Samples
 * 
 * def get_ca_clock_time_format_beats() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for musical beats"""
 *     return at.kCAClockTimeFormat_Beats
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_845get_ca_clock_time_format_beats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_844get_ca_clock_time_format_beats, "get_ca_clock_time_format_beats() -> int\n\nGet time format for musical beats");
static PyMethodDef __pyx_mdef_9coremusic_4capi_845get_ca_clock_time_format_beats = {"get_ca_clock_time_format_beats", (PyCFunction)__pyx_pw_9coremusic_4capi_845get_ca_clock_time_format_beats, METH_NOARGS, __pyx_doc_9coremusic_4capi_844get_ca_clock_time_format_beats};
static PyObject *__pyx_pw_9coremusic_4capi_845get_ca_clock_time_format_beats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ca_clock_time_format_beats (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_844get_ca_clock_time_format_beats(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_844get_ca_clock_time_format_beats(CYTHON_UNUSED PyObject *__pyx_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_ca_clock_time_format_beats", 0);

  /* "coremusic/capi.pyx":7603
 * def get_ca_clock_time_format_beats() -> int:
 *     """Get time format for musical beats"""
 *     return at.kCAClockTimeFormat_Beats             # <<<<<<<<<<<<<<
 * 
 * def get_ca_clock_time_format_seconds() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_CAClockTimeFormat(kCAClockTimeFormat_Beats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7603, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7601
 *     return at.kCAClockTimeFormat_Samples
 * 
 * def get_ca_clock_time_format_beats() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for musical beats"""
 *     return at.kCAClockTimeFormat_Beats
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_ca_clock_time_format_beats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7605
 *     return at.kCAClockTimeFormat_Beats
 * 
 * def get_ca_clock_time_format_seconds() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for seconds"""
 *     return at.kCAClockTimeFormat_Seconds
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_847get_ca_clock_time_format_seconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_846get_ca_clock_time_format_seconds, "get_ca_clock_time_format_seconds() -> int\n\nGet time format for seconds");
static PyMethodDef __pyx_mdef_9coremusic_4capi_847get_ca_clock_time_format_seconds = {"get_ca_clock_time_format_seconds", (PyCFunction)__pyx_pw_9coremusic_4capi_847get_ca_clock_time_format_seconds, METH_NOARGS, __pyx_doc_9coremusic_4capi_846get_ca_clock_time_format_seconds};
static PyObject *__pyx_pw_9coremusic_4capi_847get_ca_clock_time_format_seconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ca_clock_time_format_seconds (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_846get_ca_clock_time_format_seconds(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_846get_ca_clock_time_format_seconds(CYTHON_UNUSED PyObject *__pyx_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_ca_clock_time_format_seconds", 0);

  /* "coremusic/capi.pyx":7607
 * def get_ca_clock_time_format_seconds() -> int:
 *     """Get time format for seconds"""
 *     return at.kCAClockTimeFormat_Seconds             # <<<<<<<<<<<<<<
 * 
 * def get_ca_clock_time_format_smpte_time() -> int:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_CAClockTimeFormat(kCAClockTimeFormat_Seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7607, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7605
 *     return at.kCAClockTimeFormat_Beats
 * 
 * def get_ca_clock_time_format_seconds() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for seconds"""
 *     return at.kCAClockTimeFormat_Seconds
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_ca_clock_time_format_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7609
 *     return at.kCAClockTimeFormat_Seconds
 * 
 * def get_ca_clock_time_format_smpte_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for SMPTE time structure"""
 *     return at.kCAClockTimeFormat_SMPTETime
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_849get_ca_clock_time_format_smpte_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_848get_ca_clock_time_format_smpte_time, "get_ca_clock_time_format_smpte_time() -> int\n\nGet time format for SMPTE time structure");
static PyMethodDef __pyx_mdef_9coremusic_4capi_849get_ca_clock_time_format_smpte_time = {"get_ca_clock_time_format_smpte_time", (PyCFunction)__pyx_pw_9coremusic_4capi_849get_ca_clock_time_format_smpte_time, METH_NOARGS, __pyx_doc_9coremusic_4capi_848get_ca_clock_time_format_smpte_time};
static PyObject *__pyx_pw_9coremusic_4capi_849get_ca_clock_time_format_smpte_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ca_clock_time_format_smpte_time (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_848get_ca_clock_time_format_smpte_time(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_848get_ca_clock_time_format_smpte_time(CYTHON_UNUSED PyObject *__pyx_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_ca_clock_time_format_smpte_time", 0);

  /* "coremusic/capi.pyx":7611
 * def get_ca_clock_time_format_smpte_time() -> int:
 *     """Get time format for SMPTE time structure"""
 *     return at.kCAClockTimeFormat_SMPTETime             # <<<<<<<<<<<<<<
 * 
 * # =============================================================================
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_CAClockTimeFormat(kCAClockTimeFormat_SMPTETime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(0, 7611, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7609
 *     return at.kCAClockTimeFormat_Seconds
 * 
 * def get_ca_clock_time_format_smpte_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for SMPTE time structure"""
 *     return at.kCAClockTimeFormat_SMPTETime
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("coremusic.capi.get_ca_clock_time_format_smpte_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7632
 * # =============================================================================
 * 
 * cdef inline float32_t clip_float32(float32_t value, float32_t min_val, float32_t max_val) nogil:             # <<<<<<<<<<<<<<
 *     """Clip float32 value to range [min_val, max_val]."""
 *     if value < min_val:
*/

static CYTHON_INLINE __pyx_t_9coremusic_4capi_float32_t __pyx_f_9coremusic_4capi_clip_float32(__pyx_t_9coremusic_4capi_float32_t __pyx_v_value, __pyx_t_9coremusic_4capi_float32_t __pyx_v_min_val, __pyx_t_9coremusic_4capi_float32_t __pyx_v_max_val) {
  __pyx_t_9coremusic_4capi_float32_t __pyx_r;
  int __pyx_t_1;

  /* "coremusic/capi.pyx":7634
 * cdef inline float32_t clip_float32(float32_t value, float32_t min_val, float32_t max_val) nogil:
 *     """Clip float32 value to range [min_val, max_val]."""
 *     if value < min_val:             # <<<<<<<<<<<<<<
 *         return min_val
 *     if value > max_val:
*/
  __pyx_t_1 = (__pyx_v_value < __pyx_v_min_val);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":7635
 *     """Clip float32 value to range [min_val, max_val]."""
 *     if value < min_val:
 *         return min_val             # <<<<<<<<<<<<<<
 *     if value > max_val:
 *         return max_val
*/
    __pyx_r = __pyx_v_min_val;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":7634
 * cdef inline float32_t clip_float32(float32_t value, float32_t min_val, float32_t max_val) nogil:
 *     """Clip float32 value to range [min_val, max_val]."""
 *     if value < min_val:             # <<<<<<<<<<<<<<
 *         return min_val
 *     if value > max_val:
*/
  }

  /* "coremusic/capi.pyx":7636
 *     if value < min_val:
 *         return min_val
 *     if value > max_val:             # <<<<<<<<<<<<<<
 *         return max_val
 *     return value
*/
  __pyx_t_1 = (__pyx_v_value > __pyx_v_max_val);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":7637
 *         return min_val
 *     if value > max_val:
 *         return max_val             # <<<<<<<<<<<<<<
 *     return value
 * 
*/
    __pyx_r = __pyx_v_max_val;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":7636
 *     if value < min_val:
 *         return min_val
 *     if value > max_val:             # <<<<<<<<<<<<<<
 *         return max_val
 *     return value
*/
  }

  /* "coremusic/capi.pyx":7638
 *     if value > max_val:
 *         return max_val
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7632
 * # =============================================================================
 * 
 * cdef inline float32_t clip_float32(float32_t value, float32_t min_val, float32_t max_val) nogil:             # <<<<<<<<<<<<<<
 *     """Clip float32 value to range [min_val, max_val]."""
 *     if value < min_val:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":7641
 * 
 * 
 * cdef inline int16_t clip_int16(int value) nogil:             # <<<<<<<<<<<<<<
 *     """Clip integer value to int16 range."""
 *     if value < -32768:
*/

static CYTHON_INLINE __pyx_t_9coremusic_4capi_int16_t __pyx_f_9coremusic_4capi_clip_int16(int __pyx_v_value) {
  __pyx_t_9coremusic_4capi_int16_t __pyx_r;
  int __pyx_t_1;

  /* "coremusic/capi.pyx":7643
 * cdef inline int16_t clip_int16(int value) nogil:
 *     """Clip integer value to int16 range."""
 *     if value < -32768:             # <<<<<<<<<<<<<<
 *         return -32768
 *     if value > 32767:
*/
  __pyx_t_1 = (__pyx_v_value < -32768L);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":7644
 *     """Clip integer value to int16 range."""
 *     if value < -32768:
 *         return -32768             # <<<<<<<<<<<<<<
 *     if value > 32767:
 *         return 32767
*/
    __pyx_r = -32768;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":7643
 * cdef inline int16_t clip_int16(int value) nogil:
 *     """Clip integer value to int16 range."""
 *     if value < -32768:             # <<<<<<<<<<<<<<
 *         return -32768
 *     if value > 32767:
*/
  }

  /* "coremusic/capi.pyx":7645
 *     if value < -32768:
 *         return -32768
 *     if value > 32767:             # <<<<<<<<<<<<<<
 *         return 32767
 *     return <int16_t>value
*/
  __pyx_t_1 = (__pyx_v_value > 0x7FFF);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":7646
 *         return -32768
 *     if value > 32767:
 *         return 32767             # <<<<<<<<<<<<<<
 *     return <int16_t>value
 * 
*/
    __pyx_r = 0x7FFF;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":7645
 *     if value < -32768:
 *         return -32768
 *     if value > 32767:             # <<<<<<<<<<<<<<
 *         return 32767
 *     return <int16_t>value
*/
  }

  /* "coremusic/capi.pyx":7647
 *     if value > 32767:
 *         return 32767
 *     return <int16_t>value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((__pyx_t_9coremusic_4capi_int16_t)__pyx_v_value);
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7641
 * 
 * 
 * cdef inline int16_t clip_int16(int value) nogil:             # <<<<<<<<<<<<<<
 *     """Clip integer value to int16 range."""
 *     if value < -32768:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":7650
 * 
 * 
 * cdef inline float64_t db_to_linear(float64_t db) nogil:             # <<<<<<<<<<<<<<
 *     """Convert decibels to linear gain."""
 *     return 10.0 ** (db / 20.0)
*/

static CYTHON_INLINE __pyx_t_9coremusic_4capi_float64_t __pyx_f_9coremusic_4capi_db_to_linear(__pyx_t_9coremusic_4capi_float64_t __pyx_v_db) {
  __pyx_t_9coremusic_4capi_float64_t __pyx_r;

  /* "coremusic/capi.pyx":7652
 * cdef inline float64_t db_to_linear(float64_t db) nogil:
 *     """Convert decibels to linear gain."""
 *     return 10.0 ** (db / 20.0)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = pow(((__pyx_t_9coremusic_4capi_float64_t)10.0), (__pyx_v_db / ((__pyx_t_9coremusic_4capi_float64_t)20.0)));
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7650
 * 
 * 
 * cdef inline float64_t db_to_linear(float64_t db) nogil:             # <<<<<<<<<<<<<<
 *     """Convert decibels to linear gain."""
 *     return 10.0 ** (db / 20.0)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":7655
 * 
 * 
 * cdef inline float64_t linear_to_db(float64_t linear) nogil:             # <<<<<<<<<<<<<<
 *     """Convert linear gain to decibels."""
 *     if linear <= 0.0:
*/

static CYTHON_INLINE __pyx_t_9coremusic_4capi_float64_t __pyx_f_9coremusic_4capi_linear_to_db(__pyx_t_9coremusic_4capi_float64_t __pyx_v_linear) {
  __pyx_t_9coremusic_4capi_float64_t __pyx_r;
  int __pyx_t_1;

  /* "coremusic/capi.pyx":7657
 * cdef inline float64_t linear_to_db(float64_t linear) nogil:
 *     """Convert linear gain to decibels."""
 *     if linear <= 0.0:             # <<<<<<<<<<<<<<
 *         return -100.0  # Effectively -inf
 *     return 20.0 * log10(linear)
*/
  __pyx_t_1 = (__pyx_v_linear <= 0.0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":7658
 *     """Convert linear gain to decibels."""
 *     if linear <= 0.0:
 *         return -100.0  # Effectively -inf             # <<<<<<<<<<<<<<
 *     return 20.0 * log10(linear)
 * 
*/
    __pyx_r = -100.0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":7657
 * cdef inline float64_t linear_to_db(float64_t linear) nogil:
 *     """Convert linear gain to decibels."""
 *     if linear <= 0.0:             # <<<<<<<<<<<<<<
 *         return -100.0  # Effectively -inf
 *     return 20.0 * log10(linear)
*/
  }

  /* "coremusic/capi.pyx":7659
 *     if linear <= 0.0:
 *         return -100.0  # Effectively -inf
 *     return 20.0 * log10(linear)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = (20.0 * log10(__pyx_v_linear));
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7655
 * 
 * 
 * cdef inline float64_t linear_to_db(float64_t linear) nogil:             # <<<<<<<<<<<<<<
 *     """Convert linear gain to decibels."""
 *     if linear <= 0.0:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "coremusic/capi.pyx":7666
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def normalize_audio_float32(float32_t[:, ::1] audio_data, float32_t target_peak=0.9):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_851normalize_audio_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_850normalize_audio_float32, "normalize_audio_float32(float32_t[:, ::1] audio_data, float32_t target_peak=0.9)\n\nNormalize audio to target peak level.\n\nArgs:\n    audio_data: 2D array (frames, channels) of float32 audio data\n    target_peak: Target peak level (0.0 to 1.0)\n\nReturns:\n    None (modifies audio_data in-place)\n\nNote:\n    This function releases the GIL for parallel processing.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_851normalize_audio_float32 = {"normalize_audio_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_851normalize_audio_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_850normalize_audio_float32};
static PyObject *__pyx_pw_9coremusic_4capi_851normalize_audio_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_target_peak;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize_audio_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_target_peak,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7666, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7666, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7666, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "normalize_audio_float32", 0) < (0)) __PYX_ERR(0, 7666, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("normalize_audio_float32", 0, 1, 2, i); __PYX_ERR(0, 7666, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7666, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7666, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7668, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_target_peak = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_target_peak == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7668, __pyx_L3_error)
    } else {
      __pyx_v_target_peak = ((__pyx_t_9coremusic_4capi_float32_t)((double)0.9));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalize_audio_float32", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 7666, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.normalize_audio_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_850normalize_audio_float32(__pyx_self, __pyx_v_audio_data, __pyx_v_target_peak);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_850normalize_audio_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, __pyx_t_9coremusic_4capi_float32_t __pyx_v_target_peak) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_max_val;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize_audio_float32", 0);

  /* "coremusic/capi.pyx":7681
 *         This function releases the GIL for parallel processing.
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t max_val = 0.0
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7682
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef float32_t max_val = 0.0
 *     cdef float32_t gain
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7683
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t max_val = 0.0             # <<<<<<<<<<<<<<
 *     cdef float32_t gain
 *     cdef int i, j
*/
  __pyx_v_max_val = 0.0;

  /* "coremusic/capi.pyx":7688
 * 
 *     # Find peak value (with GIL released)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7689
 *     # Find peak value (with GIL released)
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 if fabs(audio_data[i, j]) > max_val:
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7690
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 if fabs(audio_data[i, j]) > max_val:
 *                     max_val = fabs(audio_data[i, j])
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7691
 *         for i in range(frames):
 *             for j in range(channels):
 *                 if fabs(audio_data[i, j]) > max_val:             # <<<<<<<<<<<<<<
 *                     max_val = fabs(audio_data[i, j])
 * 
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_t_9 = (fabs((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_7 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_8)) )))) > __pyx_v_max_val);
            if (__pyx_t_9) {

              /* "coremusic/capi.pyx":7692
 *             for j in range(channels):
 *                 if fabs(audio_data[i, j]) > max_val:
 *                     max_val = fabs(audio_data[i, j])             # <<<<<<<<<<<<<<
 * 
 *         # Calculate and apply gain
*/
              __pyx_t_8 = __pyx_v_i;
              __pyx_t_7 = __pyx_v_j;
              __pyx_v_max_val = fabs((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_8 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_7)) ))));

              /* "coremusic/capi.pyx":7691
 *         for i in range(frames):
 *             for j in range(channels):
 *                 if fabs(audio_data[i, j]) > max_val:             # <<<<<<<<<<<<<<
 *                     max_val = fabs(audio_data[i, j])
 * 
*/
            }
          }
        }

        /* "coremusic/capi.pyx":7695
 * 
 *         # Calculate and apply gain
 *         if max_val > 0.0:             # <<<<<<<<<<<<<<
 *             gain = target_peak / max_val
 *             for i in range(frames):
*/
        __pyx_t_9 = (__pyx_v_max_val > 0.0);
        if (__pyx_t_9) {

          /* "coremusic/capi.pyx":7696
 *         # Calculate and apply gain
 *         if max_val > 0.0:
 *             gain = target_peak / max_val             # <<<<<<<<<<<<<<
 *             for i in range(frames):
 *                 for j in range(channels):
*/
          if (unlikely(__pyx_v_max_val == 0)) {
            PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
            PyErr_SetString(PyExc_ZeroDivisionError, "float division");
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            __PYX_ERR(0, 7696, __pyx_L4_error)
          }
          __pyx_v_gain = (__pyx_v_target_peak / __pyx_v_max_val);

          /* "coremusic/capi.pyx":7697
 *         if max_val > 0.0:
 *             gain = target_peak / max_val
 *             for i in range(frames):             # <<<<<<<<<<<<<<
 *                 for j in range(channels):
 *                     audio_data[i, j] *= gain
*/
          __pyx_t_1 = __pyx_v_frames;
          __pyx_t_2 = __pyx_t_1;
          for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
            __pyx_v_i = __pyx_t_3;

            /* "coremusic/capi.pyx":7698
 *             gain = target_peak / max_val
 *             for i in range(frames):
 *                 for j in range(channels):             # <<<<<<<<<<<<<<
 *                     audio_data[i, j] *= gain
 * 
*/
            __pyx_t_4 = __pyx_v_channels;
            __pyx_t_5 = __pyx_t_4;
            for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
              __pyx_v_j = __pyx_t_6;

              /* "coremusic/capi.pyx":7699
 *             for i in range(frames):
 *                 for j in range(channels):
 *                     audio_data[i, j] *= gain             # <<<<<<<<<<<<<<
 * 
 * 
*/
              __pyx_t_7 = __pyx_v_i;
              __pyx_t_8 = __pyx_v_j;
              *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_7 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_8)) )) *= __pyx_v_gain;
            }
          }

          /* "coremusic/capi.pyx":7695
 * 
 *         # Calculate and apply gain
 *         if max_val > 0.0:             # <<<<<<<<<<<<<<
 *             gain = target_peak / max_val
 *             for i in range(frames):
*/
        }
      }

      /* "coremusic/capi.pyx":7688
 * 
 *     # Find peak value (with GIL released)
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7666
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def normalize_audio_float32(float32_t[:, ::1] audio_data, float32_t target_peak=0.9):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.normalize_audio_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7702
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_gain_float32(float32_t[:, ::1] audio_data, float32_t gain_db):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_853apply_gain_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_852apply_gain_float32, "apply_gain_float32(float32_t[:, ::1] audio_data, float32_t gain_db)\n\nApply gain in decibels to audio data.\n\nArgs:\n    audio_data: 2D array (frames, channels) of float32 audio data\n    gain_db: Gain in decibels\n\nReturns:\n    None (modifies audio_data in-place)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_853apply_gain_float32 = {"apply_gain_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_853apply_gain_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_852apply_gain_float32};
static PyObject *__pyx_pw_9coremusic_4capi_853apply_gain_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain_db;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_gain_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_gain_db,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7702, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7702, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7702, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "apply_gain_float32", 0) < (0)) __PYX_ERR(0, 7702, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("apply_gain_float32", 1, 2, 2, i); __PYX_ERR(0, 7702, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7702, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7702, __pyx_L3_error)
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7704, __pyx_L3_error)
    __pyx_v_gain_db = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_gain_db == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7704, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_gain_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7702, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.apply_gain_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_852apply_gain_float32(__pyx_self, __pyx_v_audio_data, __pyx_v_gain_db);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_852apply_gain_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain_db) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_linear_gain;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_9coremusic_4capi_float64_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_gain_float32", 0);

  /* "coremusic/capi.pyx":7714
 *         None (modifies audio_data in-place)
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t linear_gain = <float32_t>db_to_linear(gain_db)
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7715
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef float32_t linear_gain = <float32_t>db_to_linear(gain_db)
 *     cdef int i, j
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7716
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t linear_gain = <float32_t>db_to_linear(gain_db)             # <<<<<<<<<<<<<<
 *     cdef int i, j
 * 
*/
  __pyx_t_1 = __pyx_f_9coremusic_4capi_db_to_linear(__pyx_v_gain_db); if (unlikely(__pyx_t_1 == ((__pyx_t_9coremusic_4capi_float64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7716, __pyx_L1_error)
  __pyx_v_linear_gain = ((__pyx_t_9coremusic_4capi_float32_t)__pyx_t_1);

  /* "coremusic/capi.pyx":7719
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7720
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 audio_data[i, j] *= linear_gain
*/
        __pyx_t_2 = __pyx_v_frames;
        __pyx_t_3 = __pyx_t_2;
        for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
          __pyx_v_i = __pyx_t_4;

          /* "coremusic/capi.pyx":7721
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 audio_data[i, j] *= linear_gain
 * 
*/
          __pyx_t_5 = __pyx_v_channels;
          __pyx_t_6 = __pyx_t_5;
          for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
            __pyx_v_j = __pyx_t_7;

            /* "coremusic/capi.pyx":7722
 *         for i in range(frames):
 *             for j in range(channels):
 *                 audio_data[i, j] *= linear_gain             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_8 = __pyx_v_i;
            __pyx_t_9 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_8 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_9)) )) *= __pyx_v_linear_gain;
          }
        }
      }

      /* "coremusic/capi.pyx":7719
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7702
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_gain_float32(float32_t[:, ::1] audio_data, float32_t gain_db):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.apply_gain_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7725
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mix_audio_float32(float32_t[:, ::1] output, float32_t[:, ::1] input1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_855mix_audio_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_854mix_audio_float32, "mix_audio_float32(float32_t[:, ::1] output, float32_t[:, ::1] input1, float32_t[:, ::1] input2, float32_t mix_ratio=0.5)\n\nMix two audio buffers.\n\nArgs:\n    output: Output buffer (frames, channels)\n    input1: First input buffer (frames, channels)\n    input2: Second input buffer (frames, channels)\n    mix_ratio: Mix ratio (0.0 = all input1, 1.0 = all input2)\n\nReturns:\n    None (writes to output buffer)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_855mix_audio_float32 = {"mix_audio_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_855mix_audio_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_854mix_audio_float32};
static PyObject *__pyx_pw_9coremusic_4capi_855mix_audio_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_output = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_input1 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_input2 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_mix_ratio;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mix_audio_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_output,&__pyx_mstate_global->__pyx_n_u_input1,&__pyx_mstate_global->__pyx_n_u_input2,&__pyx_mstate_global->__pyx_n_u_mix_ratio,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7725, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mix_audio_float32", 0) < (0)) __PYX_ERR(0, 7725, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mix_audio_float32", 0, 3, 4, i); __PYX_ERR(0, 7725, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7725, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7725, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7725, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7725, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_output = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_output.memview)) __PYX_ERR(0, 7727, __pyx_L3_error)
    __pyx_v_input1 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_input1.memview)) __PYX_ERR(0, 7727, __pyx_L3_error)
    __pyx_v_input2 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_input2.memview)) __PYX_ERR(0, 7728, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_mix_ratio = __Pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_mix_ratio == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7728, __pyx_L3_error)
    } else {
      __pyx_v_mix_ratio = ((__pyx_t_9coremusic_4capi_float32_t)((double)0.5));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mix_audio_float32", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 7725, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input1, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input2, 1);
  __Pyx_AddTraceback("coremusic.capi.mix_audio_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_854mix_audio_float32(__pyx_self, __pyx_v_output, __pyx_v_input1, __pyx_v_input2, __pyx_v_mix_ratio);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_output, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input1, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_input2, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_854mix_audio_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_output, __Pyx_memviewslice __pyx_v_input1, __Pyx_memviewslice __pyx_v_input2, __pyx_t_9coremusic_4capi_float32_t __pyx_v_mix_ratio) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_ratio1;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_ratio2;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __Pyx_RefNannySetupContext("mix_audio_float32", 0);

  /* "coremusic/capi.pyx":7740
 *         None (writes to output buffer)
 *     """
 *     cdef int frames = output.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = output.shape[1]
 *     cdef float32_t ratio1 = 1.0 - mix_ratio
*/
  __pyx_v_frames = (__pyx_v_output.shape[0]);

  /* "coremusic/capi.pyx":7741
 *     """
 *     cdef int frames = output.shape[0]
 *     cdef int channels = output.shape[1]             # <<<<<<<<<<<<<<
 *     cdef float32_t ratio1 = 1.0 - mix_ratio
 *     cdef float32_t ratio2 = mix_ratio
*/
  __pyx_v_channels = (__pyx_v_output.shape[1]);

  /* "coremusic/capi.pyx":7742
 *     cdef int frames = output.shape[0]
 *     cdef int channels = output.shape[1]
 *     cdef float32_t ratio1 = 1.0 - mix_ratio             # <<<<<<<<<<<<<<
 *     cdef float32_t ratio2 = mix_ratio
 *     cdef int i, j
*/
  __pyx_v_ratio1 = (1.0 - __pyx_v_mix_ratio);

  /* "coremusic/capi.pyx":7743
 *     cdef int channels = output.shape[1]
 *     cdef float32_t ratio1 = 1.0 - mix_ratio
 *     cdef float32_t ratio2 = mix_ratio             # <<<<<<<<<<<<<<
 *     cdef int i, j
 * 
*/
  __pyx_v_ratio2 = __pyx_v_mix_ratio;

  /* "coremusic/capi.pyx":7746
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7747
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 output[i, j] = input1[i, j] * ratio1 + input2[i, j] * ratio2
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7748
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 output[i, j] = input1[i, j] * ratio1 + input2[i, j] * ratio2
 * 
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7749
 *         for i in range(frames):
 *             for j in range(channels):
 *                 output[i, j] = input1[i, j] * ratio1 + input2[i, j] * ratio2             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_t_9 = __pyx_v_i;
            __pyx_t_10 = __pyx_v_j;
            __pyx_t_11 = __pyx_v_i;
            __pyx_t_12 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_output.data + __pyx_t_11 * __pyx_v_output.strides[0]) )) + __pyx_t_12)) )) = (((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_input1.data + __pyx_t_7 * __pyx_v_input1.strides[0]) )) + __pyx_t_8)) ))) * __pyx_v_ratio1) + ((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_input2.data + __pyx_t_9 * __pyx_v_input2.strides[0]) )) + __pyx_t_10)) ))) * __pyx_v_ratio2));
          }
        }
      }

      /* "coremusic/capi.pyx":7746
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7725
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mix_audio_float32(float32_t[:, ::1] output, float32_t[:, ::1] input1,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7752
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_float32_to_int16(float32_t[:, ::1] float_data, int16_t[:, ::1] int_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_857convert_float32_to_int16(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_856convert_float32_to_int16, "convert_float32_to_int16(float32_t[:, ::1] float_data, int16_t[:, ::1] int_data)\n\nConvert float32 audio to int16.\n\nArgs:\n    float_data: Input float32 data (frames, channels) in range [-1.0, 1.0]\n    int_data: Output int16 data (frames, channels)\n\nReturns:\n    None (writes to int_data buffer)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_857convert_float32_to_int16 = {"convert_float32_to_int16", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_857convert_float32_to_int16, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_856convert_float32_to_int16};
static PyObject *__pyx_pw_9coremusic_4capi_857convert_float32_to_int16(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_float_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_int_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_float32_to_int16 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_float_data,&__pyx_mstate_global->__pyx_n_u_int_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7752, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7752, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7752, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "convert_float32_to_int16", 0) < (0)) __PYX_ERR(0, 7752, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("convert_float32_to_int16", 1, 2, 2, i); __PYX_ERR(0, 7752, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7752, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7752, __pyx_L3_error)
    }
    __pyx_v_float_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_float_data.memview)) __PYX_ERR(0, 7754, __pyx_L3_error)
    __pyx_v_int_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_int16_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_int_data.memview)) __PYX_ERR(0, 7754, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_float32_to_int16", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7752, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_float_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_int_data, 1);
  __Pyx_AddTraceback("coremusic.capi.convert_float32_to_int16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_856convert_float32_to_int16(__pyx_self, __pyx_v_float_data, __pyx_v_int_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_float_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_int_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_856convert_float32_to_int16(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_float_data, __Pyx_memviewslice __pyx_v_int_data) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_value;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  __pyx_t_9coremusic_4capi_int16_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_float32_to_int16", 0);

  /* "coremusic/capi.pyx":7764
 *         None (writes to int_data buffer)
 *     """
 *     cdef int frames = float_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = float_data.shape[1]
 *     cdef int i, j
*/
  __pyx_v_frames = (__pyx_v_float_data.shape[0]);

  /* "coremusic/capi.pyx":7765
 *     """
 *     cdef int frames = float_data.shape[0]
 *     cdef int channels = float_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef int i, j
 *     cdef int value
*/
  __pyx_v_channels = (__pyx_v_float_data.shape[1]);

  /* "coremusic/capi.pyx":7769
 *     cdef int value
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7770
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 value = <int>(float_data[i, j] * 32767.0)
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7771
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 value = <int>(float_data[i, j] * 32767.0)
 *                 int_data[i, j] = clip_int16(value)
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7772
 *         for i in range(frames):
 *             for j in range(channels):
 *                 value = <int>(float_data[i, j] * 32767.0)             # <<<<<<<<<<<<<<
 *                 int_data[i, j] = clip_int16(value)
 * 
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_v_value = ((int)((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_float_data.data + __pyx_t_7 * __pyx_v_float_data.strides[0]) )) + __pyx_t_8)) ))) * 32767.0));

            /* "coremusic/capi.pyx":7773
 *             for j in range(channels):
 *                 value = <int>(float_data[i, j] * 32767.0)
 *                 int_data[i, j] = clip_int16(value)             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_9 = __pyx_f_9coremusic_4capi_clip_int16(__pyx_v_value); if (unlikely(__pyx_t_9 == ((__pyx_t_9coremusic_4capi_int16_t)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 7773, __pyx_L4_error)
            __pyx_t_8 = __pyx_v_i;
            __pyx_t_7 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_int16_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_int16_t *) ( /* dim=0 */ (__pyx_v_int_data.data + __pyx_t_8 * __pyx_v_int_data.strides[0]) )) + __pyx_t_7)) )) = __pyx_t_9;
          }
        }
      }

      /* "coremusic/capi.pyx":7769
 *     cdef int value
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7752
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_float32_to_int16(float32_t[:, ::1] float_data, int16_t[:, ::1] int_data):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.convert_float32_to_int16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7776
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_int16_to_float32(int16_t[:, ::1] int_data, float32_t[:, ::1] float_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_859convert_int16_to_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_858convert_int16_to_float32, "convert_int16_to_float32(int16_t[:, ::1] int_data, float32_t[:, ::1] float_data)\n\nConvert int16 audio to float32.\n\nArgs:\n    int_data: Input int16 data (frames, channels)\n    float_data: Output float32 data (frames, channels) in range [-1.0, 1.0]\n\nReturns:\n    None (writes to float_data buffer)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_859convert_int16_to_float32 = {"convert_int16_to_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_859convert_int16_to_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_858convert_int16_to_float32};
static PyObject *__pyx_pw_9coremusic_4capi_859convert_int16_to_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_int_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_float_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_int16_to_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_int_data,&__pyx_mstate_global->__pyx_n_u_float_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7776, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7776, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7776, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "convert_int16_to_float32", 0) < (0)) __PYX_ERR(0, 7776, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("convert_int16_to_float32", 1, 2, 2, i); __PYX_ERR(0, 7776, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7776, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7776, __pyx_L3_error)
    }
    __pyx_v_int_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_int16_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_int_data.memview)) __PYX_ERR(0, 7778, __pyx_L3_error)
    __pyx_v_float_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_float_data.memview)) __PYX_ERR(0, 7778, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("convert_int16_to_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7776, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_int_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_float_data, 1);
  __Pyx_AddTraceback("coremusic.capi.convert_int16_to_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_858convert_int16_to_float32(__pyx_self, __pyx_v_int_data, __pyx_v_float_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_int_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_float_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_858convert_int16_to_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_int_data, __Pyx_memviewslice __pyx_v_float_data) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("convert_int16_to_float32", 0);

  /* "coremusic/capi.pyx":7788
 *         None (writes to float_data buffer)
 *     """
 *     cdef int frames = int_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = int_data.shape[1]
 *     cdef int i, j
*/
  __pyx_v_frames = (__pyx_v_int_data.shape[0]);

  /* "coremusic/capi.pyx":7789
 *     """
 *     cdef int frames = int_data.shape[0]
 *     cdef int channels = int_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef int i, j
 * 
*/
  __pyx_v_channels = (__pyx_v_int_data.shape[1]);

  /* "coremusic/capi.pyx":7792
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7793
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 float_data[i, j] = <float32_t>int_data[i, j] / 32768.0
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7794
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 float_data[i, j] = <float32_t>int_data[i, j] / 32768.0
 * 
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7795
 *         for i in range(frames):
 *             for j in range(channels):
 *                 float_data[i, j] = <float32_t>int_data[i, j] / 32768.0             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_t_9 = __pyx_v_i;
            __pyx_t_10 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_float_data.data + __pyx_t_9 * __pyx_v_float_data.strides[0]) )) + __pyx_t_10)) )) = (((double)((__pyx_t_9coremusic_4capi_float32_t)(*((__pyx_t_9coremusic_4capi_int16_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_int16_t *) ( /* dim=0 */ (__pyx_v_int_data.data + __pyx_t_7 * __pyx_v_int_data.strides[0]) )) + __pyx_t_8)) ))))) / 32768.0);
          }
        }
      }

      /* "coremusic/capi.pyx":7792
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7776
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_int16_to_float32(int16_t[:, ::1] int_data, float32_t[:, ::1] float_data):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7802
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def stereo_to_mono_float32(float32_t[:, ::1] stereo_data, float32_t[::1] mono_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_861stereo_to_mono_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_860stereo_to_mono_float32, "stereo_to_mono_float32(float32_t[:, ::1] stereo_data, float32_t[::1] mono_data)\n\nConvert stereo audio to mono by averaging channels.\n\nArgs:\n    stereo_data: Input stereo data (frames, 2)\n    mono_data: Output mono data (frames,)\n\nReturns:\n    None (writes to mono_data buffer)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_861stereo_to_mono_float32 = {"stereo_to_mono_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_861stereo_to_mono_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_860stereo_to_mono_float32};
static PyObject *__pyx_pw_9coremusic_4capi_861stereo_to_mono_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_stereo_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_mono_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stereo_to_mono_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stereo_data,&__pyx_mstate_global->__pyx_n_u_mono_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7802, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7802, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7802, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "stereo_to_mono_float32", 0) < (0)) __PYX_ERR(0, 7802, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("stereo_to_mono_float32", 1, 2, 2, i); __PYX_ERR(0, 7802, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7802, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7802, __pyx_L3_error)
    }
    __pyx_v_stereo_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_stereo_data.memview)) __PYX_ERR(0, 7804, __pyx_L3_error)
    __pyx_v_mono_data = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_mono_data.memview)) __PYX_ERR(0, 7804, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stereo_to_mono_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7802, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_stereo_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_mono_data, 1);
  __Pyx_AddTraceback("coremusic.capi.stereo_to_mono_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_860stereo_to_mono_float32(__pyx_self, __pyx_v_stereo_data, __pyx_v_mono_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_stereo_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_mono_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_860stereo_to_mono_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_stereo_data, __Pyx_memviewslice __pyx_v_mono_data) {
  int __pyx_v_frames;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  __Pyx_RefNannySetupContext("stereo_to_mono_float32", 0);

  /* "coremusic/capi.pyx":7814
 *         None (writes to mono_data buffer)
 *     """
 *     cdef int frames = stereo_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 * 
*/
  __pyx_v_frames = (__pyx_v_stereo_data.shape[0]);

  /* "coremusic/capi.pyx":7817
 *     cdef int i
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             mono_data[i] = (stereo_data[i, 0] + stereo_data[i, 1]) * 0.5
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7818
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             mono_data[i] = (stereo_data[i, 0] + stereo_data[i, 1]) * 0.5
 * 
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7819
 *     with nogil:
 *         for i in range(frames):
 *             mono_data[i] = (stereo_data[i, 0] + stereo_data[i, 1]) * 0.5             # <<<<<<<<<<<<<<
 * 
 * 
*/
          __pyx_t_4 = __pyx_v_i;
          __pyx_t_5 = 0;
          __pyx_t_6 = __pyx_v_i;
          __pyx_t_7 = 1;
          __pyx_t_8 = __pyx_v_i;
          *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) __pyx_v_mono_data.data) + __pyx_t_8)) )) = (((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_stereo_data.data + __pyx_t_4 * __pyx_v_stereo_data.strides[0]) )) + __pyx_t_5)) ))) + (*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_stereo_data.data + __pyx_t_6 * __pyx_v_stereo_data.strides[0]) )) + __pyx_t_7)) )))) * 0.5);
        }
      }

      /* "coremusic/capi.pyx":7817
 *     cdef int i
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             mono_data[i] = (stereo_data[i, 0] + stereo_data[i, 1]) * 0.5
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7802
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def stereo_to_mono_float32(float32_t[:, ::1] stereo_data, float32_t[::1] mono_data):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7822
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mono_to_stereo_float32(float32_t[::1] mono_data, float32_t[:, ::1] stereo_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_863mono_to_stereo_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_862mono_to_stereo_float32, "mono_to_stereo_float32(float32_t[::1] mono_data, float32_t[:, ::1] stereo_data)\n\nConvert mono audio to stereo by duplicating channel.\n\nArgs:\n    mono_data: Input mono data (frames,)\n    stereo_data: Output stereo data (frames, 2)\n\nReturns:\n    None (writes to stereo_data buffer)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_863mono_to_stereo_float32 = {"mono_to_stereo_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_863mono_to_stereo_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_862mono_to_stereo_float32};
static PyObject *__pyx_pw_9coremusic_4capi_863mono_to_stereo_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_mono_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_stereo_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mono_to_stereo_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mono_data,&__pyx_mstate_global->__pyx_n_u_stereo_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7822, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7822, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7822, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mono_to_stereo_float32", 0) < (0)) __PYX_ERR(0, 7822, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mono_to_stereo_float32", 1, 2, 2, i); __PYX_ERR(0, 7822, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7822, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7822, __pyx_L3_error)
    }
    __pyx_v_mono_data = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_mono_data.memview)) __PYX_ERR(0, 7824, __pyx_L3_error)
    __pyx_v_stereo_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_stereo_data.memview)) __PYX_ERR(0, 7824, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mono_to_stereo_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7822, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_mono_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_stereo_data, 1);
  __Pyx_AddTraceback("coremusic.capi.mono_to_stereo_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_862mono_to_stereo_float32(__pyx_self, __pyx_v_mono_data, __pyx_v_stereo_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_mono_data, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_stereo_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_862mono_to_stereo_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_mono_data, __Pyx_memviewslice __pyx_v_stereo_data) {
  int __pyx_v_frames;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  __Pyx_RefNannySetupContext("mono_to_stereo_float32", 0);

  /* "coremusic/capi.pyx":7834
 *         None (writes to stereo_data buffer)
 *     """
 *     cdef int frames = mono_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 * 
*/
  __pyx_v_frames = (__pyx_v_mono_data.shape[0]);

  /* "coremusic/capi.pyx":7837
 *     cdef int i
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             stereo_data[i, 0] = mono_data[i]
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7838
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             stereo_data[i, 0] = mono_data[i]
 *             stereo_data[i, 1] = mono_data[i]
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7839
 *     with nogil:
 *         for i in range(frames):
 *             stereo_data[i, 0] = mono_data[i]             # <<<<<<<<<<<<<<
 *             stereo_data[i, 1] = mono_data[i]
 * 
*/
          __pyx_t_4 = __pyx_v_i;
          __pyx_t_5 = __pyx_v_i;
          __pyx_t_6 = 0;
          *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_stereo_data.data + __pyx_t_5 * __pyx_v_stereo_data.strides[0]) )) + __pyx_t_6)) )) = (*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) __pyx_v_mono_data.data) + __pyx_t_4)) )));

          /* "coremusic/capi.pyx":7840
 *         for i in range(frames):
 *             stereo_data[i, 0] = mono_data[i]
 *             stereo_data[i, 1] = mono_data[i]             # <<<<<<<<<<<<<<
 * 
 * 
*/
          __pyx_t_4 = __pyx_v_i;
          __pyx_t_6 = __pyx_v_i;
          __pyx_t_5 = 1;
          *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_stereo_data.data + __pyx_t_6 * __pyx_v_stereo_data.strides[0]) )) + __pyx_t_5)) )) = (*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) __pyx_v_mono_data.data) + __pyx_t_4)) )));
        }
      }

      /* "coremusic/capi.pyx":7837
 *     cdef int i
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             stereo_data[i, 0] = mono_data[i]
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7822
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mono_to_stereo_float32(float32_t[::1] mono_data, float32_t[:, ::1] stereo_data):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7847
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_in_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_865apply_fade_in_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_864apply_fade_in_float32, "apply_fade_in_float32(float32_t[:, ::1] audio_data, int fade_frames)\n\nApply linear fade-in to audio data.\n\nArgs:\n    audio_data: Audio data (frames, channels)\n    fade_frames: Number of frames for fade-in\n\nReturns:\n    None (modifies audio_data in-place)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_865apply_fade_in_float32 = {"apply_fade_in_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_865apply_fade_in_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_864apply_fade_in_float32};
static PyObject *__pyx_pw_9coremusic_4capi_865apply_fade_in_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_fade_frames;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_fade_in_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_fade_frames,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7847, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7847, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7847, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "apply_fade_in_float32", 0) < (0)) __PYX_ERR(0, 7847, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("apply_fade_in_float32", 1, 2, 2, i); __PYX_ERR(0, 7847, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7847, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7847, __pyx_L3_error)
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7849, __pyx_L3_error)
    __pyx_v_fade_frames = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_fade_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7849, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_fade_in_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7847, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.apply_fade_in_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_864apply_fade_in_float32(__pyx_self, __pyx_v_audio_data, __pyx_v_fade_frames);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_864apply_fade_in_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, int __pyx_v_fade_frames) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  int __pyx_v_actual_fade;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_fade_in_float32", 0);

  /* "coremusic/capi.pyx":7859
 *         None (modifies audio_data in-place)
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef int actual_fade = min(fade_frames, frames)
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7860
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef int actual_fade = min(fade_frames, frames)
 *     cdef float32_t gain
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7861
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef int actual_fade = min(fade_frames, frames)             # <<<<<<<<<<<<<<
 *     cdef float32_t gain
 *     cdef int i, j
*/
  __pyx_t_1 = __pyx_v_frames;
  __pyx_t_2 = __pyx_v_fade_frames;
  __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_4) {
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  __pyx_v_actual_fade = __pyx_t_3;

  /* "coremusic/capi.pyx":7865
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(actual_fade):
 *             gain = <float32_t>i / <float32_t>actual_fade
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7866
 * 
 *     with nogil:
 *         for i in range(actual_fade):             # <<<<<<<<<<<<<<
 *             gain = <float32_t>i / <float32_t>actual_fade
 *             for j in range(channels):
*/
        __pyx_t_3 = __pyx_v_actual_fade;
        __pyx_t_1 = __pyx_t_3;
        for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
          __pyx_v_i = __pyx_t_2;

          /* "coremusic/capi.pyx":7867
 *     with nogil:
 *         for i in range(actual_fade):
 *             gain = <float32_t>i / <float32_t>actual_fade             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 audio_data[i, j] *= gain
*/
          if (unlikely(((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_actual_fade) == 0)) {
            PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
            PyErr_SetString(PyExc_ZeroDivisionError, "float division");
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            __PYX_ERR(0, 7867, __pyx_L4_error)
          }
          __pyx_v_gain = (((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_i) / ((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_actual_fade));

          /* "coremusic/capi.pyx":7868
 *         for i in range(actual_fade):
 *             gain = <float32_t>i / <float32_t>actual_fade
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 audio_data[i, j] *= gain
 * 
*/
          __pyx_t_5 = __pyx_v_channels;
          __pyx_t_6 = __pyx_t_5;
          for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
            __pyx_v_j = __pyx_t_7;

            /* "coremusic/capi.pyx":7869
 *             gain = <float32_t>i / <float32_t>actual_fade
 *             for j in range(channels):
 *                 audio_data[i, j] *= gain             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_8 = __pyx_v_i;
            __pyx_t_9 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_8 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_9)) )) *= __pyx_v_gain;
          }
        }
      }

      /* "coremusic/capi.pyx":7865
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(actual_fade):
 *             gain = <float32_t>i / <float32_t>actual_fade
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7847
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_in_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.apply_fade_in_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7872
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_out_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_867apply_fade_out_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_866apply_fade_out_float32, "apply_fade_out_float32(float32_t[:, ::1] audio_data, int fade_frames)\n\nApply linear fade-out to audio data.\n\nArgs:\n    audio_data: Audio data (frames, channels)\n    fade_frames: Number of frames for fade-out\n\nReturns:\n    None (modifies audio_data in-place)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_867apply_fade_out_float32 = {"apply_fade_out_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_867apply_fade_out_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_866apply_fade_out_float32};
static PyObject *__pyx_pw_9coremusic_4capi_867apply_fade_out_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_fade_frames;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_fade_out_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_fade_frames,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7872, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7872, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7872, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "apply_fade_out_float32", 0) < (0)) __PYX_ERR(0, 7872, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("apply_fade_out_float32", 1, 2, 2, i); __PYX_ERR(0, 7872, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7872, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7872, __pyx_L3_error)
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7874, __pyx_L3_error)
    __pyx_v_fade_frames = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_fade_frames == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7874, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_fade_out_float32", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7872, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.apply_fade_out_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_866apply_fade_out_float32(__pyx_self, __pyx_v_audio_data, __pyx_v_fade_frames);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_866apply_fade_out_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data, int __pyx_v_fade_frames) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  int __pyx_v_actual_fade;
  int __pyx_v_start_frame;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_gain;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_fade_out_float32", 0);

  /* "coremusic/capi.pyx":7884
 *         None (modifies audio_data in-place)
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef int actual_fade = min(fade_frames, frames)
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7885
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef int actual_fade = min(fade_frames, frames)
 *     cdef int start_frame = frames - actual_fade
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7886
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef int actual_fade = min(fade_frames, frames)             # <<<<<<<<<<<<<<
 *     cdef int start_frame = frames - actual_fade
 *     cdef float32_t gain
*/
  __pyx_t_1 = __pyx_v_frames;
  __pyx_t_2 = __pyx_v_fade_frames;
  __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_4) {
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  __pyx_v_actual_fade = __pyx_t_3;

  /* "coremusic/capi.pyx":7887
 *     cdef int channels = audio_data.shape[1]
 *     cdef int actual_fade = min(fade_frames, frames)
 *     cdef int start_frame = frames - actual_fade             # <<<<<<<<<<<<<<
 *     cdef float32_t gain
 *     cdef int i, j
*/
  __pyx_v_start_frame = (__pyx_v_frames - __pyx_v_actual_fade);

  /* "coremusic/capi.pyx":7891
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(actual_fade):
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7892
 * 
 *     with nogil:
 *         for i in range(actual_fade):             # <<<<<<<<<<<<<<
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)
 *             for j in range(channels):
*/
        __pyx_t_3 = __pyx_v_actual_fade;
        __pyx_t_1 = __pyx_t_3;
        for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
          __pyx_v_i = __pyx_t_2;

          /* "coremusic/capi.pyx":7893
 *     with nogil:
 *         for i in range(actual_fade):
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 audio_data[start_frame + i, j] *= gain
*/
          if (unlikely(((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_actual_fade) == 0)) {
            PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
            PyErr_SetString(PyExc_ZeroDivisionError, "float division");
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            __PYX_ERR(0, 7893, __pyx_L4_error)
          }
          __pyx_v_gain = (1.0 - (((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_i) / ((__pyx_t_9coremusic_4capi_float32_t)__pyx_v_actual_fade)));

          /* "coremusic/capi.pyx":7894
 *         for i in range(actual_fade):
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 audio_data[start_frame + i, j] *= gain
 * 
*/
          __pyx_t_5 = __pyx_v_channels;
          __pyx_t_6 = __pyx_t_5;
          for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
            __pyx_v_j = __pyx_t_7;

            /* "coremusic/capi.pyx":7895
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)
 *             for j in range(channels):
 *                 audio_data[start_frame + i, j] *= gain             # <<<<<<<<<<<<<<
 * 
 * 
*/
            __pyx_t_8 = (__pyx_v_start_frame + __pyx_v_i);
            __pyx_t_9 = __pyx_v_j;
            *((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_8 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_9)) )) *= __pyx_v_gain;
          }
        }
      }

      /* "coremusic/capi.pyx":7891
 *     cdef int i, j
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(actual_fade):
 *             gain = 1.0 - (<float32_t>i / <float32_t>actual_fade)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7872
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_out_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("coremusic.capi.apply_fade_out_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7902
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_rms_float32(float32_t[:, ::1] audio_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_869calculate_rms_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_868calculate_rms_float32, "calculate_rms_float32(float32_t[:, ::1] audio_data)\n\nCalculate RMS (Root Mean Square) level of audio.\n\nArgs:\n    audio_data: Audio data (frames, channels)\n\nReturns:\n    RMS level as float");
static PyMethodDef __pyx_mdef_9coremusic_4capi_869calculate_rms_float32 = {"calculate_rms_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_869calculate_rms_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_868calculate_rms_float32};
static PyObject *__pyx_pw_9coremusic_4capi_869calculate_rms_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_rms_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7902, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7902, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "calculate_rms_float32", 0) < (0)) __PYX_ERR(0, 7902, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("calculate_rms_float32", 1, 1, 1, i); __PYX_ERR(0, 7902, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7902, __pyx_L3_error)
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7904, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_rms_float32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7902, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.calculate_rms_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_868calculate_rms_float32(__pyx_self, __pyx_v_audio_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_868calculate_rms_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  __pyx_t_9coremusic_4capi_float64_t __pyx_v_sum_squares;
  int __pyx_v_i;
  int __pyx_v_j;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_sample;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_rms_float32", 0);

  /* "coremusic/capi.pyx":7913
 *         RMS level as float
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef float64_t sum_squares = 0.0
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7914
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef float64_t sum_squares = 0.0
 *     cdef int i, j
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7915
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef float64_t sum_squares = 0.0             # <<<<<<<<<<<<<<
 *     cdef int i, j
 *     cdef float32_t sample
*/
  __pyx_v_sum_squares = 0.0;

  /* "coremusic/capi.pyx":7919
 *     cdef float32_t sample
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7920
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 sample = audio_data[i, j]
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7921
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 sample = audio_data[i, j]
 *                 sum_squares += sample * sample
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7922
 *         for i in range(frames):
 *             for j in range(channels):
 *                 sample = audio_data[i, j]             # <<<<<<<<<<<<<<
 *                 sum_squares += sample * sample
 * 
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_v_sample = (*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_7 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_8)) )));

            /* "coremusic/capi.pyx":7923
 *             for j in range(channels):
 *                 sample = audio_data[i, j]
 *                 sum_squares += sample * sample             # <<<<<<<<<<<<<<
 * 
 *     return sqrt(sum_squares / (frames * channels))
*/
            __pyx_v_sum_squares = (__pyx_v_sum_squares + (__pyx_v_sample * __pyx_v_sample));
          }
        }
      }

      /* "coremusic/capi.pyx":7919
 *     cdef float32_t sample
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7925
 *                 sum_squares += sample * sample
 * 
 *     return sqrt(sum_squares / (frames * channels))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (__pyx_v_frames * __pyx_v_channels);
  if (unlikely(__pyx_t_1 == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 7925, __pyx_L1_error)
  }
  __pyx_t_9 = PyFloat_FromDouble(sqrt((__pyx_v_sum_squares / ((__pyx_t_9coremusic_4capi_float64_t)__pyx_t_1)))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 7925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7902
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_rms_float32(float32_t[:, ::1] audio_data):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("coremusic.capi.calculate_rms_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7928
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_peak_float32(float32_t[:, ::1] audio_data):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_871calculate_peak_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_870calculate_peak_float32, "calculate_peak_float32(float32_t[:, ::1] audio_data)\n\nCalculate peak level of audio.\n\nArgs:\n    audio_data: Audio data (frames, channels)\n\nReturns:\n    Peak level as float");
static PyMethodDef __pyx_mdef_9coremusic_4capi_871calculate_peak_float32 = {"calculate_peak_float32", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_871calculate_peak_float32, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_870calculate_peak_float32};
static PyObject *__pyx_pw_9coremusic_4capi_871calculate_peak_float32(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_audio_data = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_peak_float32 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7928, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7928, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "calculate_peak_float32", 0) < (0)) __PYX_ERR(0, 7928, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("calculate_peak_float32", 1, 1, 1, i); __PYX_ERR(0, 7928, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7928, __pyx_L3_error)
    }
    __pyx_v_audio_data = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_audio_data.memview)) __PYX_ERR(0, 7930, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_peak_float32", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7928, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_AddTraceback("coremusic.capi.calculate_peak_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_870calculate_peak_float32(__pyx_self, __pyx_v_audio_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_audio_data, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_870calculate_peak_float32(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_audio_data) {
  int __pyx_v_frames;
  int __pyx_v_channels;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_peak;
  int __pyx_v_i;
  int __pyx_v_j;
  __pyx_t_9coremusic_4capi_float32_t __pyx_v_abs_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_peak_float32", 0);

  /* "coremusic/capi.pyx":7939
 *         Peak level as float
 *     """
 *     cdef int frames = audio_data.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t peak = 0.0
*/
  __pyx_v_frames = (__pyx_v_audio_data.shape[0]);

  /* "coremusic/capi.pyx":7940
 *     """
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]             # <<<<<<<<<<<<<<
 *     cdef float32_t peak = 0.0
 *     cdef int i, j
*/
  __pyx_v_channels = (__pyx_v_audio_data.shape[1]);

  /* "coremusic/capi.pyx":7941
 *     cdef int frames = audio_data.shape[0]
 *     cdef int channels = audio_data.shape[1]
 *     cdef float32_t peak = 0.0             # <<<<<<<<<<<<<<
 *     cdef int i, j
 *     cdef float32_t abs_val
*/
  __pyx_v_peak = 0.0;

  /* "coremusic/capi.pyx":7945
 *     cdef float32_t abs_val
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "coremusic/capi.pyx":7946
 * 
 *     with nogil:
 *         for i in range(frames):             # <<<<<<<<<<<<<<
 *             for j in range(channels):
 *                 abs_val = fabs(audio_data[i, j])
*/
        __pyx_t_1 = __pyx_v_frames;
        __pyx_t_2 = __pyx_t_1;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
          __pyx_v_i = __pyx_t_3;

          /* "coremusic/capi.pyx":7947
 *     with nogil:
 *         for i in range(frames):
 *             for j in range(channels):             # <<<<<<<<<<<<<<
 *                 abs_val = fabs(audio_data[i, j])
 *                 if abs_val > peak:
*/
          __pyx_t_4 = __pyx_v_channels;
          __pyx_t_5 = __pyx_t_4;
          for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
            __pyx_v_j = __pyx_t_6;

            /* "coremusic/capi.pyx":7948
 *         for i in range(frames):
 *             for j in range(channels):
 *                 abs_val = fabs(audio_data[i, j])             # <<<<<<<<<<<<<<
 *                 if abs_val > peak:
 *                     peak = abs_val
*/
            __pyx_t_7 = __pyx_v_i;
            __pyx_t_8 = __pyx_v_j;
            __pyx_v_abs_val = fabs((*((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_9coremusic_4capi_float32_t *) ( /* dim=0 */ (__pyx_v_audio_data.data + __pyx_t_7 * __pyx_v_audio_data.strides[0]) )) + __pyx_t_8)) ))));

            /* "coremusic/capi.pyx":7949
 *             for j in range(channels):
 *                 abs_val = fabs(audio_data[i, j])
 *                 if abs_val > peak:             # <<<<<<<<<<<<<<
 *                     peak = abs_val
 * 
*/
            __pyx_t_9 = (__pyx_v_abs_val > __pyx_v_peak);
            if (__pyx_t_9) {

              /* "coremusic/capi.pyx":7950
 *                 abs_val = fabs(audio_data[i, j])
 *                 if abs_val > peak:
 *                     peak = abs_val             # <<<<<<<<<<<<<<
 * 
 *     return peak
*/
              __pyx_v_peak = __pyx_v_abs_val;

              /* "coremusic/capi.pyx":7949
 *             for j in range(channels):
 *                 abs_val = fabs(audio_data[i, j])
 *                 if abs_val > peak:             # <<<<<<<<<<<<<<
 *                     peak = abs_val
 * 
*/
            }
          }
        }
      }

      /* "coremusic/capi.pyx":7945
 *     cdef float32_t abs_val
 * 
 *     with nogil:             # <<<<<<<<<<<<<<
 *         for i in range(frames):
 *             for j in range(channels):
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "coremusic/capi.pyx":7952
 *                     peak = abs_val
 * 
 *     return peak             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = PyFloat_FromDouble(__pyx_v_peak); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7928
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_peak_float32(float32_t[:, ::1] audio_data):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("coremusic.capi.calculate_peak_float32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7959
 * # =============================================================================
 * 
 * def normalize_audio(audio_data, float target_peak=0.9):             # <<<<<<<<<<<<<<
 *     """Normalize audio to target peak level (NumPy wrapper).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_873normalize_audio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_872normalize_audio, "normalize_audio(audio_data, float target_peak=0.9)\n\nNormalize audio to target peak level (NumPy wrapper).\n\nArgs:\n    audio_data: NumPy array of float32 audio data\n    target_peak: Target peak level (0.0 to 1.0)\n\nReturns:\n    Normalized audio array\n\nExample:\n    >>> import numpy as np\n    >>> import coremusic as cm\n    >>> audio = np.random.randn(44100, 2).astype(np.float32)\n    >>> normalized = cm.normalize_audio(audio, target_peak=0.8)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_873normalize_audio = {"normalize_audio", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_873normalize_audio, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_872normalize_audio};
static PyObject *__pyx_pw_9coremusic_4capi_873normalize_audio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_audio_data = 0;
  float __pyx_v_target_peak;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize_audio (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_target_peak,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7959, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7959, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7959, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "normalize_audio", 0) < (0)) __PYX_ERR(0, 7959, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("normalize_audio", 0, 1, 2, i); __PYX_ERR(0, 7959, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7959, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7959, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_audio_data = values[0];
    if (values[1]) {
      __pyx_v_target_peak = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_target_peak == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7959, __pyx_L3_error)
    } else {
      __pyx_v_target_peak = ((float)((double)0.9));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normalize_audio", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 7959, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.normalize_audio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_872normalize_audio(__pyx_self, __pyx_v_audio_data, __pyx_v_target_peak);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_872normalize_audio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data, float __pyx_v_target_peak) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize_audio", 0);
  __Pyx_INCREF(__pyx_v_audio_data);

  /* "coremusic/capi.pyx":7975
 *         >>> normalized = cm.normalize_audio(audio, target_peak=0.8)
 *     """
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.dtype != np.float32:
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7975, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":7977
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 7977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":7978
 * 
 *     if audio_data.dtype != np.float32:
 *         audio_data = audio_data.astype(np.float32)             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.ndim == 1:
*/
    __pyx_t_3 = __pyx_v_audio_data;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":7977
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  }

  /* "coremusic/capi.pyx":7980
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 7980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":7981
 * 
 *     if audio_data.ndim == 1:
 *         audio_data = audio_data.reshape(-1, 1)             # <<<<<<<<<<<<<<
 * 
 *     result = audio_data.copy()
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":7980
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  }

  /* "coremusic/capi.pyx":7983
 *         audio_data = audio_data.reshape(-1, 1)
 * 
 *     result = audio_data.copy()             # <<<<<<<<<<<<<<
 *     normalize_audio_float32(result, target_peak)
 *     return result
*/
  __pyx_t_4 = __pyx_v_audio_data;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":7984
 * 
 *     result = audio_data.copy()
 *     normalize_audio_float32(result, target_peak)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_normalize_audio_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_target_peak); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 7984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_result, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":7985
 *     result = audio_data.copy()
 *     normalize_audio_float32(result, target_peak)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7959
 * # =============================================================================
 * 
 * def normalize_audio(audio_data, float target_peak=0.9):             # <<<<<<<<<<<<<<
 *     """Normalize audio to target peak level (NumPy wrapper).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.normalize_audio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_audio_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":7988
 * 
 * 
 * def apply_gain(audio_data, float gain_db):             # <<<<<<<<<<<<<<
 *     """Apply gain in decibels (NumPy wrapper).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_875apply_gain(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_874apply_gain, "apply_gain(audio_data, float gain_db)\n\nApply gain in decibels (NumPy wrapper).\n\nArgs:\n    audio_data: NumPy array of float32 audio data\n    gain_db: Gain in decibels\n\nReturns:\n    Audio with gain applied\n\nExample:\n    >>> import numpy as np\n    >>> import coremusic as cm\n    >>> audio = np.random.randn(44100, 2).astype(np.float32)\n    >>> louder = cm.apply_gain(audio, gain_db=6.0)  # +6dB");
static PyMethodDef __pyx_mdef_9coremusic_4capi_875apply_gain = {"apply_gain", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_875apply_gain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_874apply_gain};
static PyObject *__pyx_pw_9coremusic_4capi_875apply_gain(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_audio_data = 0;
  float __pyx_v_gain_db;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_gain (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,&__pyx_mstate_global->__pyx_n_u_gain_db,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7988, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "apply_gain", 0) < (0)) __PYX_ERR(0, 7988, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("apply_gain", 1, 2, 2, i); __PYX_ERR(0, 7988, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7988, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7988, __pyx_L3_error)
    }
    __pyx_v_audio_data = values[0];
    __pyx_v_gain_db = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_gain_db == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7988, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_gain", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 7988, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.apply_gain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_874apply_gain(__pyx_self, __pyx_v_audio_data, __pyx_v_gain_db);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_874apply_gain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data, float __pyx_v_gain_db) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("apply_gain", 0);
  __Pyx_INCREF(__pyx_v_audio_data);

  /* "coremusic/capi.pyx":8004
 *         >>> louder = cm.apply_gain(audio, gain_db=6.0)  # +6dB
 *     """
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.dtype != np.float32:
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8004, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":8006
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8007
 * 
 *     if audio_data.dtype != np.float32:
 *         audio_data = audio_data.astype(np.float32)             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.ndim == 1:
*/
    __pyx_t_3 = __pyx_v_audio_data;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":8006
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  }

  /* "coremusic/capi.pyx":8009
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8010
 * 
 *     if audio_data.ndim == 1:
 *         audio_data = audio_data.reshape(-1, 1)             # <<<<<<<<<<<<<<
 * 
 *     result = audio_data.copy()
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":8009
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  }

  /* "coremusic/capi.pyx":8012
 *         audio_data = audio_data.reshape(-1, 1)
 * 
 *     result = audio_data.copy()             # <<<<<<<<<<<<<<
 *     apply_gain_float32(result, gain_db)
 *     return result
*/
  __pyx_t_4 = __pyx_v_audio_data;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":8013
 * 
 *     result = audio_data.copy()
 *     apply_gain_float32(result, gain_db)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_apply_gain_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_gain_db); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_result, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":8014
 *     result = audio_data.copy()
 *     apply_gain_float32(result, gain_db)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":7988
 * 
 * 
 * def apply_gain(audio_data, float gain_db):             # <<<<<<<<<<<<<<
 *     """Apply gain in decibels (NumPy wrapper).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.apply_gain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_audio_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":8017
 * 
 * 
 * def calculate_rms(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate RMS level (NumPy wrapper).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_877calculate_rms(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_876calculate_rms, "calculate_rms(audio_data)\n\nCalculate RMS level (NumPy wrapper).\n\nArgs:\n    audio_data: NumPy array of float32 audio data\n\nReturns:\n    RMS level as float\n\nExample:\n    >>> import numpy as np\n    >>> import coremusic as cm\n    >>> audio = np.random.randn(44100, 2).astype(np.float32) * 0.5\n    >>> rms = cm.calculate_rms(audio)\n    >>> print(f\"RMS level: {rms:.4f}\")");
static PyMethodDef __pyx_mdef_9coremusic_4capi_877calculate_rms = {"calculate_rms", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_877calculate_rms, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_876calculate_rms};
static PyObject *__pyx_pw_9coremusic_4capi_877calculate_rms(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_audio_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_rms (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 8017, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 8017, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "calculate_rms", 0) < (0)) __PYX_ERR(0, 8017, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("calculate_rms", 1, 1, 1, i); __PYX_ERR(0, 8017, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 8017, __pyx_L3_error)
    }
    __pyx_v_audio_data = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_rms", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 8017, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.calculate_rms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_876calculate_rms(__pyx_self, __pyx_v_audio_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_876calculate_rms(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_rms", 0);
  __Pyx_INCREF(__pyx_v_audio_data);

  /* "coremusic/capi.pyx":8033
 *         >>> print(f"RMS level: {rms:.4f}")
 *     """
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.dtype != np.float32:
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8033, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":8035
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8036
 * 
 *     if audio_data.dtype != np.float32:
 *         audio_data = audio_data.astype(np.float32)             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.ndim == 1:
*/
    __pyx_t_3 = __pyx_v_audio_data;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":8035
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  }

  /* "coremusic/capi.pyx":8038
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8039
 * 
 *     if audio_data.ndim == 1:
 *         audio_data = audio_data.reshape(-1, 1)             # <<<<<<<<<<<<<<
 * 
 *     return calculate_rms_float32(audio_data)
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":8038
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  }

  /* "coremusic/capi.pyx":8041
 *         audio_data = audio_data.reshape(-1, 1)
 * 
 *     return calculate_rms_float32(audio_data)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_calculate_rms_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_audio_data};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":8017
 * 
 * 
 * def calculate_rms(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate RMS level (NumPy wrapper).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.calculate_rms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_audio_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":8044
 * 
 * 
 * def calculate_peak(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate peak level (NumPy wrapper).
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_879calculate_peak(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_878calculate_peak, "calculate_peak(audio_data)\n\nCalculate peak level (NumPy wrapper).\n\nArgs:\n    audio_data: NumPy array of float32 audio data\n\nReturns:\n    Peak level as float\n\nExample:\n    >>> import numpy as np\n    >>> import coremusic as cm\n    >>> audio = np.random.randn(44100, 2).astype(np.float32) * 0.5\n    >>> peak = cm.calculate_peak(audio)\n    >>> print(f\"Peak level: {peak:.4f}\")");
static PyMethodDef __pyx_mdef_9coremusic_4capi_879calculate_peak = {"calculate_peak", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_879calculate_peak, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_878calculate_peak};
static PyObject *__pyx_pw_9coremusic_4capi_879calculate_peak(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_audio_data = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_peak (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_audio_data,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 8044, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 8044, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "calculate_peak", 0) < (0)) __PYX_ERR(0, 8044, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("calculate_peak", 1, 1, 1, i); __PYX_ERR(0, 8044, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 8044, __pyx_L3_error)
    }
    __pyx_v_audio_data = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_peak", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 8044, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("coremusic.capi.calculate_peak", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_878calculate_peak(__pyx_self, __pyx_v_audio_data);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9coremusic_4capi_878calculate_peak(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_data) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_peak", 0);
  __Pyx_INCREF(__pyx_v_audio_data);

  /* "coremusic/capi.pyx":8060
 *         >>> print(f"Peak level: {peak:.4f}")
 *     """
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.dtype != np.float32:
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8060, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":8062
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8063
 * 
 *     if audio_data.dtype != np.float32:
 *         audio_data = audio_data.astype(np.float32)             # <<<<<<<<<<<<<<
 * 
 *     if audio_data.ndim == 1:
*/
    __pyx_t_3 = __pyx_v_audio_data;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":8062
 *     import numpy as np
 * 
 *     if audio_data.dtype != np.float32:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.astype(np.float32)
 * 
*/
  }

  /* "coremusic/capi.pyx":8065
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 8065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "coremusic/capi.pyx":8066
 * 
 *     if audio_data.ndim == 1:
 *         audio_data = audio_data.reshape(-1, 1)             # <<<<<<<<<<<<<<
 * 
 *     return calculate_peak_float32(audio_data)
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_data, __pyx_mstate_global->__pyx_n_u_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_audio_data, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":8065
 *         audio_data = audio_data.astype(np.float32)
 * 
 *     if audio_data.ndim == 1:             # <<<<<<<<<<<<<<
 *         audio_data = audio_data.reshape(-1, 1)
 * 
*/
  }

  /* "coremusic/capi.pyx":8068
 *         audio_data = audio_data.reshape(-1, 1)
 * 
 *     return calculate_peak_float32(audio_data)             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_calculate_peak_float32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_audio_data};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":8044
 * 
 * 
 * def calculate_peak(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate peak level (NumPy wrapper).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("coremusic.capi.calculate_peak", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_audio_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_9coremusic_4capi_AudioPlayer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9coremusic_4capi_AudioPlayer *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)o);
  p->_link_session_ref = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9coremusic_4capi_AudioPlayer(PyObject *o) {
  struct __pyx_obj_9coremusic_4capi_AudioPlayer *p = (struct __pyx_obj_9coremusic_4capi_AudioPlayer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9coremusic_4capi_AudioPlayer) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_9coremusic_4capi_11AudioPlayer_23__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_link_session_ref);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_9coremusic_4capi_AudioPlayer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9coremusic_4capi_AudioPlayer *p = (struct __pyx_obj_9coremusic_4capi_AudioPlayer *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->_link_session_ref) {
    e = (*v)(p->_link_session_ref, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9coremusic_4capi_AudioPlayer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9coremusic_4capi_AudioPlayer *p = (struct __pyx_obj_9coremusic_4capi_AudioPlayer *)o;
  tmp = ((PyObject*)p->_link_session_ref);
  p->_link_session_ref = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9coremusic_4capi_11AudioPlayer_link_session(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9coremusic_4capi_11AudioPlayer_12link_session_1__get__(o);
}

static PyMethodDef __pyx_methods_9coremusic_4capi_AudioPlayer[] = {
  {"load_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_3load_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_2load_file},
  {"setup_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_5setup_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_4setup_output},
  {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_7start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_6start},
  {"play", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_9play, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_8play},
  {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_11stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_10stop},
  {"set_looping", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_13set_looping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_12set_looping},
  {"reset_playback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_15reset_playback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_14reset_playback},
  {"is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_17is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_16is_playing},
  {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_19get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_18get_progress},
  {"get_link_timing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_21get_link_timing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_20get_link_timing},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_24__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_26__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9coremusic_4capi_AudioPlayer[] = {
  {"link_session", __pyx_getprop_9coremusic_4capi_11AudioPlayer_link_session, 0, PyDoc_STR("Get the Link session if one was provided"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9coremusic_4capi_AudioPlayer_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9coremusic_4capi_AudioPlayer},
  {Py_tp_doc, (void *)PyDoc_STR("AudioPlayer(link_session=None)\n\nPure Cython audio player using AudioUnit for playback\n\nSupports optional Ableton Link integration for tempo-synchronized playback.\nLink timing is handled at the Python layer before starting playback.")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9coremusic_4capi_AudioPlayer},
  {Py_tp_clear, (void *)__pyx_tp_clear_9coremusic_4capi_AudioPlayer},
  {Py_tp_methods, (void *)__pyx_methods_9coremusic_4capi_AudioPlayer},
  {Py_tp_getset, (void *)__pyx_getsets_9coremusic_4capi_AudioPlayer},
  {Py_tp_init, (void *)__pyx_pw_9coremusic_4capi_11AudioPlayer_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9coremusic_4capi_AudioPlayer},
  {0, 0},
};
static PyType_Spec __pyx_type_9coremusic_4capi_AudioPlayer_spec = {
  "coremusic.capi.AudioPlayer",
  sizeof(struct __pyx_obj_9coremusic_4capi_AudioPlayer),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9coremusic_4capi_AudioPlayer_slots,
};
#else

static PyTypeObject __pyx_type_9coremusic_4capi_AudioPlayer = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""AudioPlayer", /*tp_name*/
  sizeof(struct __pyx_obj_9coremusic_4capi_AudioPlayer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9coremusic_4capi_AudioPlayer, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("AudioPlayer(link_session=None)\n\nPure Cython audio player using AudioUnit for playback\n\nSupports optional Ableton Link integration for tempo-synchronized playback.\nLink timing is handled at the Python layer before starting playback."), /*tp_doc*/
  __pyx_tp_traverse_9coremusic_4capi_AudioPlayer, /*tp_traverse*/
  __pyx_tp_clear_9coremusic_4capi_AudioPlayer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9coremusic_4capi_AudioPlayer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9coremusic_4capi_AudioPlayer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9coremusic_4capi_11AudioPlayer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9coremusic_4capi_AudioPlayer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9coremusic_4capi_AudioRecorder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9coremusic_4capi_AudioRecorder *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9coremusic_4capi_AudioRecorder *)o);
  p->output_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9coremusic_4capi_AudioRecorder(PyObject *o) {
  struct __pyx_obj_9coremusic_4capi_AudioRecorder *p = (struct __pyx_obj_9coremusic_4capi_AudioRecorder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9coremusic_4capi_AudioRecorder) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_9coremusic_4capi_13AudioRecorder_25__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->output_path);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_getprop_9coremusic_4capi_13AudioRecorder_sample_rate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9coremusic_4capi_13AudioRecorder_11sample_rate_1__get__(o);
}

static PyObject *__pyx_getprop_9coremusic_4capi_13AudioRecorder_channels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9coremusic_4capi_13AudioRecorder_8channels_1__get__(o);
}

static PyMethodDef __pyx_methods_9coremusic_4capi_AudioRecorder[] = {
  {"setup_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_3setup_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_2setup_input},
  {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_5start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_4start},
  {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_7stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_6stop},
  {"is_recording", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_9is_recording, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_8is_recording},
  {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_11get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_10get_progress},
  {"get_recorded_frames", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_13get_recorded_frames, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_12get_recorded_frames},
  {"get_recorded_duration", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_15get_recorded_duration, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_14get_recorded_duration},
  {"run_loop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_17run_loop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_16run_loop},
  {"save_to_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_19save_to_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_18save_to_file},
  {"get_audio_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_21get_audio_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_20get_audio_data},
  {"has_audio_content", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_23has_audio_content, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_22has_audio_content},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_27__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_26__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13AudioRecorder_29__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_13AudioRecorder_28__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9coremusic_4capi_AudioRecorder[] = {
  {"sample_rate", __pyx_getprop_9coremusic_4capi_13AudioRecorder_sample_rate, 0, PyDoc_STR("Get the sample rate"), 0},
  {"channels", __pyx_getprop_9coremusic_4capi_13AudioRecorder_channels, 0, PyDoc_STR("Get the number of channels"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9coremusic_4capi_AudioRecorder_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9coremusic_4capi_AudioRecorder},
  {Py_tp_doc, (void *)PyDoc_STR("AudioRecorder(sample_rate=44100, channels=2)\n\nPure Cython audio recorder using AudioQueue for input capture\n\nRecords audio from the default input device to a buffer that can be\nsaved to a file.")},
  {Py_tp_methods, (void *)__pyx_methods_9coremusic_4capi_AudioRecorder},
  {Py_tp_getset, (void *)__pyx_getsets_9coremusic_4capi_AudioRecorder},
  {Py_tp_init, (void *)__pyx_pw_9coremusic_4capi_13AudioRecorder_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9coremusic_4capi_AudioRecorder},
  {0, 0},
};
static PyType_Spec __pyx_type_9coremusic_4capi_AudioRecorder_spec = {
  "coremusic.capi.AudioRecorder",
  sizeof(struct __pyx_obj_9coremusic_4capi_AudioRecorder),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9coremusic_4capi_AudioRecorder_slots,
};
#else

static PyTypeObject __pyx_type_9coremusic_4capi_AudioRecorder = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""AudioRecorder", /*tp_name*/
  sizeof(struct __pyx_obj_9coremusic_4capi_AudioRecorder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9coremusic_4capi_AudioRecorder, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("AudioRecorder(sample_rate=44100, channels=2)\n\nPure Cython audio recorder using AudioQueue for input capture\n\nRecords audio from the default input device to a buffer that can be\nsaved to a file."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9coremusic_4capi_AudioRecorder, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9coremusic_4capi_AudioRecorder, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9coremusic_4capi_13AudioRecorder_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9coremusic_4capi_AudioRecorder, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9coremusic_4capi_CoreAudioObject __pyx_vtable_9coremusic_4capi_CoreAudioObject;

static PyObject *__pyx_tp_new_9coremusic_4capi_CoreAudioObject(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9coremusic_4capi_CoreAudioObject *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9coremusic_4capi_CoreAudioObject *)o);
  p->__pyx_vtab = __pyx_vtabptr_9coremusic_4capi_CoreAudioObject;
  if (unlikely(__pyx_pw_9coremusic_4capi_15CoreAudioObject_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9coremusic_4capi_CoreAudioObject(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9coremusic_4capi_CoreAudioObject) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_9coremusic_4capi_15CoreAudioObject_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_getprop_9coremusic_4capi_15CoreAudioObject_is_disposed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9coremusic_4capi_15CoreAudioObject_11is_disposed_1__get__(o);
}

static PyObject *__pyx_getprop_9coremusic_4capi_15CoreAudioObject_object_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9coremusic_4capi_15CoreAudioObject_9object_id_1__get__(o);
}

static PyMethodDef __pyx_methods_9coremusic_4capi_CoreAudioObject[] = {
  {"dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_5dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_4dispose},
  {"_ensure_not_disposed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_6_ensure_not_disposed},
  {"_set_object_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_9_set_object_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_8_set_object_id},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_15CoreAudioObject_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9coremusic_4capi_CoreAudioObject[] = {
  {"is_disposed", __pyx_getprop_9coremusic_4capi_15CoreAudioObject_is_disposed, 0, PyDoc_STR("CoreAudioObject.is_disposed: bool\n\nCheck if the object has been disposed"), 0},
  {"object_id", __pyx_getprop_9coremusic_4capi_15CoreAudioObject_object_id, 0, PyDoc_STR("CoreAudioObject.object_id: int\n\nExpose object ID for testing purposes"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9coremusic_4capi_CoreAudioObject_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9coremusic_4capi_CoreAudioObject},
  {Py_tp_doc, (void *)PyDoc_STR("Base class for all CoreAudio objects with automatic resource management\n\n    This is the only Cython extension class, providing __dealloc__ for automatic\n    cleanup. All other classes are implemented as pure Python classes.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_9coremusic_4capi_CoreAudioObject},
  {Py_tp_getset, (void *)__pyx_getsets_9coremusic_4capi_CoreAudioObject},
  {Py_tp_new, (void *)__pyx_tp_new_9coremusic_4capi_CoreAudioObject},
  {0, 0},
};
static PyType_Spec __pyx_type_9coremusic_4capi_CoreAudioObject_spec = {
  "coremusic.capi.CoreAudioObject",
  sizeof(struct __pyx_obj_9coremusic_4capi_CoreAudioObject),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9coremusic_4capi_CoreAudioObject_slots,
};
#else

static PyTypeObject __pyx_type_9coremusic_4capi_CoreAudioObject = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""CoreAudioObject", /*tp_name*/
  sizeof(struct __pyx_obj_9coremusic_4capi_CoreAudioObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9coremusic_4capi_CoreAudioObject, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("Base class for all CoreAudio objects with automatic resource management\n\n    This is the only Cython extension class, providing __dealloc__ for automatic\n    cleanup. All other classes are implemented as pure Python classes.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9coremusic_4capi_CoreAudioObject, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9coremusic_4capi_CoreAudioObject, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9coremusic_4capi_CoreAudioObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_array___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_array = {
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_array_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
  {Py_sq_length, (void *)__pyx_array___len__},
  {Py_sq_item, (void *)__pyx_sq_item_array},
  {Py_mp_length, (void *)__pyx_array___len__},
  {Py_mp_subscript, (void *)__pyx_array___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
  {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
  #endif
  {Py_tp_methods, (void *)__pyx_methods_array},
  {Py_tp_getset, (void *)__pyx_getsets_array},
  {Py_tp_new, (void *)__pyx_tp_new_array},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_array_spec = {
  "coremusic.capi.array",
  sizeof(struct __pyx_array_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_array_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
  {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
  {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
  {Py_tp_methods, (void *)__pyx_methods_Enum},
  {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
  {Py_tp_new, (void *)__pyx_tp_new_Enum},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
  "coremusic.capi.Enum",
  sizeof(struct __pyx_MemviewEnum_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_MemviewEnum_slots,
};
#else

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_MemviewEnum___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryview___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}

static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"is_c_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"is_f_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy_fortran", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0},
  {"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0},
  {"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0},
  {"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0},
  {"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0},
  {"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0},
  {"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0},
  {"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0},
  {"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
  {Py_tp_repr, (void *)__pyx_memoryview___repr__},
  {Py_sq_length, (void *)__pyx_memoryview___len__},
  {Py_sq_item, (void *)__pyx_sq_item_memoryview},
  {Py_mp_length, (void *)__pyx_memoryview___len__},
  {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
  {Py_tp_str, (void *)__pyx_memoryview___str__},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
  #endif
  {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
  {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
  {Py_tp_methods, (void *)__pyx_methods_memoryview},
  {Py_tp_getset, (void *)__pyx_getsets_memoryview},
  {Py_tp_new, (void *)__pyx_tp_new_memoryview},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryview_spec = {
  "coremusic.capi.memoryview",
  sizeof(struct __pyx_memoryview_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_memoryview_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_memoryview, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryviewslice___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
  {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
  {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
  {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
  {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
  "coremusic.capi._memoryviewslice",
  sizeof(struct __pyx_memoryviewslice_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_memoryviewslice_slots,
};
#else

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "coremusic.capi.""_memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
  PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new__memoryviewslice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9coremusic_4capi_AudioPlayer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer)) __PYX_ERR(0, 2755, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9coremusic_4capi_AudioPlayer_spec, __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer = &__pyx_type_9coremusic_4capi_AudioPlayer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer->tp_dictoffset && __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2755, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_9coremusic_4capi_11AudioPlayer___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9coremusic_4capi_11AudioPlayer___init__.doc = __pyx_doc_9coremusic_4capi_11AudioPlayer___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9coremusic_4capi_11AudioPlayer___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AudioPlayer, (PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9coremusic_4capi_AudioRecorder_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder)) __PYX_ERR(0, 3146, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9coremusic_4capi_AudioRecorder_spec, __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder) < (0)) __PYX_ERR(0, 3146, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder = &__pyx_type_9coremusic_4capi_AudioRecorder;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder) < (0)) __PYX_ERR(0, 3146, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder->tp_dictoffset && __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3146, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_9coremusic_4capi_13AudioRecorder___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9coremusic_4capi_13AudioRecorder___init__.doc = __pyx_doc_9coremusic_4capi_13AudioRecorder___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9coremusic_4capi_13AudioRecorder___init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_AudioRecorder, (PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder) < (0)) __PYX_ERR(0, 3146, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioRecorder) < (0)) __PYX_ERR(0, 3146, __pyx_L1_error)
  __pyx_vtabptr_9coremusic_4capi_CoreAudioObject = &__pyx_vtable_9coremusic_4capi_CoreAudioObject;
  __pyx_vtable_9coremusic_4capi_CoreAudioObject._dispose_internal = (void (*)(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *))__pyx_f_9coremusic_4capi_15CoreAudioObject__dispose_internal;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9coremusic_4capi_CoreAudioObject_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject)) __PYX_ERR(0, 6960, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9coremusic_4capi_CoreAudioObject_spec, __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject = &__pyx_type_9coremusic_4capi_CoreAudioObject;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject->tp_dictoffset && __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_vtabptr_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_CoreAudioObject, (PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 6960, __pyx_L1_error)
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_array_type)) __PYX_ERR(1, 110, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
  if (!__pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type);
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 110, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 299, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 299, __pyx_L1_error)
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_memoryview_type)) __PYX_ERR(1, 334, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
  if (!__pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 334, __pyx_L1_error)
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 951, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 951, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 951, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_capi(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_capi},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, Py_MOD_GIL_USED},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "capi",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_capi(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_capi(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_capi(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  static PyThread_type_lock __pyx_t_7[8];
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'capi' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "capi" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_capi", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_coremusic__capi) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "coremusic.capi")) {
      if (unlikely((PyDict_SetItemString(modules, "coremusic.capi", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "View.MemoryView":100
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "View.MemoryView":101
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
 * except:
 * 
*/
      __pyx_t_5 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_collections_abc};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin___import__, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
      __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;

      /* "View.MemoryView":100
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:
*/
    }
    __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_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":102
 * try:
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:             # <<<<<<<<<<<<<<
 * 
 *     __pyx_collections_abc_Sequence = None
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);

      /* "View.MemoryView":104
 * except:
 * 
 *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_INCREF(Py_None);
      __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
      __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
      __Pyx_GIVEREF(Py_None);
      goto __pyx_L3_exception_handled;
    }
    __pyx_L3_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_L7_try_end:;
  }

  /* "View.MemoryView":239
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "View.MemoryView":240
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 240, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":241
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 241, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 241, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":239
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
    }
    __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_L15_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":242
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __pyx_L11_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_L15_try_end:;
  }

  /* "View.MemoryView":307
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct_or_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 307, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":308
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 308, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":309
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":312
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_direct};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 312, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":313
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 313, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":321
 * 
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
*/
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":322
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
*/
  __pyx_t_7[0] = PyThread_allocate_lock();
  __pyx_t_7[1] = PyThread_allocate_lock();
  __pyx_t_7[2] = PyThread_allocate_lock();
  __pyx_t_7[3] = PyThread_allocate_lock();
  __pyx_t_7[4] = PyThread_allocate_lock();
  __pyx_t_7[5] = PyThread_allocate_lock();
  __pyx_t_7[6] = PyThread_allocate_lock();
  __pyx_t_7[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":983
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "View.MemoryView":984
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 984, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 984, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":985
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 985, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 985, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":983
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
    }
    __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_L23_try_end;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":986
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L19_exception_handled;
    }
    __pyx_L19_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_L23_try_end:;
  }

  /* "View.MemoryView":989
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "View.MemoryView":990
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 990, __pyx_L26_error)
      if (__pyx_t_8) {

        /* "View.MemoryView":994
 * 
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence.register(array)
 * except:
*/
        __pyx_t_5 = __pyx_collections_abc_Sequence;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_memoryviewslice_type)};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "View.MemoryView":995
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
 * except:
 *     pass  # ignore failure, it's a minor issue
*/
        __pyx_t_5 = __pyx_collections_abc_Sequence;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_array_type)};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 995, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "View.MemoryView":990
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
*/
      }

      /* "View.MemoryView":989
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
*/
    }
    __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_L31_try_end;
    __pyx_L26_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":996
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)
 * except:             # <<<<<<<<<<<<<<
 *     pass  # ignore failure, it's a minor issue
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L27_exception_handled;
    }
    __pyx_L27_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_L31_try_end:;
  }

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":16
 * 
 * # Import logging for structured error logging
 * from . import log, os_status             # <<<<<<<<<<<<<<
 * 
 * logger = log.config(__name__)
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_log,__pyx_mstate_global->__pyx_n_u_os_status};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u__7, __pyx_imported_names, 2, __pyx_mstate_global->__pyx_kp_u_coremusic, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_log,__pyx_mstate_global->__pyx_n_u_os_status};
    for (__pyx_t_9=0; __pyx_t_9 < 2; __pyx_t_9++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":18
 * from . import log, os_status
 * 
 * logger = log.config(__name__)             # <<<<<<<<<<<<<<
 * 
 * # Buffer size constants
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_config); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logger, __pyx_t_4) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":197
 * 
 * 
 * def fourchar_to_int(code: str) -> int:             # <<<<<<<<<<<<<<
 *    """Convert fourcc chars to an int
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_code, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 197, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 197, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_1fourchar_to_int, 0, __pyx_mstate_global->__pyx_n_u_fourchar_to_int, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fourchar_to_int, __pyx_t_11) < (0)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":207
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
 * def int_to_fourchar(n: int) -> str:             # <<<<<<<<<<<<<<
 *     """convert int to fourcc 4 chars
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_n, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_3int_to_fourchar, 0, __pyx_mstate_global->__pyx_n_u_int_to_fourchar, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int_to_fourchar, __pyx_t_4) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":220
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     """Show an AudioObject"""
 *     ca.AudioObjectShow(object_id)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_5audio_object_show, 0, __pyx_mstate_global->__pyx_n_u_audio_object_show, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_show, __pyx_t_4) < (0)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":224
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     """Unload the audio hardware"""
 *     return ca.AudioHardwareUnload()
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 224, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_7audio_hardware_unload, 0, __pyx_mstate_global->__pyx_n_u_audio_hardware_unload, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_unload, __pyx_t_11) < (0)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":229
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     """Destroy an audio hardware aggregate device"""
 *     return ca.AudioHardwareDestroyAggregateDevice(in_device_id)
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 229, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_9audio_hardware_destroy_aggregate_device, 0, __pyx_mstate_global->__pyx_n_u_audio_hardware_destroy_aggregate, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_destroy_aggregate, __pyx_t_4) < (0)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":235
 * 
 * # Audio Hardware Device Functions
 * def audio_object_get_property_data(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get property data from an AudioObject
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11audio_object_get_property_data, 0, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_data, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_data, __pyx_t_4) < (0)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":274
 * 
 * 
 * def audio_object_set_property_data(int object_id, int property_selector, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set property data on an AudioObject
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13audio_object_set_property_data, 0, __pyx_mstate_global->__pyx_n_u_audio_object_set_property_data, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_set_property_data, __pyx_t_4) < (0)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":297
 * 
 * 
 * def audio_object_is_property_settable(int object_id, int property_selector, int scope, int element) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if a property is settable on an AudioObject
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 297, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15audio_object_is_property_settable, 0, __pyx_mstate_global->__pyx_n_u_audio_object_is_property_settabl, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_is_property_settabl, __pyx_t_11) < (0)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":322
 * 
 * 
 * def audio_object_get_property_string(int object_id, int property_selector, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a string property from an AudioObject
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_17audio_object_get_property_string, 0, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_string, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_string, __pyx_t_11) < (0)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":345
 * 
 * 
 * def audio_hardware_get_devices() -> list:             # <<<<<<<<<<<<<<
 *     """Get list of all audio device IDs"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_list) < (0)) __PYX_ERR(0, 345, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_19audio_hardware_get_devices, 0, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_devices, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_devices, __pyx_t_4) < (0)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":386
 * 
 * 
 * def audio_hardware_get_default_output_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default output device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 386, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_21audio_hardware_get_default_output_device, 0, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_outpu, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_outpu, __pyx_t_11) < (0)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":407
 * 
 * 
 * def audio_hardware_get_default_input_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default input device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 407, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_23audio_hardware_get_default_input_device, 0, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_input, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_input, __pyx_t_4) < (0)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":429
 * 
 * # Audio File Functions
 * def audio_file_open_url(str file_path, int permissions=1, int file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an audio file at the given path"""
 *     cdef at.AudioFileID audio_file
*/
  __pyx_t_4 = __Pyx_PyLong_From_int(((int)1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(2, __pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_25audio_file_open_url, 0, __pyx_mstate_global->__pyx_n_u_audio_file_open_url, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_open_url, __pyx_t_11) < (0)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":460
 * 
 * 
 * def audio_file_close(long audio_file_id):             # <<<<<<<<<<<<<<
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_27audio_file_close, 0, __pyx_mstate_global->__pyx_n_u_audio_file_close, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_close, __pyx_t_11) < (0)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":469
 * 
 * 
 * def audio_file_get_property(long audio_file_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_29audio_file_get_property, 0, __pyx_mstate_global->__pyx_n_u_audio_file_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_get_property, __pyx_t_11) < (0)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":509
 * 
 * 
 * def audio_file_read_packets(long audio_file_id, long start_packet, int num_packets):             # <<<<<<<<<<<<<<
 *     """Read packets from an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_31audio_file_read_packets, 0, __pyx_mstate_global->__pyx_n_u_audio_file_read_packets, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_read_packets, __pyx_t_11) < (0)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":556
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_read_packets_into(long audio_file_id, long start_packet, int num_packets,
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_33audio_file_read_packets_into, 0, __pyx_mstate_global->__pyx_n_u_audio_file_read_packets_into, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_read_packets_into, __pyx_t_11) < (0)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":648
 *     pass
 * 
 * def audio_file_stream_open(file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an AudioFileStream parser for streaming audio data"""
 *     cdef at.AudioFileStreamID stream_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_35audio_file_stream_open, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_open, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[12]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_open, __pyx_t_11) < (0)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":666
 * 
 * 
 * def audio_file_stream_close(long stream_id):             # <<<<<<<<<<<<<<
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_37audio_file_stream_close, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_close, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_close, __pyx_t_11) < (0)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":675
 * 
 * 
 * def audio_file_stream_parse_bytes(long stream_id, bytes data, int flags=0):             # <<<<<<<<<<<<<<
 *     """Parse bytes through the AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_39audio_file_stream_parse_bytes, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_parse_bytes, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_parse_bytes, __pyx_t_11) < (0)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":698
 * def audio_file_stream_parse_buffer(long stream_id,
 *                                     const unsigned char[::1] data not None,
 *                                     int flags=0):             # <<<<<<<<<<<<<<
 *     """Parse buffer data through the AudioFileStream parser (zero-copy).
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "coremusic/capi.pyx":694
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_file_stream_parse_buffer(long stream_id,
*/
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_41audio_file_stream_parse_buffer, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_parse_buffer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_parse_buffer, __pyx_t_11) < (0)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":745
 * 
 * 
 * def audio_file_stream_get_property(long stream_id, int property_id):             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_43audio_file_stream_get_property, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_get_property, __pyx_t_11) < (0)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":806
 * 
 * 
 * def audio_file_stream_seek(long stream_id, long packet_offset):             # <<<<<<<<<<<<<<
 *     """Seek to a packet offset in the AudioFileStream"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_45audio_file_stream_seek, 0, __pyx_mstate_global->__pyx_n_u_audio_file_stream_seek, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_seek, __pyx_t_11) < (0)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":834
 * # ============================================================================
 * 
 * def audio_converter_new(source_format: dict, dest_format: dict) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AudioConverter
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_source_format, __pyx_mstate_global->__pyx_n_u_dict_2) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_dest_format, __pyx_mstate_global->__pyx_n_u_dict_2) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_47audio_converter_new, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_new, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_new, __pyx_t_10) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":859
 * 
 * 
 * def audio_converter_dispose(long converter_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_49audio_converter_dispose, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_dispose, __pyx_t_10) < (0)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":867
 * 
 * 
 * def audio_converter_convert_buffer(long converter_id, bytes input_data) -> bytes:             # <<<<<<<<<<<<<<
 *     """Convert audio data using AudioConverter
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_51audio_converter_convert_buffer, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_convert_buffer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_convert_buffer, __pyx_t_11) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":905
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_convert_buffer_into(long converter_id,
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_53audio_converter_convert_buffer_into, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_convert_buffer_i, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_convert_buffer_i, __pyx_t_11) < (0)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":958
 * 
 * 
 * def audio_converter_get_property(long converter_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioConverter
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes) < (0)) __PYX_ERR(0, 958, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_55audio_converter_get_property, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_get_property, __pyx_t_10) < (0)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":995
 * 
 * 
 * def audio_converter_set_property(long converter_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an AudioConverter
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_57audio_converter_set_property, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_set_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_set_property, __pyx_t_10) < (0)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1012
 * 
 * 
 * def audio_converter_reset(long converter_id):             # <<<<<<<<<<<<<<
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_59audio_converter_reset, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_reset, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_reset, __pyx_t_10) < (0)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1093
 * 
 * 
 * def audio_converter_fill_complex_buffer(             # <<<<<<<<<<<<<<
 *     long converter_id,
 *     bytes input_data,
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_61audio_converter_fill_complex_buffer, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_fill_complex_buf, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_fill_complex_buf, __pyx_t_11) < (0)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1188
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_converter_fill_complex_buffer_into(
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_63audio_converter_fill_complex_buffer_into, 0, __pyx_mstate_global->__pyx_n_u_audio_converter_fill_complex_buf_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_fill_complex_buf_2, __pyx_t_10) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1286
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum input buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_65get_audio_converter_property_min_input_buffer_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_min, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_min, __pyx_t_11) < (0)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1290
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum output buffer size for an audio converter"""
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_67get_audio_converter_property_min_output_buffer_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_min_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_min_2, __pyx_t_10) < (0)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1294
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum input packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_69get_audio_converter_property_max_input_packet_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_max, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_max, __pyx_t_11) < (0)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1298
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum output packet size for an audio converter"""
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_71get_audio_converter_property_max_output_packet_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_max_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_max_2, __pyx_t_10) < (0)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1302
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the sample rate converter quality for an audio converter"""
 *     return at.kAudioConverterSampleRateConverterQuality
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_73get_audio_converter_property_sample_rate_converter_quality, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_sam, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_sam, __pyx_t_11) < (0)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1306
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec quality for an audio converter"""
 *     return at.kAudioConverterCodecQuality
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_75get_audio_converter_property_codec_quality, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_cod, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_cod, __pyx_t_10) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1310
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     """Get the maximum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Max
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_77get_audio_converter_quality_max, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_max, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_max, __pyx_t_11) < (0)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1314
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     """Get the high quality for an audio converter"""
 *     return at.kAudioConverterQuality_High
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_79get_audio_converter_quality_high, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_high, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_high, __pyx_t_10) < (0)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1318
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     """Get the medium quality for an audio converter"""
 *     return at.kAudioConverterQuality_Medium
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_81get_audio_converter_quality_medium, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_medi, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_medi, __pyx_t_11) < (0)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1322
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     """Get the low quality for an audio converter"""
 *     return at.kAudioConverterQuality_Low
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_83get_audio_converter_quality_low, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_low, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_low, __pyx_t_10) < (0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1326
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     """Get the minimum quality for an audio converter"""
 *     return at.kAudioConverterQuality_Min
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_85get_audio_converter_quality_min, 0, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_min, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_min, __pyx_t_11) < (0)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1335
 * # ============================================================================
 * 
 * def extended_audio_file_open_url(str file_path) -> int:             # <<<<<<<<<<<<<<
 *     """Open an audio file with ExtendedAudioFile
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_87extended_audio_file_open_url, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_open_url, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_open_url, __pyx_t_10) < (0)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1364
 * 
 * def extended_audio_file_create_with_url(str file_path, int file_type, source_format: dict,
 *                                          int codec_manufacturer=0) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new audio file with ExtendedAudioFile
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "coremusic/capi.pyx":1363
 * 
 * 
 * def extended_audio_file_create_with_url(str file_path, int file_type, source_format: dict,             # <<<<<<<<<<<<<<
 *                                          int codec_manufacturer=0) -> int:
 *     """Create a new audio file with ExtendedAudioFile
*/
  __pyx_t_11 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_source_format, __pyx_mstate_global->__pyx_n_u_dict_2) < (0)) __PYX_ERR(0, 1363, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_89extended_audio_file_create_with_url, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_create_with, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_11);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_create_with, __pyx_t_4) < (0)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1406
 * 
 * 
 * def extended_audio_file_dispose(long ext_file_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an ExtendedAudioFile"""
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_91extended_audio_file_dispose, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1414
 * 
 * 
 * def extended_audio_file_read(long ext_file_id, int num_frames) -> tuple:             # <<<<<<<<<<<<<<
 *     """Read audio frames from ExtendedAudioFile
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_93extended_audio_file_read, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_read, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_read, __pyx_t_10) < (0)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1455
 * def extended_audio_file_read_into(long ext_file_id, int num_frames,
 *                                    unsigned char[::1] buffer not None,
 *                                    int num_channels=2) -> tuple:             # <<<<<<<<<<<<<<
 *     """Read audio frames from ExtendedAudioFile directly into a provided buffer (zero-copy).
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)2)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "coremusic/capi.pyx":1451
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def extended_audio_file_read_into(long ext_file_id, int num_frames,
*/
  __pyx_t_4 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_95extended_audio_file_read_into, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_read_into, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_read_into, __pyx_t_11) < (0)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1514
 * 
 * 
 * def extended_audio_file_write(long ext_file_id, int num_frames, bytes audio_data):             # <<<<<<<<<<<<<<
 *     """Write audio frames to ExtendedAudioFile
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_97extended_audio_file_write, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_write, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_write, __pyx_t_11) < (0)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1538
 * 
 * 
 * def extended_audio_file_get_property(long ext_file_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an ExtendedAudioFile
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes) < (0)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_99extended_audio_file_get_property, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_get_property, __pyx_t_10) < (0)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1567
 * 
 * 
 * def extended_audio_file_set_property(long ext_file_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an ExtendedAudioFile
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_101extended_audio_file_set_property, 0, __pyx_mstate_global->__pyx_n_u_extended_audio_file_set_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_set_property, __pyx_t_10) < (0)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1585
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileDataFormat
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_103get_extended_audio_file_property_file_data_format, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property, __pyx_t_11) < (0)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1589
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client data format for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientDataFormat
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_105get_extended_audio_file_property_client_data_format, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_2, __pyx_t_10) < (0)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1593
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileChannelLayout
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_107get_extended_audio_file_property_file_channel_layout, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_3, __pyx_t_11) < (0)) __PYX_ERR(0, 1593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1597
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     """Get the client channel layout for an extended audio file"""
 *     return at.kExtAudioFileProperty_ClientChannelLayout
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_109get_extended_audio_file_property_client_channel_layout, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_4, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_4, __pyx_t_10) < (0)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1601
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     """Get the codec manufacturer for an extended audio file"""
 *     return at.kExtAudioFileProperty_CodecManufacturer
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_111get_extended_audio_file_property_codec_manufacturer, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_5, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_5, __pyx_t_11) < (0)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1605
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     """Get the audio file for an extended audio file"""
 *     return at.kExtAudioFileProperty_AudioFile
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_113get_extended_audio_file_property_audio_file, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_6, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_6, __pyx_t_10) < (0)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":1609
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     """Get the file length frames for an extended audio file"""
 *     return at.kExtAudioFileProperty_FileLengthFrames
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_115get_extended_audio_file_property_file_length_frames, 0, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_7, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_7, __pyx_t_11) < (0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1622
 * 
 * 
 * def audio_queue_new_output(audio_format):             # <<<<<<<<<<<<<<
 *     """Create a new audio output queue"""
 *     cdef at.AudioStreamBasicDescription format
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_117audio_queue_new_output, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_new_output, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_new_output, __pyx_t_11) < (0)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1646
 * 
 * 
 * def audio_queue_allocate_buffer(long queue_id, int buffer_size):             # <<<<<<<<<<<<<<
 *     """Allocate a buffer for an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_119audio_queue_allocate_buffer, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_allocate_buffer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_allocate_buffer, __pyx_t_11) < (0)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1663
 * 
 * 
 * def audio_queue_enqueue_buffer(long queue_id, long buffer_id):             # <<<<<<<<<<<<<<
 *     """Enqueue a buffer to an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_121audio_queue_enqueue_buffer, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_enqueue_buffer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_enqueue_buffer, __pyx_t_11) < (0)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1676
 * 
 * 
 * def audio_queue_start(long queue_id):             # <<<<<<<<<<<<<<
 *     """Start an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_123audio_queue_start, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_start, __pyx_t_11) < (0)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1688
 * 
 * 
 * def audio_queue_stop(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Stop an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_11 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_125audio_queue_stop, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_stop, __pyx_t_11) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1700
 * 
 * 
 * def audio_queue_dispose(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_11 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_127audio_queue_dispose, 0, __pyx_mstate_global->__pyx_n_u_audio_queue_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_dispose, __pyx_t_11) < (0)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1739
 * # ============================================================================
 * 
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     """Get the linear PCM format for an audio format.
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_129get_audio_format_linear_pcm, 0, __pyx_mstate_global->__pyx_n_u_get_audio_format_linear_pcm, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_format_linear_pcm, __pyx_t_11) < (0)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1747
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     """Get the signed integer flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_131get_linear_pcm_format_flag_is_signed_integer, 0, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_si, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_si, __pyx_t_11) < (0)) __PYX_ERR(0, 1747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1751
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     """Get the packed flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsPacked
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_133get_linear_pcm_format_flag_is_packed, 0, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_pa, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_pa, __pyx_t_11) < (0)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1755
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     """Get the wave type for an audio file"""
 *     return at.kAudioFileWAVEType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_135get_audio_file_wave_type, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_wave_type, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_wave_type, __pyx_t_11) < (0)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1759
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     """Get the read permission for an audio file"""
 *     return at.kAudioFileReadPermission
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_137get_audio_file_read_permission, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_read_permission, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_read_permission, __pyx_t_11) < (0)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1763
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file"""
 *     return at.kAudioFilePropertyDataFormat
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_139get_audio_file_property_data_format, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_data_for, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_data_for, __pyx_t_11) < (0)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1767
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file"""
 *     return at.kAudioFilePropertyMaximumPacketSize
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_141get_audio_file_property_maximum_packet_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_maximum, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_maximum, __pyx_t_11) < (0)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1771
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file"""
 *     return at.kAudioFilePropertyAudioDataPacketCount
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_143get_audio_file_property_audio_data_packet_count, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_audio_da, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_audio_da, __pyx_t_11) < (0)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1775
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     """Get the estimated duration for an audio file"""
 *     return at.kAudioFilePropertyEstimatedDuration
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_145get_audio_file_property_estimated_duration, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_estimate, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_estimate, __pyx_t_11) < (0)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1780
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     """Get the name for an audio object"""
 *     return ca.kAudioObjectPropertyName
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_147get_audio_object_property_name, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_name, __pyx_t_11) < (0)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1784
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the manufacturer for an audio object"""
 *     return ca.kAudioObjectPropertyManufacturer
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_149get_audio_object_property_manufacturer, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_manufa, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_manufa, __pyx_t_11) < (0)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1788
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     """Get the device UID for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceUID
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_151get_audio_device_property_device_uid, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device, __pyx_t_11) < (0)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1792
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     """Get the model UID for an audio device"""
 *     return ca.kAudioDevicePropertyModelUID
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_153get_audio_device_property_model_uid, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_model, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_model, __pyx_t_11) < (0)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1796
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     """Get the transport type for an audio device"""
 *     return ca.kAudioDevicePropertyTransportType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_155get_audio_device_property_transport_type, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_transp, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_transp, __pyx_t_11) < (0)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1800
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     """Get the device is alive for an audio device"""
 *     return ca.kAudioDevicePropertyDeviceIsAlive
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_157get_audio_device_property_device_is_alive, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device_2, __pyx_t_11) < (0)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1804
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     """Get the nominal sample rate for an audio device"""
 *     return ca.kAudioDevicePropertyNominalSampleRate
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_159get_audio_device_property_nominal_sample_rate, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_nomina, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_nomina, __pyx_t_11) < (0)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1808
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     """Get the available nominal sample rates for an audio device"""
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_161get_audio_device_property_available_nominal_sample_rates, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_availa, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_availa, __pyx_t_11) < (0)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1812
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     """Get the is hidden for an audio device"""
 *     return ca.kAudioDevicePropertyIsHidden
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_163get_audio_device_property_is_hidden, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_is_hid, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_is_hid, __pyx_t_11) < (0)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1816
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     """Get the preferred channels for stereo for an audio device"""
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_165get_audio_device_property_preferred_channels_for_stereo, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_prefer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_prefer, __pyx_t_11) < (0)) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1820
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     """Get the stream configuration for an audio device"""
 *     return ca.kAudioDevicePropertyStreamConfiguration
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_167get_audio_device_property_stream_configuration, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_stream, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_stream, __pyx_t_11) < (0)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1824
 *     return ca.kAudioDevicePropertyStreamConfiguration
 * 
 * def get_audio_device_property_volume_scalar():             # <<<<<<<<<<<<<<
 *     """Get the volume scalar property selector (0.0-1.0)"""
 *     return ca.kAudioDevicePropertyVolumeScalar
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_169get_audio_device_property_volume_scalar, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_volume, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_volume, __pyx_t_11) < (0)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1828
 *     return ca.kAudioDevicePropertyVolumeScalar
 * 
 * def get_audio_device_property_mute():             # <<<<<<<<<<<<<<
 *     """Get the mute property selector"""
 *     return ca.kAudioDevicePropertyMute
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_171get_audio_device_property_mute, 0, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_mute, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_mute, __pyx_t_11) < (0)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1832
 *     return ca.kAudioDevicePropertyMute
 * 
 * def get_audio_hardware_property_default_output_device():             # <<<<<<<<<<<<<<
 *     """Get the default output device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_173get_audio_hardware_property_default_output_device, 0, __pyx_mstate_global->__pyx_n_u_get_audio_hardware_property_defa, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_hardware_property_defa, __pyx_t_11) < (0)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1836
 *     return ca.kAudioHardwarePropertyDefaultOutputDevice
 * 
 * def get_audio_hardware_property_default_input_device():             # <<<<<<<<<<<<<<
 *     """Get the default input device property selector"""
 *     return ca.kAudioHardwarePropertyDefaultInputDevice
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_175get_audio_hardware_property_default_input_device, 0, __pyx_mstate_global->__pyx_n_u_get_audio_hardware_property_defa_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_hardware_property_defa_2, __pyx_t_11) < (0)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1841
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeGlobal
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_177get_audio_object_property_scope_global, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope, __pyx_t_11) < (0)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1845
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeInput
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_179get_audio_object_property_scope_input, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_2, __pyx_t_11) < (0)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1849
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio object"""
 *     return ca.kAudioObjectPropertyScopeOutput
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_181get_audio_object_property_scope_output, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_3, __pyx_t_11) < (0)) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1853
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     """Get the main element for an audio object"""
 *     return ca.kAudioObjectPropertyElementMain
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_183get_audio_object_property_element_main, 0, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_elemen, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_elemen, __pyx_t_11) < (0)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1859
 * 
 * # AudioComponent Functions
 * def audio_component_find_next(description_dict, long previous_component_id=0):             # <<<<<<<<<<<<<<
 *     """Find an audio component matching the description
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_185audio_component_find_next, 0, __pyx_mstate_global->__pyx_n_u_audio_component_find_next, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_find_next, __pyx_t_11) < (0)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1889
 * 
 * 
 * def audio_component_instance_new(long component_id):             # <<<<<<<<<<<<<<
 *     """Create a new instance of an audio component"""
 *     cdef at.AudioComponent component = <at.AudioComponent>component_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_187audio_component_instance_new, 0, __pyx_mstate_global->__pyx_n_u_audio_component_instance_new, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_instance_new, __pyx_t_11) < (0)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1901
 * 
 * 
 * def audio_component_instance_dispose(long instance_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio component instance"""
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_189audio_component_instance_dispose, 0, __pyx_mstate_global->__pyx_n_u_audio_component_instance_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_instance_dispose, __pyx_t_11) < (0)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1912
 * 
 * 
 * def audio_component_copy_name(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the name of an audio component
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_191audio_component_copy_name, 0, __pyx_mstate_global->__pyx_n_u_audio_component_copy_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_copy_name, __pyx_t_11) < (0)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1934
 * 
 * 
 * def audio_component_get_description(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the description of an audio component
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_193audio_component_get_description, 0, __pyx_mstate_global->__pyx_n_u_audio_component_get_description, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_get_description, __pyx_t_11) < (0)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1961
 * 
 * # AudioUnit Functions
 * def audio_unit_initialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Initialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_195audio_unit_initialize, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_initialize, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_initialize, __pyx_t_11) < (0)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1972
 * 
 * 
 * def audio_unit_uninitialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_197audio_unit_uninitialize, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_uninitialize, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_uninitialize, __pyx_t_11) < (0)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1983
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_199audio_unit_set_property, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_set_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_set_property, __pyx_t_11) < (0)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2005
 * 
 * 
 * def audio_unit_get_property(long audio_unit_id, int property_id, int scope, int element):             # <<<<<<<<<<<<<<
 *     """Get a property from an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_201audio_unit_get_property, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_property, __pyx_t_11) < (0)) __PYX_ERR(0, 2005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2044
 * 
 * 
 * def audio_output_unit_start(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Start an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_203audio_output_unit_start, 0, __pyx_mstate_global->__pyx_n_u_audio_output_unit_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_output_unit_start, __pyx_t_11) < (0)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2055
 * 
 * 
 * def audio_output_unit_stop(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Stop an output audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_205audio_output_unit_stop, 0, __pyx_mstate_global->__pyx_n_u_audio_output_unit_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_output_unit_stop, __pyx_t_11) < (0)) __PYX_ERR(0, 2055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2068
 * # AudioUnit Plugin Discovery and Management Functions
 * 
 * def audio_unit_find_all_components(component_type=None, component_subtype=None, manufacturer=None):             # <<<<<<<<<<<<<<
 *     """Find all AudioUnit components matching the criteria
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_207audio_unit_find_all_components, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_find_all_components, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[13]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_find_all_components, __pyx_t_11) < (0)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2100
 * 
 * 
 * def audio_unit_get_component_info(long component_id):             # <<<<<<<<<<<<<<
 *     """Get detailed information about an AudioUnit component
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_209audio_unit_get_component_info, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_component_info, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_component_info, __pyx_t_11) < (0)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2148
 * 
 * 
 * def audio_unit_get_parameter_list(long audio_unit_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get list of parameter IDs for an AudioUnit
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_211audio_unit_get_parameter_list, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter_list, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[14]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter_list, __pyx_t_11) < (0)) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2210
 * 
 * 
 * def audio_unit_get_parameter_info(long audio_unit_id, param_id, scope=0):             # <<<<<<<<<<<<<<
 *     """Get detailed information about a parameter
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_213audio_unit_get_parameter_info, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter_info, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[12]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter_info, __pyx_t_11) < (0)) __PYX_ERR(0, 2210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2274
 * 
 * 
 * def audio_unit_get_parameter(long audio_unit_id, param_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get current value of a parameter
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_215audio_unit_get_parameter, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[14]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_parameter, __pyx_t_11) < (0)) __PYX_ERR(0, 2274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2304
 * 
 * 
 * def audio_unit_set_parameter(long audio_unit_id, param_id, value, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Set value of a parameter
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_217audio_unit_set_parameter, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_set_parameter, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[14]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_set_parameter, __pyx_t_11) < (0)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2332
 * 
 * 
 * def audio_unit_get_factory_presets(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Get list of factory presets for an AudioUnit
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_219audio_unit_get_factory_presets, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_get_factory_presets, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_factory_presets, __pyx_t_11) < (0)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2420
 * 
 * 
 * def audio_unit_set_current_preset(long audio_unit_id, preset_number):             # <<<<<<<<<<<<<<
 *     """Set the current preset for an AudioUnit
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_221audio_unit_set_current_preset, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_set_current_preset, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_set_current_preset, __pyx_t_11) < (0)) __PYX_ERR(0, 2420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2451
 * 
 * 
 * def audio_unit_render(long audio_unit_id, input_data, num_frames, sample_rate=44100.0, num_channels=2):             # <<<<<<<<<<<<<<
 *     """Process audio through an AudioUnit
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_223audio_unit_render, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_render, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[15]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_render, __pyx_t_11) < (0)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2528
 *                            unsigned char[::1] output_buffer not None,
 *                            int num_frames,
 *                            int num_channels=2):             # <<<<<<<<<<<<<<
 *     """Process audio through an AudioUnit directly into provided buffers (zero-copy).
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)2)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "coremusic/capi.pyx":2522
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def audio_unit_render_into(long audio_unit_id,
*/
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_225audio_unit_render_into, 0, __pyx_mstate_global->__pyx_n_u_audio_unit_render_into, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_render_into, __pyx_t_11) < (0)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2609
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     """Get the output type for an audio unit"""
 *     return at.kAudioUnitType_Output
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_227get_audio_unit_type_output, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_type_output, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_type_output, __pyx_t_11) < (0)) __PYX_ERR(0, 2609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2613
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     """Get the music device type for an audio unit"""
 *     return at.kAudioUnitType_MusicDevice
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_229get_audio_component_type_music_device, 0, __pyx_mstate_global->__pyx_n_u_get_audio_component_type_music_d, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_component_type_music_d, __pyx_t_11) < (0)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2617
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     """Get the default output type for an audio unit"""
 *     return at.kAudioUnitSubType_DefaultOutput
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_231get_audio_unit_subtype_default_output, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_subtype_default_o, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_subtype_default_o, __pyx_t_11) < (0)) __PYX_ERR(0, 2617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2621
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     """Get the Apple manufacturer for an audio unit"""
 *     return at.kAudioUnitManufacturer_Apple
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_233get_audio_unit_manufacturer_apple, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_manufacturer_appl, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_manufacturer_appl, __pyx_t_11) < (0)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2625
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     """Get the stream format for an audio unit"""
 *     return at.kAudioUnitProperty_StreamFormat
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_235get_audio_unit_property_stream_format, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_stream_f, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_stream_f, __pyx_t_11) < (0)) __PYX_ERR(0, 2625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2629
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     """Get the set render callback for an audio unit"""
 *     return at.kAudioUnitProperty_SetRenderCallback
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_237get_audio_unit_property_set_render_callback, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_set_rend, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_set_rend, __pyx_t_11) < (0)) __PYX_ERR(0, 2629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2633
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     """Get the input scope for an audio unit"""
 *     return at.kAudioUnitScope_Input
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_239get_audio_unit_scope_input, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_input, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_input, __pyx_t_11) < (0)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2637
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     """Get the output scope for an audio unit"""
 *     return at.kAudioUnitScope_Output
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_241get_audio_unit_scope_output, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_output, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_output, __pyx_t_11) < (0)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2641
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     """Get the global scope for an audio unit"""
 *     return at.kAudioUnitScope_Global
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_243get_audio_unit_scope_global, 0, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_global, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_global, __pyx_t_11) < (0)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2645
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     """Get the non-interleaved flag for a linear PCM format"""
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_245get_linear_pcm_format_flag_is_non_interleaved, 0, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_no, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_no, __pyx_t_11) < (0)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2777
 *         self._link_session_ref = link_session
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback using ExtAudioFile"""
 *         # Declare all C variables at the beginning
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_3load_file, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_load_file, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_load_file, __pyx_t_11) < (0)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2914
 *         return 0  # noErr
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef at.AudioComponentDescription output_desc
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_5setup_output, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_setup_output, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_setup_output, __pyx_t_11) < (0)) __PYX_ERR(0, 2914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2983
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback"""
 *         if not self.initialized:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_7start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_11) < (0)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":2998
 *         return 0  # noErr
 * 
 *     def play(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback (alias for start())"""
 *         return self.start()
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_9play, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_play, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_play, __pyx_t_11) < (0)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3002
 *         return self.start()
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio playback"""
 *         if not self.initialized:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_11stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_11) < (0)) __PYX_ERR(0, 3002, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3015
 *         return 0  # noErr
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         self.player_data.loop = loop
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_13set_looping, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_set_looping, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_set_looping, __pyx_t_11) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3019
 *         self.player_data.loop = loop
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         self.player_data.current_frame = 0
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_15reset_playback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_reset_playback, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_reset_playback, __pyx_t_11) < (0)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3023
 *         self.player_data.current_frame = 0
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(self.player_data.playing)
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_17is_playing, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_is_playing, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_is_playing, __pyx_t_11) < (0)) __PYX_ERR(0, 3023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3027
 *         return bool(self.player_data.playing)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         if self.player_data.total_frames == 0:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_19get_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_get_progress, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_get_progress, __pyx_t_11) < (0)) __PYX_ERR(0, 3027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3038
 *         return self._link_session_ref
 * 
 *     def get_link_timing(self, quantum=4.0):             # <<<<<<<<<<<<<<
 *         """Get current Link timing information (if Link session is attached)
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_21get_link_timing, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer_get_link_timing, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[16]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_get_link_timing, __pyx_t_11) < (0)) __PYX_ERR(0, 3038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.output_unit,self.player_data cannot be converted to a Python object for pickling"
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioPlayer___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[134])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3186
 *         self.format.mReserved = 0
 * 
 *     def setup_input(self, float duration):             # <<<<<<<<<<<<<<
 *         """Setup the audio input queue for recording
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_3setup_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_setup_input, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[135])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_setup_input, __pyx_t_11) < (0)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3248
 *         return 0  # noErr
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio recording"""
 *         if not self.initialized:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[136])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_11) < (0)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3263
 *         return 0  # noErr
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio recording"""
 *         if not self.initialized:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_7stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[137])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_11) < (0)) __PYX_ERR(0, 3263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3276
 *         return 0  # noErr
 * 
 *     def is_recording(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently being recorded"""
 *         return bool(self.recorder_data.recording)
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_9is_recording, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_is_recording, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[138])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_is_recording, __pyx_t_11) < (0)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3280
 *         return bool(self.recorder_data.recording)
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current recording progress as a float (0.0 to 1.0)"""
 *         if self.recorder_data.buffer_size_frames == 0:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_11get_progress, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_get_progress, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[139])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_get_progress, __pyx_t_11) < (0)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3286
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.buffer_size_frames
 * 
 *     def get_recorded_frames(self):             # <<<<<<<<<<<<<<
 *         """Get the number of frames recorded so far"""
 *         return self.recorder_data.current_frame
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_13get_recorded_frames, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_get_recorded_frame, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[140])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_get_recorded_frames, __pyx_t_11) < (0)) __PYX_ERR(0, 3286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3290
 *         return self.recorder_data.current_frame
 * 
 *     def get_recorded_duration(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded duration in seconds"""
 *         if self.recorder_data.sample_rate == 0:
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_15get_recorded_duration, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_get_recorded_durat, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[141])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_get_recorded_duration, __pyx_t_11) < (0)) __PYX_ERR(0, 3290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3296
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
 * 
 *     def run_loop(self, double seconds=0.1):             # <<<<<<<<<<<<<<
 *         """Run the CFRunLoop to process audio queue callbacks.
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_17run_loop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_run_loop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[142])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[17]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_run_loop, __pyx_t_11) < (0)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3306
 *         cf.CFRunLoopRunInMode(cf.kCFRunLoopDefaultMode, seconds, False)
 * 
 *     def save_to_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Save the recorded audio to a WAV file
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_19save_to_file, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_save_to_file, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[143])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_save_to_file, __pyx_t_11) < (0)) __PYX_ERR(0, 3306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3386
 *         return 0  # noErr
 * 
 *     def get_audio_data(self):             # <<<<<<<<<<<<<<
 *         """Get the recorded audio data as a Python bytes object
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_21get_audio_data, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_get_audio_data, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[144])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_get_audio_data, __pyx_t_11) < (0)) __PYX_ERR(0, 3386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3409
 *         return self.recorder_data.channels
 * 
 *     def has_audio_content(self):             # <<<<<<<<<<<<<<
 *         """Check if the recording contains actual audio (non-silent).
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_23has_audio_content, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder_has_audio_content, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[145])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioRecorder, __pyx_mstate_global->__pyx_n_u_has_audio_content, __pyx_t_11) < (0)) __PYX_ERR(0, 3409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[146])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for pickling"
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13AudioRecorder_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_AudioRecorder___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[147])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3443
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     """Get the ready to produce packets for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_247get_audio_file_stream_property_ready_to_produce_packets, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_r, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[148])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_r, __pyx_t_11) < (0)) __PYX_ERR(0, 3443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3447
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     """Get the file format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FileFormat
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_249get_audio_file_stream_property_file_format, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[149])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f, __pyx_t_11) < (0)) __PYX_ERR(0, 3447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3451
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     """Get the data format for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataFormat
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_251get_audio_file_stream_property_data_format, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[150])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d, __pyx_t_11) < (0)) __PYX_ERR(0, 3451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3455
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     """Get the format list for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FormatList
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_253get_audio_file_stream_property_format_list, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[151])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3459
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     """Get the magic cookie data for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MagicCookieData
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_255get_audio_file_stream_property_magic_cookie_data, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[152])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m, __pyx_t_11) < (0)) __PYX_ERR(0, 3459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3463
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data byte count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_257get_audio_file_stream_property_audio_data_byte_count, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[153])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a, __pyx_t_11) < (0)) __PYX_ERR(0, 3463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3467
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     """Get the audio data packet count for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_259get_audio_file_stream_property_audio_data_packet_count, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[154])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3471
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     """Get the maximum packet size for an audio file stream"""
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_261get_audio_file_stream_property_maximum_packet_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[155])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3475
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     """Get the data offset for an audio file stream"""
 *     return at.kAudioFileStreamProperty_DataOffset
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_263get_audio_file_stream_property_data_offset, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[156])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3479
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     """Get the channel layout for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ChannelLayout
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_265get_audio_file_stream_property_channel_layout, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_c, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[157])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_c, __pyx_t_11) < (0)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3483
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     """Get the packet to frame for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToFrame
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_267get_audio_file_stream_property_packet_to_frame, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[158])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p, __pyx_t_11) < (0)) __PYX_ERR(0, 3483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3487
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the frame to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_FrameToPacket
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_269get_audio_file_stream_property_frame_to_packet, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[159])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_3, __pyx_t_11) < (0)) __PYX_ERR(0, 3487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3491
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     """Get the packet to byte for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketToByte
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_271get_audio_file_stream_property_packet_to_byte, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[160])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3495
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     """Get the byte to packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_ByteToPacket
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_273get_audio_file_stream_property_byte_to_packet, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[161])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b, __pyx_t_11) < (0)) __PYX_ERR(0, 3495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3499
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     """Get the packet table info for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketTableInfo
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_275get_audio_file_stream_property_packet_table_info, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[162])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_3, __pyx_t_11) < (0)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3503
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     """Get the packet size upper bound for an audio file stream"""
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_277get_audio_file_stream_property_packet_size_upper_bound, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_4, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[163])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_4, __pyx_t_11) < (0)) __PYX_ERR(0, 3503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3507
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     """Get the average bytes per packet for an audio file stream"""
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_279get_audio_file_stream_property_average_bytes_per_packet, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[164])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_3, __pyx_t_11) < (0)) __PYX_ERR(0, 3507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3511
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     """Get the bit rate for an audio file stream"""
 *     return at.kAudioFileStreamProperty_BitRate
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_281get_audio_file_stream_property_bit_rate, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[165])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3515
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     """Get the info dictionary for an audio file stream"""
 *     return at.kAudioFileStreamProperty_InfoDictionary
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_283get_audio_file_stream_property_info_dictionary, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_i, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[166])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_i, __pyx_t_11) < (0)) __PYX_ERR(0, 3515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3520
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     """Get the property is cached flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_285get_audio_file_stream_property_flag_property_is_cached, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_4, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[167])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_4, __pyx_t_11) < (0)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3524
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     """Get the cache property flag for an audio file stream"""
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_287get_audio_file_stream_property_flag_cache_property, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_5, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[168])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_5, __pyx_t_11) < (0)) __PYX_ERR(0, 3524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3528
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity flag for an audio file stream"""
 *     return at.kAudioFileStreamParseFlag_Discontinuity
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_289get_audio_file_stream_parse_flag_discontinuity, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_parse_flag, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[169])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_parse_flag, __pyx_t_11) < (0)) __PYX_ERR(0, 3528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3532
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     """Get the offset is estimated flag for an audio file stream"""
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_291get_audio_file_stream_seek_flag_offset_is_estimated, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_seek_flag, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[170])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_seek_flag, __pyx_t_11) < (0)) __PYX_ERR(0, 3532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3537
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     """Get the unsupported file type error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedFileType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_293get_audio_file_stream_error_unsupported_file_type, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[171])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu, __pyx_t_11) < (0)) __PYX_ERR(0, 3537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3541
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     """Get the unsupported data format error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_295get_audio_file_stream_error_unsupported_data_format, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[172])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3545
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnsupportedProperty
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_297get_audio_file_stream_error_unsupported_property, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[173])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_3, __pyx_t_11) < (0)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3549
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio file stream"""
 *     return at.kAudioFileStreamError_BadPropertySize
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_299get_audio_file_stream_error_bad_property_size, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_bad, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[174])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_bad, __pyx_t_11) < (0)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3553
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     """Get the not optimized error for an audio file stream"""
 *     return at.kAudioFileStreamError_NotOptimized
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_301get_audio_file_stream_error_not_optimized, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_not, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[175])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_not, __pyx_t_11) < (0)) __PYX_ERR(0, 3553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3557
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     """Get the invalid packet offset error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidPacketOffset
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_303get_audio_file_stream_error_invalid_packet_offset, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[176])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva, __pyx_t_11) < (0)) __PYX_ERR(0, 3557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3561
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     """Get the invalid file error for an audio file stream"""
 *     return at.kAudioFileStreamError_InvalidFile
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_305get_audio_file_stream_error_invalid_file, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[177])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3565
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     """Get the value unknown error for an audio file stream"""
 *     return at.kAudioFileStreamError_ValueUnknown
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_307get_audio_file_stream_error_value_unknown, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_valu, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[178])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_valu, __pyx_t_11) < (0)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3569
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     """Get the data unavailable error for an audio file stream"""
 *     return at.kAudioFileStreamError_DataUnavailable
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_309get_audio_file_stream_error_data_unavailable, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_data, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[179])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_data, __pyx_t_11) < (0)) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3573
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     """Get the illegal operation error for an audio file stream"""
 *     return at.kAudioFileStreamError_IllegalOperation
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_311get_audio_file_stream_error_illegal_operation, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_ille, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[180])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_ille, __pyx_t_11) < (0)) __PYX_ERR(0, 3573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3577
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the unspecified error for an audio file stream"""
 *     return at.kAudioFileStreamError_UnspecifiedError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_313get_audio_file_stream_error_unspecified_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsp, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[181])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsp, __pyx_t_11) < (0)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3581
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     """Get the discontinuity cant recover error for an audio file stream"""
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_315get_audio_file_stream_error_discontinuity_cant_recover, 0, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_disc, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[182])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_disc, __pyx_t_11) < (0)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3587
 * 
 * # AudioServices Functions
 * def audio_services_create_system_sound_id(str file_path):             # <<<<<<<<<<<<<<
 *     """Create a SystemSoundID from an audio file path"""
 *     cdef at.SystemSoundID sound_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_317audio_services_create_system_sound_id, 0, __pyx_mstate_global->__pyx_n_u_audio_services_create_system_sou, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[183])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_create_system_sou, __pyx_t_11) < (0)) __PYX_ERR(0, 3587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3616
 * 
 * 
 * def audio_services_dispose_system_sound_id(long sound_id):             # <<<<<<<<<<<<<<
 *     """Dispose a SystemSoundID"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_319audio_services_dispose_system_sound_id, 0, __pyx_mstate_global->__pyx_n_u_audio_services_dispose_system_so, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[184])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_dispose_system_so, __pyx_t_11) < (0)) __PYX_ERR(0, 3616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3627
 * 
 * 
 * def audio_services_play_system_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play a system sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_321audio_services_play_system_sound, 0, __pyx_mstate_global->__pyx_n_u_audio_services_play_system_sound, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[185])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_play_system_sound, __pyx_t_11) < (0)) __PYX_ERR(0, 3627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3633
 * 
 * 
 * def audio_services_play_alert_sound(long sound_id):             # <<<<<<<<<<<<<<
 *     """Play an alert sound (deprecated but widely used)"""
 *     cdef at.SystemSoundID system_sound_id = <at.SystemSoundID>sound_id
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_323audio_services_play_alert_sound, 0, __pyx_mstate_global->__pyx_n_u_audio_services_play_alert_sound, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[186])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_play_alert_sound, __pyx_t_11) < (0)) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3639
 * 
 * 
 * def audio_services_get_property(int property_id, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Get an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/
  __pyx_t_11 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_325audio_services_get_property, 0, __pyx_mstate_global->__pyx_n_u_audio_services_get_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[187])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_get_property, __pyx_t_11) < (0)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3686
 * 
 * 
 * def audio_services_set_property(int property_id, data, long specifier_value=0):             # <<<<<<<<<<<<<<
 *     """Set an AudioServices property"""
 *     cdef at.AudioServicesPropertyID prop_id = <at.AudioServicesPropertyID>property_id
*/
  __pyx_t_11 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_327audio_services_set_property, 0, __pyx_mstate_global->__pyx_n_u_audio_services_set_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[188])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_set_property, __pyx_t_11) < (0)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3722
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     """Get the no error for an audio services"""
 *     return at.kAudioServicesNoError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_329get_audio_services_no_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_no_error, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[189])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_no_error, __pyx_t_11) < (0)) __PYX_ERR(0, 3722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3726
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     """Get the unsupported property error for an audio services"""
 *     return at.kAudioServicesUnsupportedPropertyError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_331get_audio_services_unsupported_property_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_unsupported_p, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[190])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_unsupported_p, __pyx_t_11) < (0)) __PYX_ERR(0, 3726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3730
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad property size error for an audio services"""
 *     return at.kAudioServicesBadPropertySizeError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_333get_audio_services_bad_property_size_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[191])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_property, __pyx_t_11) < (0)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3734
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     """Get the bad specifier size error for an audio services"""
 *     return at.kAudioServicesBadSpecifierSizeError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_335get_audio_services_bad_specifier_size_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_specifier, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[192])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_specifier, __pyx_t_11) < (0)) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3738
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound unspecified error for an audio services"""
 *     return at.kAudioServicesSystemSoundUnspecifiedError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_337get_audio_services_system_sound_unspecified_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[193])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound, __pyx_t_11) < (0)) __PYX_ERR(0, 3738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3742
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound client timed out error for an audio services"""
 *     return at.kAudioServicesSystemSoundClientTimedOutError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_339get_audio_services_system_sound_client_timed_out_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[194])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3746
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     """Get the system sound exceeded maximum duration error for an audio services"""
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_341get_audio_services_system_sound_exceeded_maximum_duration_error, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_3, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[195])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_3, __pyx_t_11) < (0)) __PYX_ERR(0, 3746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3750
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kSystemSoundID_UserPreferredAlert
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_343get_system_sound_id_user_preferred_alert, 0, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_user_preferr, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[196])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_user_preferr, __pyx_t_11) < (0)) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3754
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     """Get the flash screen for an audio services"""
 *     return at.kSystemSoundID_FlashScreen
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_345get_system_sound_id_flash_screen, 0, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_flash_screen, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[197])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_flash_screen, __pyx_t_11) < (0)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3758
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     """Get the vibrate for an audio services"""
 *     return at.kSystemSoundID_Vibrate
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_347get_system_sound_id_vibrate, 0, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_vibrate, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[198])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_vibrate, __pyx_t_11) < (0)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3762
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     """Get the user preferred alert for an audio services"""
 *     return at.kUserPreferredAlert
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_349get_user_preferred_alert, 0, __pyx_mstate_global->__pyx_n_u_get_user_preferred_alert, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[199])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_user_preferred_alert, __pyx_t_11) < (0)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3766
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     """Get the is ui sound for an audio services"""
 *     return at.kAudioServicesPropertyIsUISound
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_351get_audio_services_property_is_ui_sound, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_is_u, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[200])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_is_u, __pyx_t_11) < (0)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3770
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     """Get the complete playback if app dies for an audio services"""
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_353get_audio_services_property_complete_playback_if_app_dies, 0, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_comp, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[201])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_comp, __pyx_t_11) < (0)) __PYX_ERR(0, 3770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":3775
 * 
 * 
 * def test_error() -> int:             # <<<<<<<<<<<<<<
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3775, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_355test_error, 0, __pyx_mstate_global->__pyx_n_u_test_error, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[202])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_error, __pyx_t_10) < (0)) __PYX_ERR(0, 3775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3782
 * # ===== MusicDevice API =====
 * 
 * def music_device_midi_event(long unit, int status, int data1, int data2, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Send a MIDI channel message to a music device audio unit.
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_357music_device_midi_event, 0, __pyx_mstate_global->__pyx_n_u_music_device_midi_event, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[203])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_midi_event, __pyx_t_10) < (0)) __PYX_ERR(0, 3782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3809
 *     return status_result
 * 
 * def music_device_sysex(long unit, bytes data):             # <<<<<<<<<<<<<<
 *     """Send a System Exclusive MIDI message to a music device audio unit.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_359music_device_sysex, 0, __pyx_mstate_global->__pyx_n_u_music_device_sysex, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[204])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_sysex, __pyx_t_10) < (0)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3834
 *     return status
 * 
 * def music_device_start_note(long unit, int instrument_id, int group_id, float pitch, float velocity, int offset_sample_frame=0, list controls=None):             # <<<<<<<<<<<<<<
 *     """Start a note on a music device audio unit.
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_Pack(2, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_361music_device_start_note, 0, __pyx_mstate_global->__pyx_n_u_music_device_start_note, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[205])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_start_note, __pyx_t_10) < (0)) __PYX_ERR(0, 3834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3895
 *         free(params)
 * 
 * def music_device_stop_note(long unit, int group_id, long note_instance_id, int offset_sample_frame=0):             # <<<<<<<<<<<<<<
 *     """Stop a note that was started with music_device_start_note.
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_363music_device_stop_note, 0, __pyx_mstate_global->__pyx_n_u_music_device_stop_note, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[206])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_stop_note, __pyx_t_10) < (0)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3922
 * # Convenience functions for creating standard note parameters
 * 
 * def create_music_device_std_note_params(float pitch, float velocity):             # <<<<<<<<<<<<<<
 *     """Create standard note parameters with just pitch and velocity.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_365create_music_device_std_note_params, 0, __pyx_mstate_global->__pyx_n_u_create_music_device_std_note_par, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[207])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_music_device_std_note_par, __pyx_t_10) < (0)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3938
 *     }
 * 
 * def create_music_device_note_params(float pitch, float velocity, list controls):             # <<<<<<<<<<<<<<
 *     """Create note parameters with pitch, velocity, and additional controls.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_367create_music_device_note_params, 0, __pyx_mstate_global->__pyx_n_u_create_music_device_note_params, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[208])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_music_device_note_params, __pyx_t_10) < (0)) __PYX_ERR(0, 3938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3958
 * # MusicDevice constants
 * 
 * def get_music_note_event_use_group_instrument():             # <<<<<<<<<<<<<<
 *     """Get the constant for using the current patch for a group."""
 *     return at.kMusicNoteEvent_UseGroupInstrument
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_369get_music_note_event_use_group_instrument, 0, __pyx_mstate_global->__pyx_n_u_get_music_note_event_use_group_i, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[209])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_note_event_use_group_i, __pyx_t_10) < (0)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3962
 *     return at.kMusicNoteEvent_UseGroupInstrument
 * 
 * def get_music_note_event_unused():             # <<<<<<<<<<<<<<
 *     """Get the constant for unused instrument ID."""
 *     return at.kMusicNoteEvent_Unused
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_371get_music_note_event_unused, 0, __pyx_mstate_global->__pyx_n_u_get_music_note_event_unused, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[210])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_note_event_unused, __pyx_t_10) < (0)) __PYX_ERR(0, 3962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3966
 *     return at.kMusicNoteEvent_Unused
 * 
 * def get_music_device_range():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice selector range start."""
 *     return at.kMusicDeviceRange
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_373get_music_device_range, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_range, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[211])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_range, __pyx_t_10) < (0)) __PYX_ERR(0, 3966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3970
 *     return at.kMusicDeviceRange
 * 
 * def get_music_device_midi_event_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event selector."""
 *     return at.kMusicDeviceMIDIEventSelect
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_375get_music_device_midi_event_select, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_sele, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[212])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_sele, __pyx_t_10) < (0)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3974
 *     return at.kMusicDeviceMIDIEventSelect
 * 
 * def get_music_device_sysex_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice SysEx selector."""
 *     return at.kMusicDeviceSysExSelect
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_377get_music_device_sysex_select, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_sysex_select, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[213])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_sysex_select, __pyx_t_10) < (0)) __PYX_ERR(0, 3974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3978
 *     return at.kMusicDeviceSysExSelect
 * 
 * def get_music_device_start_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice start note selector."""
 *     return at.kMusicDeviceStartNoteSelect
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_379get_music_device_start_note_select, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_start_note_sele, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[214])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_start_note_sele, __pyx_t_10) < (0)) __PYX_ERR(0, 3978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3982
 *     return at.kMusicDeviceStartNoteSelect
 * 
 * def get_music_device_stop_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice stop note selector."""
 *     return at.kMusicDeviceStopNoteSelect
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_381get_music_device_stop_note_select, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_stop_note_selec, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[215])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_stop_note_selec, __pyx_t_10) < (0)) __PYX_ERR(0, 3982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3986
 *     return at.kMusicDeviceStopNoteSelect
 * 
 * def get_music_device_midi_event_list_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event list selector."""
 *     return at.kMusicDeviceMIDIEventListSelect
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_383get_music_device_midi_event_list_select, 0, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_list, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[216])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_list, __pyx_t_10) < (0)) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":3992
 * # Helper functions for MIDI data
 * 
 * def midi_note_on(int channel, int note, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note On status byte.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_385midi_note_on, 0, __pyx_mstate_global->__pyx_n_u_midi_note_on, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[217])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_note_on, __pyx_t_10) < (0)) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4006
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_note_off(int channel, int note, int velocity=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note Off status byte.
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_Pack(1, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_387midi_note_off, 0, __pyx_mstate_global->__pyx_n_u_midi_note_off, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[218])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_note_off, __pyx_t_10) < (0)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4020
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_control_change(int channel, int controller, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Control Change message.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_389midi_control_change, 0, __pyx_mstate_global->__pyx_n_u_midi_control_change, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[219])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_control_change, __pyx_t_10) < (0)) __PYX_ERR(0, 4020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4034
 *     return (status, controller & 0x7F, value & 0x7F)
 * 
 * def midi_program_change(int channel, int program):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Program Change message.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_391midi_program_change, 0, __pyx_mstate_global->__pyx_n_u_midi_program_change, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[220])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_program_change, __pyx_t_10) < (0)) __PYX_ERR(0, 4034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4047
 *     return (status, program & 0x7F, 0)
 * 
 * def midi_pitch_bend(int channel, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Pitch Bend message.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_393midi_pitch_bend, 0, __pyx_mstate_global->__pyx_n_u_midi_pitch_bend, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[221])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_pitch_bend, __pyx_t_10) < (0)) __PYX_ERR(0, 4047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4067
 * # MusicPlayer functions
 * 
 * def new_music_player():             # <<<<<<<<<<<<<<
 *     """Create a new music player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_395new_music_player, 0, __pyx_mstate_global->__pyx_n_u_new_music_player, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[222])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_new_music_player, __pyx_t_10) < (0)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4083
 *     return <long>player
 * 
 * def dispose_music_player(long player):             # <<<<<<<<<<<<<<
 *     """Dispose a music player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_397dispose_music_player, 0, __pyx_mstate_global->__pyx_n_u_dispose_music_player, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[223])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dispose_music_player, __pyx_t_10) < (0)) __PYX_ERR(0, 4083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4101
 *     return status
 * 
 * def music_player_set_sequence(long player, long sequence):             # <<<<<<<<<<<<<<
 *     """Set the sequence for the player to play.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_399music_player_set_sequence, 0, __pyx_mstate_global->__pyx_n_u_music_player_set_sequence, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[224])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_sequence, __pyx_t_10) < (0)) __PYX_ERR(0, 4101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4121
 *     return status
 * 
 * def music_player_get_sequence(long player):             # <<<<<<<<<<<<<<
 *     """Get the sequence attached to a player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_401music_player_get_sequence, 0, __pyx_mstate_global->__pyx_n_u_music_player_get_sequence, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[225])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_sequence, __pyx_t_10) < (0)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4140
 *     return <long>sequence
 * 
 * def music_player_set_time(long player, double time):             # <<<<<<<<<<<<<<
 *     """Set the current time on the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_403music_player_set_time, 0, __pyx_mstate_global->__pyx_n_u_music_player_set_time, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[226])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_time, __pyx_t_10) < (0)) __PYX_ERR(0, 4140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4159
 *     return status
 * 
 * def music_player_get_time(long player):             # <<<<<<<<<<<<<<
 *     """Get the current time of the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_405music_player_get_time, 0, __pyx_mstate_global->__pyx_n_u_music_player_get_time, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[227])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_time, __pyx_t_10) < (0)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4178
 *     return <double>time
 * 
 * def music_player_preroll(long player):             # <<<<<<<<<<<<<<
 *     """Prepare the player for playing.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_407music_player_preroll, 0, __pyx_mstate_global->__pyx_n_u_music_player_preroll, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[228])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_preroll, __pyx_t_10) < (0)) __PYX_ERR(0, 4178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4196
 *     return status
 * 
 * def music_player_start(long player):             # <<<<<<<<<<<<<<
 *     """Start the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_409music_player_start, 0, __pyx_mstate_global->__pyx_n_u_music_player_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[229])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_start, __pyx_t_10) < (0)) __PYX_ERR(0, 4196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4214
 *     return status
 * 
 * def music_player_stop(long player):             # <<<<<<<<<<<<<<
 *     """Stop the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_411music_player_stop, 0, __pyx_mstate_global->__pyx_n_u_music_player_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[230])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_stop, __pyx_t_10) < (0)) __PYX_ERR(0, 4214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4232
 *     return status
 * 
 * def music_player_is_playing(long player):             # <<<<<<<<<<<<<<
 *     """Check if the player is playing.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_413music_player_is_playing, 0, __pyx_mstate_global->__pyx_n_u_music_player_is_playing, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[231])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_is_playing, __pyx_t_10) < (0)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4251
 *     return bool(is_playing)
 * 
 * def music_player_set_play_rate_scalar(long player, double scale_rate):             # <<<<<<<<<<<<<<
 *     """Scale the playback rate of the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_415music_player_set_play_rate_scalar, 0, __pyx_mstate_global->__pyx_n_u_music_player_set_play_rate_scala, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[232])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_play_rate_scala, __pyx_t_10) < (0)) __PYX_ERR(0, 4251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4273
 *     return status
 * 
 * def music_player_get_play_rate_scalar(long player):             # <<<<<<<<<<<<<<
 *     """Get the playback rate scalar of the player.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_417music_player_get_play_rate_scalar, 0, __pyx_mstate_global->__pyx_n_u_music_player_get_play_rate_scala, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[233])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_play_rate_scala, __pyx_t_10) < (0)) __PYX_ERR(0, 4273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4294
 * # MusicSequence functions
 * 
 * def new_music_sequence():             # <<<<<<<<<<<<<<
 *     """Create a new empty music sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_419new_music_sequence, 0, __pyx_mstate_global->__pyx_n_u_new_music_sequence, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[234])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_new_music_sequence, __pyx_t_10) < (0)) __PYX_ERR(0, 4294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4310
 *     return <long>sequence
 * 
 * def dispose_music_sequence(long sequence):             # <<<<<<<<<<<<<<
 *     """Dispose a music sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_421dispose_music_sequence, 0, __pyx_mstate_global->__pyx_n_u_dispose_music_sequence, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[235])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dispose_music_sequence, __pyx_t_10) < (0)) __PYX_ERR(0, 4310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4328
 *     return status
 * 
 * def music_sequence_new_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Add a new track to the sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_423music_sequence_new_track, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_new_track, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[236])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_new_track, __pyx_t_10) < (0)) __PYX_ERR(0, 4328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4347
 *     return <long>track
 * 
 * def music_sequence_dispose_track(long sequence, long track):             # <<<<<<<<<<<<<<
 *     """Remove and dispose a track from a sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_425music_sequence_dispose_track, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_dispose_track, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[237])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_dispose_track, __pyx_t_10) < (0)) __PYX_ERR(0, 4347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4366
 *     return status
 * 
 * def music_sequence_get_track_count(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the number of tracks in a sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_427music_sequence_get_track_count, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_get_track_count, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[238])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_track_count, __pyx_t_10) < (0)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4385
 *     return track_count
 * 
 * def music_sequence_get_ind_track(long sequence, int track_index):             # <<<<<<<<<<<<<<
 *     """Get a track at the specified index.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_429music_sequence_get_ind_track, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_get_ind_track, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[239])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_ind_track, __pyx_t_10) < (0)) __PYX_ERR(0, 4385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4405
 *     return <long>track
 * 
 * def music_sequence_get_tempo_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the tempo track of the sequence.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_431music_sequence_get_tempo_track, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_get_tempo_track, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[240])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_tempo_track, __pyx_t_10) < (0)) __PYX_ERR(0, 4405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4424
 *     return <long>track
 * 
 * def music_sequence_set_sequence_type(long sequence, int sequence_type):             # <<<<<<<<<<<<<<
 *     """Set the sequence type.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_433music_sequence_set_sequence_type, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_set_sequence_type, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[241])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_set_sequence_type, __pyx_t_10) < (0)) __PYX_ERR(0, 4424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4443
 *     return status
 * 
 * def music_sequence_get_sequence_type(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the sequence type.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_435music_sequence_get_sequence_type, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_get_sequence_type, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[242])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_sequence_type, __pyx_t_10) < (0)) __PYX_ERR(0, 4443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4462
 *     return sequence_type
 * 
 * def music_sequence_file_load(long sequence, str file_path, int file_type_hint=0, int flags=0):             # <<<<<<<<<<<<<<
 *     """Load a file into the sequence.
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_437music_sequence_file_load, 0, __pyx_mstate_global->__pyx_n_u_music_sequence_file_load, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[243])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_file_load, __pyx_t_11) < (0)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4506
 * # MusicTrack functions
 * 
 * def music_track_new_midi_note_event(long track, double timestamp, int channel, int note, int velocity, int release_velocity, double duration):             # <<<<<<<<<<<<<<
 *     """Add a MIDI note event to a track.
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_439music_track_new_midi_note_event, 0, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_note_event, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[244])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_note_event, __pyx_t_11) < (0)) __PYX_ERR(0, 4506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4541
 *     return status
 * 
 * def music_track_new_midi_channel_event(long track, double timestamp, int status, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Add a MIDI channel event to a track.
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_441music_track_new_midi_channel_event, 0, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_channel_eve, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[245])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_channel_eve, __pyx_t_11) < (0)) __PYX_ERR(0, 4541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4573
 *     return status_result
 * 
 * def music_track_new_extended_tempo_event(long track, double timestamp, double bpm):             # <<<<<<<<<<<<<<
 *     """Add a tempo event to a track.
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_443music_track_new_extended_tempo_event, 0, __pyx_mstate_global->__pyx_n_u_music_track_new_extended_tempo_e, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[246])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_extended_tempo_e, __pyx_t_11) < (0)) __PYX_ERR(0, 4573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4602
 * # MusicPlayer constants
 * 
 * def get_music_event_type_null():             # <<<<<<<<<<<<<<
 *     """Get the NULL event type constant."""
 *     return at.kMusicEventType_NULL
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_445get_music_event_type_null, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_null, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[247])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_null, __pyx_t_11) < (0)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4606
 *     return at.kMusicEventType_NULL
 * 
 * def get_music_event_type_extended_note():             # <<<<<<<<<<<<<<
 *     """Get the extended note event type constant."""
 *     return at.kMusicEventType_ExtendedNote
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_447get_music_event_type_extended_note, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_no, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[248])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_no, __pyx_t_11) < (0)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4610
 *     return at.kMusicEventType_ExtendedNote
 * 
 * def get_music_event_type_extended_tempo():             # <<<<<<<<<<<<<<
 *     """Get the extended tempo event type constant."""
 *     return at.kMusicEventType_ExtendedTempo
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_449get_music_event_type_extended_tempo, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_te, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[249])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_te, __pyx_t_11) < (0)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4614
 *     return at.kMusicEventType_ExtendedTempo
 * 
 * def get_music_event_type_user():             # <<<<<<<<<<<<<<
 *     """Get the user event type constant."""
 *     return at.kMusicEventType_User
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_451get_music_event_type_user, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_user, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[250])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_user, __pyx_t_11) < (0)) __PYX_ERR(0, 4614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4618
 *     return at.kMusicEventType_User
 * 
 * def get_music_event_type_meta():             # <<<<<<<<<<<<<<
 *     """Get the meta event type constant."""
 *     return at.kMusicEventType_Meta
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_453get_music_event_type_meta, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_meta, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[251])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_meta, __pyx_t_11) < (0)) __PYX_ERR(0, 4618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4622
 *     return at.kMusicEventType_Meta
 * 
 * def get_music_event_type_midi_note_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI note message event type constant."""
 *     return at.kMusicEventType_MIDINoteMessage
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_455get_music_event_type_midi_note_message, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_note_m, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[252])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_note_m, __pyx_t_11) < (0)) __PYX_ERR(0, 4622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4626
 *     return at.kMusicEventType_MIDINoteMessage
 * 
 * def get_music_event_type_midi_channel_message():             # <<<<<<<<<<<<<<
 *     """Get the MIDI channel message event type constant."""
 *     return at.kMusicEventType_MIDIChannelMessage
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_457get_music_event_type_midi_channel_message, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_channe, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[253])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_channe, __pyx_t_11) < (0)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4630
 *     return at.kMusicEventType_MIDIChannelMessage
 * 
 * def get_music_event_type_midi_raw_data():             # <<<<<<<<<<<<<<
 *     """Get the MIDI raw data event type constant."""
 *     return at.kMusicEventType_MIDIRawData
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_459get_music_event_type_midi_raw_data, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_raw_da, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[254])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_raw_da, __pyx_t_11) < (0)) __PYX_ERR(0, 4630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4634
 *     return at.kMusicEventType_MIDIRawData
 * 
 * def get_music_event_type_parameter():             # <<<<<<<<<<<<<<
 *     """Get the parameter event type constant."""
 *     return at.kMusicEventType_Parameter
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_461get_music_event_type_parameter, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_parameter, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[255])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_parameter, __pyx_t_11) < (0)) __PYX_ERR(0, 4634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4638
 *     return at.kMusicEventType_Parameter
 * 
 * def get_music_event_type_au_preset():             # <<<<<<<<<<<<<<
 *     """Get the AU preset event type constant."""
 *     return at.kMusicEventType_AUPreset
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_463get_music_event_type_au_preset, 0, __pyx_mstate_global->__pyx_n_u_get_music_event_type_au_preset, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[256])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_au_preset, __pyx_t_11) < (0)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4642
 *     return at.kMusicEventType_AUPreset
 * 
 * def get_music_sequence_type_beats():             # <<<<<<<<<<<<<<
 *     """Get the beats sequence type constant."""
 *     return at.kMusicSequenceType_Beats
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_465get_music_sequence_type_beats, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_beats, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[257])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_beats, __pyx_t_11) < (0)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4646
 *     return at.kMusicSequenceType_Beats
 * 
 * def get_music_sequence_type_seconds():             # <<<<<<<<<<<<<<
 *     """Get the seconds sequence type constant."""
 *     return at.kMusicSequenceType_Seconds
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_467get_music_sequence_type_seconds, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_seconds, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[258])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_seconds, __pyx_t_11) < (0)) __PYX_ERR(0, 4646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4650
 *     return at.kMusicSequenceType_Seconds
 * 
 * def get_music_sequence_type_samples():             # <<<<<<<<<<<<<<
 *     """Get the samples sequence type constant."""
 *     return at.kMusicSequenceType_Samples
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_469get_music_sequence_type_samples, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_samples, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[259])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_samples, __pyx_t_11) < (0)) __PYX_ERR(0, 4650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4654
 *     return at.kMusicSequenceType_Samples
 * 
 * def get_music_sequence_file_any_type():             # <<<<<<<<<<<<<<
 *     """Get the any file type constant."""
 *     return at.kMusicSequenceFile_AnyType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_471get_music_sequence_file_any_type, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_any_type, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[260])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_any_type, __pyx_t_11) < (0)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4658
 *     return at.kMusicSequenceFile_AnyType
 * 
 * def get_music_sequence_file_midi_type():             # <<<<<<<<<<<<<<
 *     """Get the MIDI file type constant."""
 *     return at.kMusicSequenceFile_MIDIType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_473get_music_sequence_file_midi_type, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_midi_typ, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[261])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_midi_typ, __pyx_t_11) < (0)) __PYX_ERR(0, 4658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4662
 *     return at.kMusicSequenceFile_MIDIType
 * 
 * def get_music_sequence_file_imelody_type():             # <<<<<<<<<<<<<<
 *     """Get the iMelody file type constant."""
 *     return at.kMusicSequenceFile_iMelodyType
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_475get_music_sequence_file_imelody_type, 0, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_imelody, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[262])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_imelody, __pyx_t_11) < (0)) __PYX_ERR(0, 4662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4666
 *     return at.kMusicSequenceFile_iMelodyType
 * 
 * def get_sequence_track_property_loop_info():             # <<<<<<<<<<<<<<
 *     """Get the loop info track property constant."""
 *     return at.kSequenceTrackProperty_LoopInfo
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_477get_sequence_track_property_loop_info, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_loop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[263])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_loop, __pyx_t_11) < (0)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4670
 *     return at.kSequenceTrackProperty_LoopInfo
 * 
 * def get_sequence_track_property_offset_time():             # <<<<<<<<<<<<<<
 *     """Get the offset time track property constant."""
 *     return at.kSequenceTrackProperty_OffsetTime
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_479get_sequence_track_property_offset_time, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_offs, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[264])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_offs, __pyx_t_11) < (0)) __PYX_ERR(0, 4670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4674
 *     return at.kSequenceTrackProperty_OffsetTime
 * 
 * def get_sequence_track_property_mute_status():             # <<<<<<<<<<<<<<
 *     """Get the mute status track property constant."""
 *     return at.kSequenceTrackProperty_MuteStatus
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_481get_sequence_track_property_mute_status, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_mute, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[265])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_mute, __pyx_t_11) < (0)) __PYX_ERR(0, 4674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4678
 *     return at.kSequenceTrackProperty_MuteStatus
 * 
 * def get_sequence_track_property_solo_status():             # <<<<<<<<<<<<<<
 *     """Get the solo status track property constant."""
 *     return at.kSequenceTrackProperty_SoloStatus
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_483get_sequence_track_property_solo_status, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_solo, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[266])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_solo, __pyx_t_11) < (0)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4682
 *     return at.kSequenceTrackProperty_SoloStatus
 * 
 * def get_sequence_track_property_automated_parameters():             # <<<<<<<<<<<<<<
 *     """Get the automated parameters track property constant."""
 *     return at.kSequenceTrackProperty_AutomatedParameters
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_485get_sequence_track_property_automated_parameters, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_auto, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[267])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_auto, __pyx_t_11) < (0)) __PYX_ERR(0, 4682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4686
 *     return at.kSequenceTrackProperty_AutomatedParameters
 * 
 * def get_sequence_track_property_track_length():             # <<<<<<<<<<<<<<
 *     """Get the track length property constant."""
 *     return at.kSequenceTrackProperty_TrackLength
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_487get_sequence_track_property_track_length, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_trac, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[268])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_trac, __pyx_t_11) < (0)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4690
 *     return at.kSequenceTrackProperty_TrackLength
 * 
 * def get_sequence_track_property_time_resolution():             # <<<<<<<<<<<<<<
 *     """Get the time resolution property constant."""
 *     return at.kSequenceTrackProperty_TimeResolution
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_489get_sequence_track_property_time_resolution, 0, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_time, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[269])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_time, __pyx_t_11) < (0)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":4696
 * # Helper functions
 * 
 * def create_midi_note_message(int channel, int note, int velocity, int release_velocity=0, double duration=1.0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI note message dictionary.
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = PyFloat_FromDouble(((double)1.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = PyTuple_Pack(2, __pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_491create_midi_note_message, 0, __pyx_mstate_global->__pyx_n_u_create_midi_note_message, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[270])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_midi_note_message, __pyx_t_4) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4717
 *     }
 * 
 * def create_midi_channel_message(int status, int data1, int data2=0):             # <<<<<<<<<<<<<<
 *     """Create a MIDI channel message dictionary.
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_493create_midi_channel_message, 0, __pyx_mstate_global->__pyx_n_u_create_midi_channel_message, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[271])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_midi_channel_message, __pyx_t_4) < (0)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4739
 * # Client functions
 * 
 * def midi_client_create(str name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI client.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_495midi_client_create, 0, __pyx_mstate_global->__pyx_n_u_midi_client_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[272])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_client_create, __pyx_t_4) < (0)) __PYX_ERR(0, 4739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4768
 *         cf.CFRelease(cf_name)
 * 
 * def midi_client_dispose(long client):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI client.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_497midi_client_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_client_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[273])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_client_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 4768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4787
 * # Port functions
 * 
 * def midi_input_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI input port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_499midi_input_port_create, 0, __pyx_mstate_global->__pyx_n_u_midi_input_port_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[274])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_input_port_create, __pyx_t_4) < (0)) __PYX_ERR(0, 4787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4818
 *         cf.CFRelease(cf_name)
 * 
 * def midi_output_port_create(long client, str port_name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI output port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_501midi_output_port_create, 0, __pyx_mstate_global->__pyx_n_u_midi_output_port_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[275])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_output_port_create, __pyx_t_4) < (0)) __PYX_ERR(0, 4818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4849
 *         cf.CFRelease(cf_name)
 * 
 * def midi_port_dispose(long port):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_503midi_port_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_port_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[276])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_port_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4866
 *     return status
 * 
 * def midi_port_connect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Connect a source to an input port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_505midi_port_connect_source, 0, __pyx_mstate_global->__pyx_n_u_midi_port_connect_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[277])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_port_connect_source, __pyx_t_4) < (0)) __PYX_ERR(0, 4866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4885
 *     return status
 * 
 * def midi_port_disconnect_source(long port, long source):             # <<<<<<<<<<<<<<
 *     """Disconnect a source from an input port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_507midi_port_disconnect_source, 0, __pyx_mstate_global->__pyx_n_u_midi_port_disconnect_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[278])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_port_disconnect_source, __pyx_t_4) < (0)) __PYX_ERR(0, 4885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4906
 * # Device and endpoint discovery
 * 
 * def midi_get_number_of_devices():             # <<<<<<<<<<<<<<
 *     """Get the number of MIDI devices in the system.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_509midi_get_number_of_devices, 0, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_devices, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[279])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_devices, __pyx_t_4) < (0)) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4914
 *     return cm.MIDIGetNumberOfDevices()
 * 
 * def midi_get_device(int device_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a device by index.
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_511midi_get_device, 0, __pyx_mstate_global->__pyx_n_u_midi_get_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[280])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_device, __pyx_t_10) < (0)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4933
 *     return <long>device
 * 
 * def midi_device_get_number_of_entities(long device):             # <<<<<<<<<<<<<<
 *     """Get the number of entities in a device.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_513midi_device_get_number_of_entities, 0, __pyx_mstate_global->__pyx_n_u_midi_device_get_number_of_entiti, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[281])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_get_number_of_entiti, __pyx_t_10) < (0)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4944
 *     return cm.MIDIDeviceGetNumberOfEntities(<cm.MIDIDeviceRef>device)
 * 
 * def midi_device_get_entity(long device, int entity_index):             # <<<<<<<<<<<<<<
 *     """Get an entity from a device by index.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_515midi_device_get_entity, 0, __pyx_mstate_global->__pyx_n_u_midi_device_get_entity, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[282])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_get_entity, __pyx_t_10) < (0)) __PYX_ERR(0, 4944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4965
 *     return <long>entity
 * 
 * def midi_entity_get_number_of_sources(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of sources in an entity.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_517midi_entity_get_number_of_sources, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[283])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_source, __pyx_t_10) < (0)) __PYX_ERR(0, 4965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4976
 *     return cm.MIDIEntityGetNumberOfSources(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_source(long entity, int source_index):             # <<<<<<<<<<<<<<
 *     """Get a source from an entity by index.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_519midi_entity_get_source, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_get_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[284])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_source, __pyx_t_10) < (0)) __PYX_ERR(0, 4976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":4997
 *     return <long>source
 * 
 * def midi_entity_get_number_of_destinations(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of destinations in an entity.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_521midi_entity_get_number_of_destinations, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_destin, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[285])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_destin, __pyx_t_10) < (0)) __PYX_ERR(0, 4997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":5008
 *     return cm.MIDIEntityGetNumberOfDestinations(<cm.MIDIEntityRef>entity)
 * 
 * def midi_entity_get_destination(long entity, int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination from an entity by index.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_523midi_entity_get_destination, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_get_destination, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[286])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_destination, __pyx_t_10) < (0)) __PYX_ERR(0, 5008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":5029
 *     return <long>dest
 * 
 * def midi_get_number_of_sources():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI sources in the system.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_525midi_get_number_of_sources, 0, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_sources, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[287])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_sources, __pyx_t_10) < (0)) __PYX_ERR(0, 5029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":5037
 *     return cm.MIDIGetNumberOfSources()
 * 
 * def midi_get_source(int source_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a source by system-wide index.
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5037, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_527midi_get_source, 0, __pyx_mstate_global->__pyx_n_u_midi_get_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[288])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_source, __pyx_t_4) < (0)) __PYX_ERR(0, 5037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5056
 *     return <long>source
 * 
 * def midi_get_number_of_destinations():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI destinations in the system.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_529midi_get_number_of_destinations, 0, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_destinations, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[289])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_destinations, __pyx_t_4) < (0)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5064
 *     return cm.MIDIGetNumberOfDestinations()
 * 
 * def midi_get_destination(int dest_index):             # <<<<<<<<<<<<<<
 *     """Get a destination by system-wide index.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_531midi_get_destination, 0, __pyx_mstate_global->__pyx_n_u_midi_get_destination, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[290])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_destination, __pyx_t_4) < (0)) __PYX_ERR(0, 5064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5085
 * # Virtual endpoint functions
 * 
 * def midi_source_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI source.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_533midi_source_create, 0, __pyx_mstate_global->__pyx_n_u_midi_source_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[291])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_source_create, __pyx_t_4) < (0)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5115
 *         cf.CFRelease(cf_name)
 * 
 * def midi_destination_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI destination.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_535midi_destination_create, 0, __pyx_mstate_global->__pyx_n_u_midi_destination_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[292])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_destination_create, __pyx_t_4) < (0)) __PYX_ERR(0, 5115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5146
 *         cf.CFRelease(cf_name)
 * 
 * def midi_endpoint_dispose(long endpoint):             # <<<<<<<<<<<<<<
 *     """Dispose a virtual MIDI endpoint.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_537midi_endpoint_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_endpoint_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[293])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5165
 * # Property functions
 * 
 * def midi_object_get_string_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get a string property from a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_539midi_object_get_string_property, 0, __pyx_mstate_global->__pyx_n_u_midi_object_get_string_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[294])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_get_string_property, __pyx_t_4) < (0)) __PYX_ERR(0, 5165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5225
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_get_integer_property(long obj, str property_name):             # <<<<<<<<<<<<<<
 *     """Get an integer property from a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_541midi_object_get_integer_property, 0, __pyx_mstate_global->__pyx_n_u_midi_object_get_integer_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[295])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_get_integer_property, __pyx_t_4) < (0)) __PYX_ERR(0, 5225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5257
 *         cf.CFRelease(cf_prop_name)
 * 
 * def midi_object_set_string_property(long obj, str property_name, str value):             # <<<<<<<<<<<<<<
 *     """Set a string property on a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_543midi_object_set_string_property, 0, __pyx_mstate_global->__pyx_n_u_midi_object_set_string_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[296])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_set_string_property, __pyx_t_4) < (0)) __PYX_ERR(0, 5257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5296
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_set_integer_property(long obj, str property_name, int value):             # <<<<<<<<<<<<<<
 *     """Set an integer property on a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_545midi_object_set_integer_property, 0, __pyx_mstate_global->__pyx_n_u_midi_object_set_integer_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[297])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_set_integer_property, __pyx_t_4) < (0)) __PYX_ERR(0, 5296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5330
 * # Convenience functions for getting common properties
 * 
 * def midi_object_get_name(long obj):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI object (device, entity, or endpoint).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_547midi_object_get_name, 0, __pyx_mstate_global->__pyx_n_u_midi_object_get_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[298])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_get_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5378
 *         cf.CFRelease(cf_value)
 * 
 * def midi_device_get_name(long device):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI device.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_549midi_device_get_name, 0, __pyx_mstate_global->__pyx_n_u_midi_device_get_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[299])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_get_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5392
 *     return midi_object_get_name(device)
 * 
 * def midi_endpoint_get_name(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI endpoint (source or destination).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_551midi_endpoint_get_name, 0, __pyx_mstate_global->__pyx_n_u_midi_endpoint_get_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[300])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_get_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5406
 *     return midi_object_get_name(endpoint)
 * 
 * def midi_entity_get_name(long entity):             # <<<<<<<<<<<<<<
 *     """Get the name of a MIDI entity.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_553midi_entity_get_name, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_get_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[301])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5420
 *     return midi_object_get_name(entity)
 * 
 * def midi_object_get_manufacturer(long obj):             # <<<<<<<<<<<<<<
 *     """Get the manufacturer of a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_555midi_object_get_manufacturer, 0, __pyx_mstate_global->__pyx_n_u_midi_object_get_manufacturer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[302])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_get_manufacturer, __pyx_t_4) < (0)) __PYX_ERR(0, 5420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5468
 *         cf.CFRelease(cf_value)
 * 
 * def midi_object_get_model(long obj):             # <<<<<<<<<<<<<<
 *     """Get the model of a MIDI object.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_557midi_object_get_model, 0, __pyx_mstate_global->__pyx_n_u_midi_object_get_model, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[303])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_object_get_model, __pyx_t_4) < (0)) __PYX_ERR(0, 5468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5518
 * # Send functions with simplified packet creation
 * 
 * def midi_send_data(long port, long destination, bytes data, int timestamp=0):             # <<<<<<<<<<<<<<
 *     """Send MIDI data to a destination.
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_559midi_send_data, 0, __pyx_mstate_global->__pyx_n_u_midi_send_data, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[304])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_send_data, __pyx_t_4) < (0)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5577
 * # Constants and helpers
 * 
 * def get_midi_error_invalid_client():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidClient error constant."""
 *     return cm.kMIDIInvalidClient
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_561get_midi_error_invalid_client, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_invalid_client, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[305])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_invalid_client, __pyx_t_4) < (0)) __PYX_ERR(0, 5577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5581
 *     return cm.kMIDIInvalidClient
 * 
 * def get_midi_error_invalid_port():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIInvalidPort error constant."""
 *     return cm.kMIDIInvalidPort
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_563get_midi_error_invalid_port, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_invalid_port, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[306])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_invalid_port, __pyx_t_4) < (0)) __PYX_ERR(0, 5581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5585
 *     return cm.kMIDIInvalidPort
 * 
 * def get_midi_error_wrong_endpoint_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongEndpointType error constant."""
 *     return cm.kMIDIWrongEndpointType
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_565get_midi_error_wrong_endpoint_type, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_endpoint_ty, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[307])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_endpoint_ty, __pyx_t_4) < (0)) __PYX_ERR(0, 5585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5589
 *     return cm.kMIDIWrongEndpointType
 * 
 * def get_midi_error_no_connection():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoConnection error constant."""
 *     return cm.kMIDINoConnection
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_567get_midi_error_no_connection, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_no_connection, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[308])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_no_connection, __pyx_t_4) < (0)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5593
 *     return cm.kMIDINoConnection
 * 
 * def get_midi_error_unknown_endpoint():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownEndpoint error constant."""
 *     return cm.kMIDIUnknownEndpoint
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_569get_midi_error_unknown_endpoint, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_endpoint, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[309])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_endpoint, __pyx_t_4) < (0)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5597
 *     return cm.kMIDIUnknownEndpoint
 * 
 * def get_midi_error_unknown_property():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownProperty error constant."""
 *     return cm.kMIDIUnknownProperty
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_571get_midi_error_unknown_property, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_property, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[310])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_property, __pyx_t_4) < (0)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5601
 *     return cm.kMIDIUnknownProperty
 * 
 * def get_midi_error_wrong_property_type():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongPropertyType error constant."""
 *     return cm.kMIDIWrongPropertyType
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_573get_midi_error_wrong_property_type, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_property_ty, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[311])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_property_ty, __pyx_t_4) < (0)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5605
 *     return cm.kMIDIWrongPropertyType
 * 
 * def get_midi_error_no_current_setup():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINoCurrentSetup error constant."""
 *     return cm.kMIDINoCurrentSetup
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_575get_midi_error_no_current_setup, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_no_current_setup, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[312])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_no_current_setup, __pyx_t_4) < (0)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5609
 *     return cm.kMIDINoCurrentSetup
 * 
 * def get_midi_error_message_send_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIMessageSendErr error constant."""
 *     return cm.kMIDIMessageSendErr
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_577get_midi_error_message_send_err, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_message_send_err, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[313])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_message_send_err, __pyx_t_4) < (0)) __PYX_ERR(0, 5609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5613
 *     return cm.kMIDIMessageSendErr
 * 
 * def get_midi_error_server_start_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIServerStartErr error constant."""
 *     return cm.kMIDIServerStartErr
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_579get_midi_error_server_start_err, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_server_start_err, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[314])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_server_start_err, __pyx_t_4) < (0)) __PYX_ERR(0, 5613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5617
 *     return cm.kMIDIServerStartErr
 * 
 * def get_midi_error_setup_format_err():             # <<<<<<<<<<<<<<
 *     """Get the kMIDISetupFormatErr error constant."""
 *     return cm.kMIDISetupFormatErr
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_581get_midi_error_setup_format_err, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_setup_format_err, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[315])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_setup_format_err, __pyx_t_4) < (0)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5621
 *     return cm.kMIDISetupFormatErr
 * 
 * def get_midi_error_wrong_thread():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIWrongThread error constant."""
 *     return cm.kMIDIWrongThread
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_583get_midi_error_wrong_thread, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_thread, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[316])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_wrong_thread, __pyx_t_4) < (0)) __PYX_ERR(0, 5621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5625
 *     return cm.kMIDIWrongThread
 * 
 * def get_midi_error_object_not_found():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectNotFound error constant."""
 *     return cm.kMIDIObjectNotFound
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_585get_midi_error_object_not_found, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_object_not_found, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[317])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_object_not_found, __pyx_t_4) < (0)) __PYX_ERR(0, 5625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5629
 *     return cm.kMIDIObjectNotFound
 * 
 * def get_midi_error_id_not_unique():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIIDNotUnique error constant."""
 *     return cm.kMIDIIDNotUnique
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_587get_midi_error_id_not_unique, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_id_not_unique, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[318])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_id_not_unique, __pyx_t_4) < (0)) __PYX_ERR(0, 5629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5633
 *     return cm.kMIDIIDNotUnique
 * 
 * def get_midi_error_not_permitted():             # <<<<<<<<<<<<<<
 *     """Get the kMIDINotPermitted error constant."""
 *     return cm.kMIDINotPermitted
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_589get_midi_error_not_permitted, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_not_permitted, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[319])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_not_permitted, __pyx_t_4) < (0)) __PYX_ERR(0, 5633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5637
 *     return cm.kMIDINotPermitted
 * 
 * def get_midi_error_unknown_error():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIUnknownError error constant."""
 *     return cm.kMIDIUnknownError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_591get_midi_error_unknown_error, 0, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_error, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[320])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_error_unknown_error, __pyx_t_4) < (0)) __PYX_ERR(0, 5637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5641
 *     return cm.kMIDIUnknownError
 * 
 * def get_midi_object_type_other():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Other constant."""
 *     return cm.kMIDIObjectType_Other
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_593get_midi_object_type_other, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_other, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[321])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_other, __pyx_t_4) < (0)) __PYX_ERR(0, 5641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5645
 *     return cm.kMIDIObjectType_Other
 * 
 * def get_midi_object_type_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Device constant."""
 *     return cm.kMIDIObjectType_Device
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_595get_midi_object_type_device, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[322])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_device, __pyx_t_4) < (0)) __PYX_ERR(0, 5645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5649
 *     return cm.kMIDIObjectType_Device
 * 
 * def get_midi_object_type_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Entity constant."""
 *     return cm.kMIDIObjectType_Entity
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_597get_midi_object_type_entity, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_entity, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[323])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_entity, __pyx_t_4) < (0)) __PYX_ERR(0, 5649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5653
 *     return cm.kMIDIObjectType_Entity
 * 
 * def get_midi_object_type_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Source constant."""
 *     return cm.kMIDIObjectType_Source
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_599get_midi_object_type_source, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_source, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[324])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_source, __pyx_t_4) < (0)) __PYX_ERR(0, 5653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5657
 *     return cm.kMIDIObjectType_Source
 * 
 * def get_midi_object_type_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_Destination constant."""
 *     return cm.kMIDIObjectType_Destination
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_601get_midi_object_type_destination, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_destination, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[325])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_destination, __pyx_t_4) < (0)) __PYX_ERR(0, 5657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5661
 *     return cm.kMIDIObjectType_Destination
 * 
 * def get_midi_object_type_external_device():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDevice constant."""
 *     return cm.kMIDIObjectType_ExternalDevice
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_603get_midi_object_type_external_device, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_de, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[326])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_de, __pyx_t_4) < (0)) __PYX_ERR(0, 5661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5665
 *     return cm.kMIDIObjectType_ExternalDevice
 * 
 * def get_midi_object_type_external_entity():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalEntity constant."""
 *     return cm.kMIDIObjectType_ExternalEntity
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_605get_midi_object_type_external_entity, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_en, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[327])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_en, __pyx_t_4) < (0)) __PYX_ERR(0, 5665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5669
 *     return cm.kMIDIObjectType_ExternalEntity
 * 
 * def get_midi_object_type_external_source():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalSource constant."""
 *     return cm.kMIDIObjectType_ExternalSource
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_607get_midi_object_type_external_source, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_so, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[328])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_so, __pyx_t_4) < (0)) __PYX_ERR(0, 5669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5673
 *     return cm.kMIDIObjectType_ExternalSource
 * 
 * def get_midi_object_type_external_destination():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIObjectType_ExternalDestination constant."""
 *     return cm.kMIDIObjectType_ExternalDestination
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_609get_midi_object_type_external_destination, 0, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_de_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[329])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_object_type_external_de_2, __pyx_t_4) < (0)) __PYX_ERR(0, 5673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5677
 *     return cm.kMIDIObjectType_ExternalDestination
 * 
 * def get_midi_protocol_1_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_1_0 constant."""
 *     return cm.kMIDIProtocol_1_0
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_611get_midi_protocol_1_0, 0, __pyx_mstate_global->__pyx_n_u_get_midi_protocol_1_0, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[330])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_protocol_1_0, __pyx_t_4) < (0)) __PYX_ERR(0, 5677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5681
 *     return cm.kMIDIProtocol_1_0
 * 
 * def get_midi_protocol_2_0():             # <<<<<<<<<<<<<<
 *     """Get the kMIDIProtocol_2_0 constant."""
 *     return cm.kMIDIProtocol_2_0
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_613get_midi_protocol_2_0, 0, __pyx_mstate_global->__pyx_n_u_get_midi_protocol_2_0, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[331])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_protocol_2_0, __pyx_t_4) < (0)) __PYX_ERR(0, 5681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5687
 * # Common property name helpers
 * 
 * def get_midi_property_name():             # <<<<<<<<<<<<<<
 *     """Get the 'name' property key."""
 *     return "name"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_615get_midi_property_name, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[332])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5691
 *     return "name"
 * 
 * def get_midi_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_617get_midi_property_manufacturer, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_manufacturer, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[333])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_manufacturer, __pyx_t_4) < (0)) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5695
 *     return "manufacturer"
 * 
 * def get_midi_property_model():             # <<<<<<<<<<<<<<
 *     """Get the 'model' property key."""
 *     return "model"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_619get_midi_property_model, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_model, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[334])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_model, __pyx_t_4) < (0)) __PYX_ERR(0, 5695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5699
 *     return "model"
 * 
 * def get_midi_property_unique_id():             # <<<<<<<<<<<<<<
 *     """Get the 'uniqueID' property key."""
 *     return "uniqueID"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_621get_midi_property_unique_id, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_unique_id, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[335])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_unique_id, __pyx_t_4) < (0)) __PYX_ERR(0, 5699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5703
 *     return "uniqueID"
 * 
 * def get_midi_property_device_id():             # <<<<<<<<<<<<<<
 *     """Get the 'deviceID' property key."""
 *     return "deviceID"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_623get_midi_property_device_id, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_device_id, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[336])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_device_id, __pyx_t_4) < (0)) __PYX_ERR(0, 5703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5707
 *     return "deviceID"
 * 
 * def get_midi_property_receive_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'receiveChannels' property key."""
 *     return "receiveChannels"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_625get_midi_property_receive_channels, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_receive_channe, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[337])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_receive_channe, __pyx_t_4) < (0)) __PYX_ERR(0, 5707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5711
 *     return "receiveChannels"
 * 
 * def get_midi_property_transmit_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'transmitChannels' property key."""
 *     return "transmitChannels"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_627get_midi_property_transmit_channels, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_transmit_chann, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[338])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_transmit_chann, __pyx_t_4) < (0)) __PYX_ERR(0, 5711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5715
 *     return "transmitChannels"
 * 
 * def get_midi_property_offline():             # <<<<<<<<<<<<<<
 *     """Get the 'offline' property key."""
 *     return "offline"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_629get_midi_property_offline, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_offline, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[339])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_offline, __pyx_t_4) < (0)) __PYX_ERR(0, 5715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5719
 *     return "offline"
 * 
 * def get_midi_property_private():             # <<<<<<<<<<<<<<
 *     """Get the 'private' property key."""
 *     return "private"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_631get_midi_property_private, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_private, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[340])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_private, __pyx_t_4) < (0)) __PYX_ERR(0, 5719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5723
 *     return "private"
 * 
 * def get_midi_property_driver_owner():             # <<<<<<<<<<<<<<
 *     """Get the 'driverOwner' property key."""
 *     return "driverOwner"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_633get_midi_property_driver_owner, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_driver_owner, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[341])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_driver_owner, __pyx_t_4) < (0)) __PYX_ERR(0, 5723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5727
 *     return "driverOwner"
 * 
 * def get_midi_property_display_name():             # <<<<<<<<<<<<<<
 *     """Get the 'displayName' property key."""
 *     return "displayName"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_635get_midi_property_display_name, 0, __pyx_mstate_global->__pyx_n_u_get_midi_property_display_name, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[342])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_property_display_name, __pyx_t_4) < (0)) __PYX_ERR(0, 5727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5734
 * # MIDI Messages (Universal MIDI Packet) Functions
 * 
 * def midi_message_type_for_up_word(int word):             # <<<<<<<<<<<<<<
 *     """Get the message type from a Universal MIDI Packet word.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_637midi_message_type_for_up_word, 0, __pyx_mstate_global->__pyx_n_u_midi_message_type_for_up_word, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[343])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_message_type_for_up_word, __pyx_t_4) < (0)) __PYX_ERR(0, 5734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5747
 * # MIDI 1.0 Universal MIDI Packet Functions
 * 
 * def midi1_up_channel_voice_message(int group, int status, int channel, int data1, int data2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet channel voice message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_639midi1_up_channel_voice_message, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_channel_voice_message, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[344])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_channel_voice_message, __pyx_t_4) < (0)) __PYX_ERR(0, 5747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5763
 *                                            <cf.UInt8>channel, <cf.UInt8>data1, <cf.UInt8>data2)
 * 
 * def midi1_up_note_off(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note Off message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_641midi1_up_note_off, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_note_off, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[345])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_note_off, __pyx_t_4) < (0)) __PYX_ERR(0, 5763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5778
 *                                <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_note_on(int group, int channel, int note_number, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Note On message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_643midi1_up_note_on, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_note_on, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[346])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_note_on, __pyx_t_4) < (0)) __PYX_ERR(0, 5778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5793
 *                               <cf.UInt8>note_number, <cf.UInt8>velocity)
 * 
 * def midi1_up_control_change(int group, int channel, int index, int data):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Control Change message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_645midi1_up_control_change, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_control_change, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[347])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_control_change, __pyx_t_4) < (0)) __PYX_ERR(0, 5793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5808
 *                                      <cf.UInt8>index, <cf.UInt8>data)
 * 
 * def midi1_up_pitch_bend(int group, int channel, int lsb, int msb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet Pitch Bend message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_647midi1_up_pitch_bend, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_pitch_bend, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[348])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_pitch_bend, __pyx_t_4) < (0)) __PYX_ERR(0, 5808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5823
 *                                  <cf.UInt8>lsb, <cf.UInt8>msb)
 * 
 * def midi1_up_system_common(int group, int status, int byte1, int byte2):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet System Common message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_649midi1_up_system_common, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_system_common, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[349])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_system_common, __pyx_t_4) < (0)) __PYX_ERR(0, 5823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5838
 *                                     <cf.UInt8>byte1, <cf.UInt8>byte2)
 * 
 * def midi1_up_sysex(int group, int status, int bytes_used, int byte1, int byte2, int byte3, int byte4, int byte5, int byte6):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 1.0 Universal Packet SysEx message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_651midi1_up_sysex, 0, __pyx_mstate_global->__pyx_n_u_midi1_up_sysex, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[350])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_sysex, __pyx_t_4) < (0)) __PYX_ERR(0, 5838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5857
 * # MIDI 2.0 Channel Voice Message Functions
 * 
 * def midi2_channel_voice_message(int group, int status, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Channel Voice message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_653midi2_channel_voice_message, 0, __pyx_mstate_global->__pyx_n_u_midi2_channel_voice_message, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[351])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_channel_voice_message, __pyx_t_4) < (0)) __PYX_ERR(0, 5857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5874
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_on(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note On message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_655midi2_note_on, 0, __pyx_mstate_global->__pyx_n_u_midi2_note_on, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[352])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_note_on, __pyx_t_4) < (0)) __PYX_ERR(0, 5874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5892
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_note_off(int group, int channel, int note_number, int attribute_type, int attribute_data, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Note Off message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_657midi2_note_off, 0, __pyx_mstate_global->__pyx_n_u_midi2_note_off, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[353])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_note_off, __pyx_t_4) < (0)) __PYX_ERR(0, 5892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5910
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_control_change(int group, int channel, int index, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Control Change message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_659midi2_control_change, 0, __pyx_mstate_global->__pyx_n_u_midi2_control_change, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[354])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_control_change, __pyx_t_4) < (0)) __PYX_ERR(0, 5910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5926
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_program_change(int group, int channel, bint bank_is_valid, int program, int bank_msb, int bank_lsb):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Program Change message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_661midi2_program_change, 0, __pyx_mstate_global->__pyx_n_u_midi2_program_change, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[355])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_program_change, __pyx_t_4) < (0)) __PYX_ERR(0, 5926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5944
 *     return (msg.word0, msg.word1)
 * 
 * def midi2_pitch_bend(int group, int channel, long value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI 2.0 Pitch Bend message.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_663midi2_pitch_bend, 0, __pyx_mstate_global->__pyx_n_u_midi2_pitch_bend, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[356])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_pitch_bend, __pyx_t_4) < (0)) __PYX_ERR(0, 5944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5960
 * # MIDI Message Type Constants
 * 
 * def get_midi_message_type_utility():             # <<<<<<<<<<<<<<
 *     """Get the Utility message type constant."""
 *     return cm.kMIDIMessageTypeUtility
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_665get_midi_message_type_utility, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_utility, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[357])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_utility, __pyx_t_4) < (0)) __PYX_ERR(0, 5960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5964
 *     return cm.kMIDIMessageTypeUtility
 * 
 * def get_midi_message_type_system():             # <<<<<<<<<<<<<<
 *     """Get the System message type constant."""
 *     return cm.kMIDIMessageTypeSystem
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_667get_midi_message_type_system, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_system, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[358])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_system, __pyx_t_4) < (0)) __PYX_ERR(0, 5964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5968
 *     return cm.kMIDIMessageTypeSystem
 * 
 * def get_midi_message_type_channel_voice1():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 1 (MIDI 1.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice1
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_669get_midi_message_type_channel_voice1, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_channel_vo, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[359])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_channel_vo, __pyx_t_4) < (0)) __PYX_ERR(0, 5968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5972
 *     return cm.kMIDIMessageTypeChannelVoice1
 * 
 * def get_midi_message_type_sysex():             # <<<<<<<<<<<<<<
 *     """Get the SysEx message type constant."""
 *     return cm.kMIDIMessageTypeSysEx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_671get_midi_message_type_sysex, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_sysex, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[360])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_sysex, __pyx_t_4) < (0)) __PYX_ERR(0, 5972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5976
 *     return cm.kMIDIMessageTypeSysEx
 * 
 * def get_midi_message_type_channel_voice2():             # <<<<<<<<<<<<<<
 *     """Get the Channel Voice 2 (MIDI 2.0) message type constant."""
 *     return cm.kMIDIMessageTypeChannelVoice2
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_673get_midi_message_type_channel_voice2, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_channel_vo_2, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[361])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_channel_vo_2, __pyx_t_4) < (0)) __PYX_ERR(0, 5976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5980
 *     return cm.kMIDIMessageTypeChannelVoice2
 * 
 * def get_midi_message_type_data128():             # <<<<<<<<<<<<<<
 *     """Get the Data128 message type constant."""
 *     return cm.kMIDIMessageTypeData128
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_675get_midi_message_type_data128, 0, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_data128, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[362])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_message_type_data128, __pyx_t_4) < (0)) __PYX_ERR(0, 5980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5986
 * # MIDI CV Status Constants
 * 
 * def get_midi_cv_status_note_off():             # <<<<<<<<<<<<<<
 *     """Get the Note Off status constant."""
 *     return cm.kMIDICVStatusNoteOff
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_677get_midi_cv_status_note_off, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_note_off, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[363])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_note_off, __pyx_t_4) < (0)) __PYX_ERR(0, 5986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5990
 *     return cm.kMIDICVStatusNoteOff
 * 
 * def get_midi_cv_status_note_on():             # <<<<<<<<<<<<<<
 *     """Get the Note On status constant."""
 *     return cm.kMIDICVStatusNoteOn
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_679get_midi_cv_status_note_on, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_note_on, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[364])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_note_on, __pyx_t_4) < (0)) __PYX_ERR(0, 5990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5994
 *     return cm.kMIDICVStatusNoteOn
 * 
 * def get_midi_cv_status_poly_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Poly Pressure status constant."""
 *     return cm.kMIDICVStatusPolyPressure
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_681get_midi_cv_status_poly_pressure, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_poly_pressure, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[365])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_poly_pressure, __pyx_t_4) < (0)) __PYX_ERR(0, 5994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5998
 *     return cm.kMIDICVStatusPolyPressure
 * 
 * def get_midi_cv_status_control_change():             # <<<<<<<<<<<<<<
 *     """Get the Control Change status constant."""
 *     return cm.kMIDICVStatusControlChange
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_683get_midi_cv_status_control_change, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_control_chang, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[366])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_control_chang, __pyx_t_4) < (0)) __PYX_ERR(0, 5998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6002
 *     return cm.kMIDICVStatusControlChange
 * 
 * def get_midi_cv_status_program_change():             # <<<<<<<<<<<<<<
 *     """Get the Program Change status constant."""
 *     return cm.kMIDICVStatusProgramChange
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_685get_midi_cv_status_program_change, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_program_chang, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[367])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_program_chang, __pyx_t_4) < (0)) __PYX_ERR(0, 6002, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6006
 *     return cm.kMIDICVStatusProgramChange
 * 
 * def get_midi_cv_status_channel_pressure():             # <<<<<<<<<<<<<<
 *     """Get the Channel Pressure status constant."""
 *     return cm.kMIDICVStatusChannelPressure
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_687get_midi_cv_status_channel_pressure, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_channel_press, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[368])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_channel_press, __pyx_t_4) < (0)) __PYX_ERR(0, 6006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6010
 *     return cm.kMIDICVStatusChannelPressure
 * 
 * def get_midi_cv_status_pitch_bend():             # <<<<<<<<<<<<<<
 *     """Get the Pitch Bend status constant."""
 *     return cm.kMIDICVStatusPitchBend
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_689get_midi_cv_status_pitch_bend, 0, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_pitch_bend, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[369])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_cv_status_pitch_bend, __pyx_t_4) < (0)) __PYX_ERR(0, 6010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6017
 * # MIDI Setup (Device and Entity Management) Functions
 * 
 * def midi_device_new_entity(long device, str name, int protocol, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Create a new entity for a MIDI device (macOS 11.0+, iOS 14.0+).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_691midi_device_new_entity, 0, __pyx_mstate_global->__pyx_n_u_midi_device_new_entity, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[370])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_new_entity, __pyx_t_4) < (0)) __PYX_ERR(0, 6017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6058
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_add_entity(long device, str name, bint embedded, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add an entity to a MIDI device (deprecated, use midi_device_new_entity).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_693midi_device_add_entity, 0, __pyx_mstate_global->__pyx_n_u_midi_device_add_entity, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[371])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_add_entity, __pyx_t_4) < (0)) __PYX_ERR(0, 6058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6097
 *             cf.CFRelease(cf_name)
 * 
 * def midi_device_remove_entity(long device, long entity):             # <<<<<<<<<<<<<<
 *     """Remove an entity from a MIDI device.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_695midi_device_remove_entity, 0, __pyx_mstate_global->__pyx_n_u_midi_device_remove_entity, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[372])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_remove_entity, __pyx_t_4) < (0)) __PYX_ERR(0, 6097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6120
 *     return status
 * 
 * def midi_entity_add_or_remove_endpoints(long entity, int num_source_endpoints, int num_destination_endpoints):             # <<<<<<<<<<<<<<
 *     """Add or remove endpoints from a MIDI entity.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_697midi_entity_add_or_remove_endpoints, 0, __pyx_mstate_global->__pyx_n_u_midi_entity_add_or_remove_endpoi, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[373])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_add_or_remove_endpoi, __pyx_t_4) < (0)) __PYX_ERR(0, 6120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6145
 *     return status
 * 
 * def midi_setup_add_device(long device):             # <<<<<<<<<<<<<<
 *     """Add a driver-owned MIDI device to the current setup.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_699midi_setup_add_device, 0, __pyx_mstate_global->__pyx_n_u_midi_setup_add_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[374])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_setup_add_device, __pyx_t_4) < (0)) __PYX_ERR(0, 6145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6164
 *     return status
 * 
 * def midi_setup_remove_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove a driver-owned MIDI device from the current setup.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_701midi_setup_remove_device, 0, __pyx_mstate_global->__pyx_n_u_midi_setup_remove_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[375])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_setup_remove_device, __pyx_t_4) < (0)) __PYX_ERR(0, 6164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6183
 *     return status
 * 
 * def midi_setup_add_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Add an external MIDI device to the current setup.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_703midi_setup_add_external_device, 0, __pyx_mstate_global->__pyx_n_u_midi_setup_add_external_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[376])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_setup_add_external_device, __pyx_t_4) < (0)) __PYX_ERR(0, 6183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6202
 *     return status
 * 
 * def midi_setup_remove_external_device(long device):             # <<<<<<<<<<<<<<
 *     """Remove an external MIDI device from the current setup.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_705midi_setup_remove_external_device, 0, __pyx_mstate_global->__pyx_n_u_midi_setup_remove_external_devic, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[377])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_setup_remove_external_devic, __pyx_t_4) < (0)) __PYX_ERR(0, 6202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6221
 *     return status
 * 
 * def midi_external_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new external MIDI device.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_707midi_external_device_create, 0, __pyx_mstate_global->__pyx_n_u_midi_external_device_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[378])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_external_device_create, __pyx_t_4) < (0)) __PYX_ERR(0, 6221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6273
 * # MIDI Driver Functions
 * 
 * def midi_device_create(str name, str manufacturer, str model):             # <<<<<<<<<<<<<<
 *     """Create a new MIDI device (available to non-drivers).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_709midi_device_create, 0, __pyx_mstate_global->__pyx_n_u_midi_device_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[379])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_create, __pyx_t_4) < (0)) __PYX_ERR(0, 6273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6324
 *             cf.CFRelease(cf_model)
 * 
 * def midi_device_dispose(long device):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI device that hasn't been added to the system.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_711midi_device_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_device_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[380])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 6324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6343
 *     return status
 * 
 * def midi_device_list_get_number_of_devices(long dev_list):             # <<<<<<<<<<<<<<
 *     """Get the number of devices in a device list.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_713midi_device_list_get_number_of_devices, 0, __pyx_mstate_global->__pyx_n_u_midi_device_list_get_number_of_d, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[381])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_list_get_number_of_d, __pyx_t_4) < (0)) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6354
 *     return cm.MIDIDeviceListGetNumberOfDevices(<cm.MIDIDeviceListRef>dev_list)
 * 
 * def midi_device_list_get_device(long dev_list, int index):             # <<<<<<<<<<<<<<
 *     """Get a device from a device list.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_715midi_device_list_get_device, 0, __pyx_mstate_global->__pyx_n_u_midi_device_list_get_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[382])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_list_get_device, __pyx_t_4) < (0)) __PYX_ERR(0, 6354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6381
 *     return device
 * 
 * def midi_device_list_add_device(long dev_list, long device):             # <<<<<<<<<<<<<<
 *     """Add a device to a device list.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_717midi_device_list_add_device, 0, __pyx_mstate_global->__pyx_n_u_midi_device_list_add_device, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[383])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_list_add_device, __pyx_t_4) < (0)) __PYX_ERR(0, 6381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6403
 *     return status
 * 
 * def midi_device_list_dispose(long dev_list):             # <<<<<<<<<<<<<<
 *     """Dispose a device list (but not the contained devices).
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_719midi_device_list_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_device_list_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[384])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_list_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 6403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":6422
 *     return status
 * 
 * def midi_endpoint_set_ref_cons(long endpoint, long ref1=0, long ref2=0):             # <<<<<<<<<<<<<<
 *     """Set reference constants for a MIDI endpoint.
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_Pack(2, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_721midi_endpoint_set_ref_cons, 0, __pyx_mstate_global->__pyx_n_u_midi_endpoint_set_ref_cons, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[385])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_set_ref_cons, __pyx_t_10) < (0)) __PYX_ERR(0, 6422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6447
 *     return status
 * 
 * def midi_endpoint_get_ref_cons(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get reference constants for a MIDI endpoint.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_723midi_endpoint_get_ref_cons, 0, __pyx_mstate_global->__pyx_n_u_midi_endpoint_get_ref_cons, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[386])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_get_ref_cons, __pyx_t_10) < (0)) __PYX_ERR(0, 6447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6470
 *     return (<long>ref1, <long>ref2)
 * 
 * def midi_get_driver_io_runloop():             # <<<<<<<<<<<<<<
 *     """Get the driver I/O run loop.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_725midi_get_driver_io_runloop, 0, __pyx_mstate_global->__pyx_n_u_midi_get_driver_io_runloop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[387])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_driver_io_runloop, __pyx_t_10) < (0)) __PYX_ERR(0, 6470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6482
 *     return <long>runloop
 * 
 * def midi_get_driver_device_list(long driver):             # <<<<<<<<<<<<<<
 *     """Get the device list for a specific driver.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_727midi_get_driver_device_list, 0, __pyx_mstate_global->__pyx_n_u_midi_get_driver_device_list, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[388])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_driver_device_list, __pyx_t_10) < (0)) __PYX_ERR(0, 6482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6498
 *     return dev_list
 * 
 * def midi_driver_enable_monitoring(long driver, bint enabled):             # <<<<<<<<<<<<<<
 *     """Enable or disable MIDI monitoring for a driver.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_729midi_driver_enable_monitoring, 0, __pyx_mstate_global->__pyx_n_u_midi_driver_enable_monitoring, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[389])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_driver_enable_monitoring, __pyx_t_10) < (0)) __PYX_ERR(0, 6498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6527
 * # MIDI Thru Connection Functions
 * 
 * def midi_thru_connection_params_initialize():             # <<<<<<<<<<<<<<
 *     """Initialize a MIDIThruConnectionParams structure with default values.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_731midi_thru_connection_params_initialize, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_params_init, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[390])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_params_init, __pyx_t_10) < (0)) __PYX_ERR(0, 6527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6567
 *     return result
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):             # <<<<<<<<<<<<<<
 *     """Create a MIDI thru connection.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_733midi_thru_connection_create, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_create, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[391])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_mstate_global->__pyx_tuple[18]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_create, __pyx_t_10) < (0)) __PYX_ERR(0, 6567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6674
 *             cf.CFRelease(cf_owner_id)
 * 
 * def midi_thru_connection_dispose(long connection):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI thru connection.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_735midi_thru_connection_dispose, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[392])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_dispose, __pyx_t_10) < (0)) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6693
 *     return status
 * 
 * def midi_thru_connection_get_params(long connection):             # <<<<<<<<<<<<<<
 *     """Get the parameters of a MIDI thru connection.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_737midi_thru_connection_get_params, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_get_params, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[393])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_get_params, __pyx_t_10) < (0)) __PYX_ERR(0, 6693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6774
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_set_params(long connection, dict connection_params):             # <<<<<<<<<<<<<<
 *     """Set the parameters of a MIDI thru connection.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_739midi_thru_connection_set_params, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_set_params, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[394])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_set_params, __pyx_t_10) < (0)) __PYX_ERR(0, 6774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6838
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_find(str persistent_owner_id):             # <<<<<<<<<<<<<<
 *     """Find all thru connections created by a specific owner.
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_741midi_thru_connection_find, 0, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_find, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[395])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_find, __pyx_t_10) < (0)) __PYX_ERR(0, 6838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6890
 * # MIDI Thru Connection Constants
 * 
 * def get_midi_transform_none():             # <<<<<<<<<<<<<<
 *     """Get the 'None' transform type constant."""
 *     return cm.kMIDITransform_None
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_743get_midi_transform_none, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_none, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[396])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_none, __pyx_t_10) < (0)) __PYX_ERR(0, 6890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6894
 *     return cm.kMIDITransform_None
 * 
 * def get_midi_transform_filter_out():             # <<<<<<<<<<<<<<
 *     """Get the 'FilterOut' transform type constant."""
 *     return cm.kMIDITransform_FilterOut
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_745get_midi_transform_filter_out, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_filter_out, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[397])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_filter_out, __pyx_t_10) < (0)) __PYX_ERR(0, 6894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6898
 *     return cm.kMIDITransform_FilterOut
 * 
 * def get_midi_transform_map_control():             # <<<<<<<<<<<<<<
 *     """Get the 'MapControl' transform type constant."""
 *     return cm.kMIDITransform_MapControl
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_747get_midi_transform_map_control, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_control, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[398])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_control, __pyx_t_10) < (0)) __PYX_ERR(0, 6898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6902
 *     return cm.kMIDITransform_MapControl
 * 
 * def get_midi_transform_add():             # <<<<<<<<<<<<<<
 *     """Get the 'Add' transform type constant."""
 *     return cm.kMIDITransform_Add
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_749get_midi_transform_add, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_add, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[399])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_add, __pyx_t_10) < (0)) __PYX_ERR(0, 6902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6906
 *     return cm.kMIDITransform_Add
 * 
 * def get_midi_transform_scale():             # <<<<<<<<<<<<<<
 *     """Get the 'Scale' transform type constant."""
 *     return cm.kMIDITransform_Scale
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_751get_midi_transform_scale, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_scale, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[400])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_scale, __pyx_t_10) < (0)) __PYX_ERR(0, 6906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6910
 *     return cm.kMIDITransform_Scale
 * 
 * def get_midi_transform_min_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MinValue' transform type constant."""
 *     return cm.kMIDITransform_MinValue
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_753get_midi_transform_min_value, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_min_value, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[401])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_min_value, __pyx_t_10) < (0)) __PYX_ERR(0, 6910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6914
 *     return cm.kMIDITransform_MinValue
 * 
 * def get_midi_transform_max_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MaxValue' transform type constant."""
 *     return cm.kMIDITransform_MaxValue
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_755get_midi_transform_max_value, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_max_value, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[402])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_max_value, __pyx_t_10) < (0)) __PYX_ERR(0, 6914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6918
 *     return cm.kMIDITransform_MaxValue
 * 
 * def get_midi_transform_map_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MapValue' transform type constant."""
 *     return cm.kMIDITransform_MapValue
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_757get_midi_transform_map_value, 0, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_value, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[403])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_value, __pyx_t_10) < (0)) __PYX_ERR(0, 6918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6922
 *     return cm.kMIDITransform_MapValue
 * 
 * def get_midi_control_type_7bit():             # <<<<<<<<<<<<<<
 *     """Get the '7Bit' control type constant."""
 *     return cm.kMIDIControlType_7Bit
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_759get_midi_control_type_7bit, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[404])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit, __pyx_t_10) < (0)) __PYX_ERR(0, 6922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6926
 *     return cm.kMIDIControlType_7Bit
 * 
 * def get_midi_control_type_14bit():             # <<<<<<<<<<<<<<
 *     """Get the '14Bit' control type constant."""
 *     return cm.kMIDIControlType_14Bit
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_761get_midi_control_type_14bit, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[405])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit, __pyx_t_10) < (0)) __PYX_ERR(0, 6926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6930
 *     return cm.kMIDIControlType_14Bit
 * 
 * def get_midi_control_type_7bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitRPN
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_763get_midi_control_type_7bit_rpn, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_rpn, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[406])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_rpn, __pyx_t_10) < (0)) __PYX_ERR(0, 6930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6934
 *     return cm.kMIDIControlType_7BitRPN
 * 
 * def get_midi_control_type_14bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitRPN
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_765get_midi_control_type_14bit_rpn, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_rpn, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[407])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_rpn, __pyx_t_10) < (0)) __PYX_ERR(0, 6934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6938
 *     return cm.kMIDIControlType_14BitRPN
 * 
 * def get_midi_control_type_7bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitNRPN
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_767get_midi_control_type_7bit_nrpn, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_nrpn, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[408])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_nrpn, __pyx_t_10) < (0)) __PYX_ERR(0, 6938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6942
 *     return cm.kMIDIControlType_7BitNRPN
 * 
 * def get_midi_control_type_14bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitNRPN
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_769get_midi_control_type_14bit_nrpn, 0, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_nrpn, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[409])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_nrpn, __pyx_t_10) < (0)) __PYX_ERR(0, 6942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6946
 *     return cm.kMIDIControlType_14BitNRPN
 * 
 * def get_midi_thru_connection_max_endpoints():             # <<<<<<<<<<<<<<
 *     """Get the maximum number of endpoints for a thru connection."""
 *     return 8  # kMIDIThruConnection_MaxEndpoints
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_771get_midi_thru_connection_max_endpoints, 0, __pyx_mstate_global->__pyx_n_u_get_midi_thru_connection_max_end, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[410])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_thru_connection_max_end, __pyx_t_10) < (0)) __PYX_ERR(0, 6946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":6984
 *         return self._is_disposed
 * 
 *     def dispose(self) -> None:             # <<<<<<<<<<<<<<
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 6984, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15CoreAudioObject_5dispose, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoreAudioObject_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[411])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_dispose, __pyx_t_11) < (0)) __PYX_ERR(0, 6984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":6994
 *         self._object_id = 0
 * 
 *     def _ensure_not_disposed(self) -> None:             # <<<<<<<<<<<<<<
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 6994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 6994, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15CoreAudioObject_7_ensure_not_disposed, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoreAudioObject__ensure_not_disp, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[412])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 6994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_ensure_not_disposed, __pyx_t_10) < (0)) __PYX_ERR(0, 6994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7004
 *         return self._object_id
 * 
 *     def _set_object_id(self, object_id: int) -> None:             # <<<<<<<<<<<<<<
 *         """Set object ID (for internal use)"""
 *         self._object_id = object_id
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_object_id, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7004, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 7004, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15CoreAudioObject_9_set_object_id, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoreAudioObject__set_object_id, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[413])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_set_object_id, __pyx_t_11) < (0)) __PYX_ERR(0, 7004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15CoreAudioObject_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoreAudioObject___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[414])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15CoreAudioObject_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoreAudioObject___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[415])); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_11) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7013
 * # ============================================================================
 * 
 * def au_graph_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AUGraph
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7013, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_773au_graph_new, 0, __pyx_mstate_global->__pyx_n_u_au_graph_new, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[416])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_new, __pyx_t_10) < (0)) __PYX_ERR(0, 7013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7032
 * 
 * 
 * def au_graph_dispose(long graph_id):             # <<<<<<<<<<<<<<
 *     """Dispose an AUGraph
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_775au_graph_dispose, 0, __pyx_mstate_global->__pyx_n_u_au_graph_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[417])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_dispose, __pyx_t_10) < (0)) __PYX_ERR(0, 7032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7046
 * 
 * 
 * def au_graph_open(long graph_id):             # <<<<<<<<<<<<<<
 *     """Open an AUGraph (opens AudioUnits but doesn't initialize)
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_777au_graph_open, 0, __pyx_mstate_global->__pyx_n_u_au_graph_open, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[418])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_open, __pyx_t_10) < (0)) __PYX_ERR(0, 7046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7060
 * 
 * 
 * def au_graph_close(long graph_id):             # <<<<<<<<<<<<<<
 *     """Close an AUGraph
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_779au_graph_close, 0, __pyx_mstate_global->__pyx_n_u_au_graph_close, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[419])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_close, __pyx_t_10) < (0)) __PYX_ERR(0, 7060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7074
 * 
 * 
 * def au_graph_initialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Initialize an AUGraph (prepares for rendering)
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_781au_graph_initialize, 0, __pyx_mstate_global->__pyx_n_u_au_graph_initialize, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[420])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_initialize, __pyx_t_10) < (0)) __PYX_ERR(0, 7074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7088
 * 
 * 
 * def au_graph_uninitialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an AUGraph
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_783au_graph_uninitialize, 0, __pyx_mstate_global->__pyx_n_u_au_graph_uninitialize, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[421])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_uninitialize, __pyx_t_10) < (0)) __PYX_ERR(0, 7088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7102
 * 
 * 
 * def au_graph_start(long graph_id):             # <<<<<<<<<<<<<<
 *     """Start an AUGraph (begins rendering)
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_785au_graph_start, 0, __pyx_mstate_global->__pyx_n_u_au_graph_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[422])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_start, __pyx_t_10) < (0)) __PYX_ERR(0, 7102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7116
 * 
 * 
 * def au_graph_stop(long graph_id):             # <<<<<<<<<<<<<<
 *     """Stop an AUGraph (stops rendering)
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_787au_graph_stop, 0, __pyx_mstate_global->__pyx_n_u_au_graph_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[423])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_stop, __pyx_t_10) < (0)) __PYX_ERR(0, 7116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7130
 * 
 * 
 * def au_graph_is_open(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is open
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_789au_graph_is_open, 0, __pyx_mstate_global->__pyx_n_u_au_graph_is_open, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[424])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_open, __pyx_t_11) < (0)) __PYX_ERR(0, 7130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7149
 * 
 * 
 * def au_graph_is_initialized(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is initialized
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 7149, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_791au_graph_is_initialized, 0, __pyx_mstate_global->__pyx_n_u_au_graph_is_initialized, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[425])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_initialized, __pyx_t_10) < (0)) __PYX_ERR(0, 7149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7168
 * 
 * 
 * def au_graph_is_running(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is running
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 7168, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_793au_graph_is_running, 0, __pyx_mstate_global->__pyx_n_u_au_graph_is_running, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[426])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_running, __pyx_t_11) < (0)) __PYX_ERR(0, 7168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7187
 * 
 * 
 * def au_graph_add_node(long graph_id, dict description) -> int:             # <<<<<<<<<<<<<<
 *     """Add a node to an AUGraph
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7187, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_795au_graph_add_node, 0, __pyx_mstate_global->__pyx_n_u_au_graph_add_node, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[427])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_add_node, __pyx_t_10) < (0)) __PYX_ERR(0, 7187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7219
 * 
 * 
 * def au_graph_remove_node(long graph_id, int node_id):             # <<<<<<<<<<<<<<
 *     """Remove a node from an AUGraph
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_797au_graph_remove_node, 0, __pyx_mstate_global->__pyx_n_u_au_graph_remove_node, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[428])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_remove_node, __pyx_t_10) < (0)) __PYX_ERR(0, 7219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7234
 * 
 * 
 * def au_graph_get_node_count(long graph_id) -> int:             # <<<<<<<<<<<<<<
 *     """Get the number of nodes in an AUGraph
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_799au_graph_get_node_count, 0, __pyx_mstate_global->__pyx_n_u_au_graph_get_node_count, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[429])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_node_count, __pyx_t_11) < (0)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7253
 * 
 * 
 * def au_graph_get_ind_node(long graph_id, int index) -> int:             # <<<<<<<<<<<<<<
 *     """Get node at index
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7253, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_801au_graph_get_ind_node, 0, __pyx_mstate_global->__pyx_n_u_au_graph_get_ind_node, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[430])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_ind_node, __pyx_t_10) < (0)) __PYX_ERR(0, 7253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7273
 * 
 * 
 * def au_graph_node_info(long graph_id, int node_id) -> tuple:             # <<<<<<<<<<<<<<
 *     """Get information about a node
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 7273, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_803au_graph_node_info, 0, __pyx_mstate_global->__pyx_n_u_au_graph_node_info, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[431])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_node_info, __pyx_t_11) < (0)) __PYX_ERR(0, 7273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7305
 * 
 * 
 * def au_graph_connect_node_input(long graph_id, int source_node, int source_output,             # <<<<<<<<<<<<<<
 *                                   int dest_node, int dest_input):
 *     """Connect two nodes
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_805au_graph_connect_node_input, 0, __pyx_mstate_global->__pyx_n_u_au_graph_connect_node_input, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[432])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_connect_node_input, __pyx_t_11) < (0)) __PYX_ERR(0, 7305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7332
 * 
 * 
 * def au_graph_disconnect_node_input(long graph_id, int dest_node, int dest_input):             # <<<<<<<<<<<<<<
 *     """Disconnect a node's input
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_807au_graph_disconnect_node_input, 0, __pyx_mstate_global->__pyx_n_u_au_graph_disconnect_node_input, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[433])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_disconnect_node_input, __pyx_t_11) < (0)) __PYX_ERR(0, 7332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7354
 * 
 * 
 * def au_graph_clear_connections(long graph_id):             # <<<<<<<<<<<<<<
 *     """Clear all connections in a graph
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_809au_graph_clear_connections, 0, __pyx_mstate_global->__pyx_n_u_au_graph_clear_connections, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[434])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_clear_connections, __pyx_t_11) < (0)) __PYX_ERR(0, 7354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7368
 * 
 * 
 * def au_graph_update(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Update the graph after making changes
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 7368, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_811au_graph_update, 0, __pyx_mstate_global->__pyx_n_u_au_graph_update, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[435])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_update, __pyx_t_10) < (0)) __PYX_ERR(0, 7368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7387
 * 
 * 
 * def au_graph_get_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current CPU load of the graph
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_813au_graph_get_cpu_load, 0, __pyx_mstate_global->__pyx_n_u_au_graph_get_cpu_load, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[436])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_cpu_load, __pyx_t_11) < (0)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7406
 * 
 * 
 * def au_graph_get_max_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get maximum CPU load of the graph since last query
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 7406, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_815au_graph_get_max_cpu_load, 0, __pyx_mstate_global->__pyx_n_u_au_graph_get_max_cpu_load, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[437])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_max_cpu_load, __pyx_t_10) < (0)) __PYX_ERR(0, 7406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7426
 * 
 * # AUGraph error code getters
 * def get_au_graph_err_node_not_found() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for node not found"""
 *     return -10860
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7426, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_817get_au_graph_err_node_not_found, 0, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_node_not_found, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[438])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_node_not_found, __pyx_t_11) < (0)) __PYX_ERR(0, 7426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7430
 *     return -10860
 * 
 * def get_au_graph_err_invalid_connection() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid connection"""
 *     return -10861
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_819get_au_graph_err_invalid_connection, 0, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_connect, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[439])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_connect, __pyx_t_10) < (0)) __PYX_ERR(0, 7430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7434
 *     return -10861
 * 
 * def get_au_graph_err_output_node_err() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for output node error"""
 *     return -10862
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7434, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_821get_au_graph_err_output_node_err, 0, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_output_node_err, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[440])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_output_node_err, __pyx_t_11) < (0)) __PYX_ERR(0, 7434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7438
 *     return -10862
 * 
 * def get_au_graph_err_cannot_do_in_current_context() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for cannot do in current context"""
 *     return -10863
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7438, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_823get_au_graph_err_cannot_do_in_current_context, 0, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_cannot_do_in_cu, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[441])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_cannot_do_in_cu, __pyx_t_10) < (0)) __PYX_ERR(0, 7438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7442
 *     return -10863
 * 
 * def get_au_graph_err_invalid_audio_unit() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid audio unit"""
 *     return -10864
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7442, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_825get_au_graph_err_invalid_audio_unit, 0, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_audio_u, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[442])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_audio_u, __pyx_t_11) < (0)) __PYX_ERR(0, 7442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7451
 * # ============================================================================
 * 
 * def ca_clock_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new CoreAudio clock
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7451, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_827ca_clock_new, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_new, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[443])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_new, __pyx_t_10) < (0)) __PYX_ERR(0, 7451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7467
 * 
 * 
 * def ca_clock_dispose(long clock_id):             # <<<<<<<<<<<<<<
 *     """Dispose a CoreAudio clock
 * 
*/
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_829ca_clock_dispose, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_dispose, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[444])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_dispose, __pyx_t_10) < (0)) __PYX_ERR(0, 7467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7481
 * 
 * 
 * def ca_clock_get_current_time(long clock_id, int time_format) -> dict:             # <<<<<<<<<<<<<<
 *     """Get current time from clock
 * 
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_dict_2) < (0)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_831ca_clock_get_current_time, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_get_current_time, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[445])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_get_current_time, __pyx_t_11) < (0)) __PYX_ERR(0, 7481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7531
 * 
 * 
 * def ca_clock_start(long clock_id):             # <<<<<<<<<<<<<<
 *     """Start the clock
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_833ca_clock_start, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_start, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[446])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_start, __pyx_t_11) < (0)) __PYX_ERR(0, 7531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7545
 * 
 * 
 * def ca_clock_stop(long clock_id):             # <<<<<<<<<<<<<<
 *     """Stop the clock
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_835ca_clock_stop, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_stop, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[447])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_stop, __pyx_t_11) < (0)) __PYX_ERR(0, 7545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7559
 * 
 * 
 * def ca_clock_set_play_rate(long clock_id, double rate):             # <<<<<<<<<<<<<<
 *     """Set playback rate
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_837ca_clock_set_play_rate, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_set_play_rate, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[448])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_set_play_rate, __pyx_t_11) < (0)) __PYX_ERR(0, 7559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7574
 * 
 * 
 * def ca_clock_get_play_rate(long clock_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current playback rate
 * 
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 7574, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_839ca_clock_get_play_rate, 0, __pyx_mstate_global->__pyx_n_u_ca_clock_get_play_rate, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[449])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ca_clock_get_play_rate, __pyx_t_10) < (0)) __PYX_ERR(0, 7574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7593
 * 
 * 
 * def get_ca_clock_time_format_host_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for host time"""
 *     return at.kCAClockTimeFormat_HostTime
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_841get_ca_clock_time_format_host_time, 0, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_host_ti, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[450])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_host_ti, __pyx_t_11) < (0)) __PYX_ERR(0, 7593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7597
 *     return at.kCAClockTimeFormat_HostTime
 * 
 * def get_ca_clock_time_format_samples() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for audio samples"""
 *     return at.kCAClockTimeFormat_Samples
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7597, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_843get_ca_clock_time_format_samples, 0, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_samples, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[451])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_samples, __pyx_t_10) < (0)) __PYX_ERR(0, 7597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7601
 *     return at.kCAClockTimeFormat_Samples
 * 
 * def get_ca_clock_time_format_beats() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for musical beats"""
 *     return at.kCAClockTimeFormat_Beats
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7601, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_845get_ca_clock_time_format_beats, 0, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_beats, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[452])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_beats, __pyx_t_11) < (0)) __PYX_ERR(0, 7601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7605
 *     return at.kCAClockTimeFormat_Beats
 * 
 * def get_ca_clock_time_format_seconds() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for seconds"""
 *     return at.kCAClockTimeFormat_Seconds
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7605, __pyx_L1_error)
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_847get_ca_clock_time_format_seconds, 0, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_seconds, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[453])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_10, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_seconds, __pyx_t_10) < (0)) __PYX_ERR(0, 7605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "coremusic/capi.pyx":7609
 *     return at.kCAClockTimeFormat_Seconds
 * 
 * def get_ca_clock_time_format_smpte_time() -> int:             # <<<<<<<<<<<<<<
 *     """Get time format for SMPTE time structure"""
 *     return at.kCAClockTimeFormat_SMPTETime
*/
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 7609, __pyx_L1_error)
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_849get_ca_clock_time_format_smpte_time, 0, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_smpte_t, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[454])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_ca_clock_time_format_smpte_t, __pyx_t_11) < (0)) __PYX_ERR(0, 7609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7668
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def normalize_audio_float32(float32_t[:, ::1] audio_data, float32_t target_peak=0.9):             # <<<<<<<<<<<<<<
 *     """Normalize audio to target peak level.
 * 
*/
  __pyx_t_11 = PyFloat_FromDouble(((double)0.9)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "coremusic/capi.pyx":7666
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def normalize_audio_float32(float32_t[:, ::1] audio_data, float32_t target_peak=0.9):
*/
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_851normalize_audio_float32, 0, __pyx_mstate_global->__pyx_n_u_normalize_audio_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[455])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_normalize_audio_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7702
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_gain_float32(float32_t[:, ::1] audio_data, float32_t gain_db):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_853apply_gain_float32, 0, __pyx_mstate_global->__pyx_n_u_apply_gain_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[456])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_apply_gain_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7728
 * @cython.wraparound(False)
 * def mix_audio_float32(float32_t[:, ::1] output, float32_t[:, ::1] input1,
 *                       float32_t[:, ::1] input2, float32_t mix_ratio=0.5):             # <<<<<<<<<<<<<<
 *     """Mix two audio buffers.
 * 
*/
  __pyx_t_11 = PyFloat_FromDouble(((double)0.5)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "coremusic/capi.pyx":7725
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mix_audio_float32(float32_t[:, ::1] output, float32_t[:, ::1] input1,
*/
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_855mix_audio_float32, 0, __pyx_mstate_global->__pyx_n_u_mix_audio_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[457])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mix_audio_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7752
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_float32_to_int16(float32_t[:, ::1] float_data, int16_t[:, ::1] int_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_857convert_float32_to_int16, 0, __pyx_mstate_global->__pyx_n_u_convert_float32_to_int16, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[458])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_convert_float32_to_int16, __pyx_t_11) < (0)) __PYX_ERR(0, 7752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7776
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def convert_int16_to_float32(int16_t[:, ::1] int_data, float32_t[:, ::1] float_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_859convert_int16_to_float32, 0, __pyx_mstate_global->__pyx_n_u_convert_int16_to_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[459])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_convert_int16_to_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7802
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def stereo_to_mono_float32(float32_t[:, ::1] stereo_data, float32_t[::1] mono_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_861stereo_to_mono_float32, 0, __pyx_mstate_global->__pyx_n_u_stereo_to_mono_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[460])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_stereo_to_mono_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7822
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def mono_to_stereo_float32(float32_t[::1] mono_data, float32_t[:, ::1] stereo_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_863mono_to_stereo_float32, 0, __pyx_mstate_global->__pyx_n_u_mono_to_stereo_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[461])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mono_to_stereo_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7822, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7847
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_in_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_865apply_fade_in_float32, 0, __pyx_mstate_global->__pyx_n_u_apply_fade_in_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[462])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_apply_fade_in_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7872
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def apply_fade_out_float32(float32_t[:, ::1] audio_data, int fade_frames):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_867apply_fade_out_float32, 0, __pyx_mstate_global->__pyx_n_u_apply_fade_out_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[463])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_apply_fade_out_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7902
 * # =============================================================================
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_rms_float32(float32_t[:, ::1] audio_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_869calculate_rms_float32, 0, __pyx_mstate_global->__pyx_n_u_calculate_rms_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[464])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_calculate_rms_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7928
 * 
 * 
 * @cython.boundscheck(False)             # <<<<<<<<<<<<<<
 * @cython.wraparound(False)
 * def calculate_peak_float32(float32_t[:, ::1] audio_data):
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_871calculate_peak_float32, 0, __pyx_mstate_global->__pyx_n_u_calculate_peak_float32, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[465])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_calculate_peak_float32, __pyx_t_11) < (0)) __PYX_ERR(0, 7928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7959
 * # =============================================================================
 * 
 * def normalize_audio(audio_data, float target_peak=0.9):             # <<<<<<<<<<<<<<
 *     """Normalize audio to target peak level (NumPy wrapper).
 * 
*/
  __pyx_t_11 = PyFloat_FromDouble(((double)0.9)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_Pack(1, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_873normalize_audio, 0, __pyx_mstate_global->__pyx_n_u_normalize_audio, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[466])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_normalize_audio, __pyx_t_11) < (0)) __PYX_ERR(0, 7959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":7988
 * 
 * 
 * def apply_gain(audio_data, float gain_db):             # <<<<<<<<<<<<<<
 *     """Apply gain in decibels (NumPy wrapper).
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_875apply_gain, 0, __pyx_mstate_global->__pyx_n_u_apply_gain, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[467])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 7988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_apply_gain, __pyx_t_11) < (0)) __PYX_ERR(0, 7988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":8017
 * 
 * 
 * def calculate_rms(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate RMS level (NumPy wrapper).
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_877calculate_rms, 0, __pyx_mstate_global->__pyx_n_u_calculate_rms, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[468])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 8017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_calculate_rms, __pyx_t_11) < (0)) __PYX_ERR(0, 8017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":8044
 * 
 * 
 * def calculate_peak(audio_data):             # <<<<<<<<<<<<<<
 *     """Calculate peak level (NumPy wrapper).
 * 
*/
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_879calculate_peak, 0, __pyx_mstate_global->__pyx_n_u_calculate_peak, NULL, __pyx_mstate_global->__pyx_n_u_coremusic_capi, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[469])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 8044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_calculate_peak, __pyx_t_11) < (0)) __PYX_ERR(0, 8044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "coremusic/capi.pyx":1
 * cimport cython             # <<<<<<<<<<<<<<
 * from libc.math cimport fabs, log10, sqrt
 * from libc.stdint cimport uintptr_t
*/
  __pyx_t_11 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_fourchar_to_int_line_197, __pyx_mstate_global->__pyx_kp_u_Convert_fourcc_chars_to_an_int_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_int_to_fourchar_line_207, __pyx_mstate_global->__pyx_kp_u_convert_int_to_fourcc_4_chars_in) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_audio_file_read_packets_into_lin, __pyx_mstate_global->__pyx_kp_u_Read_packets_from_an_audio_file) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_audio_file_stream_parse_buffer_l, __pyx_mstate_global->__pyx_kp_u_Parse_buffer_data_through_the_Au) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_audio_converter_convert_buffer_i_2, __pyx_mstate_global->__pyx_kp_u_Convert_audio_data_directly_into) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_audio_converter_fill_complex_buf_3, __pyx_mstate_global->__pyx_kp_u_Convert_audio_using_callback_bas) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_extended_audio_file_read_into_li, __pyx_mstate_global->__pyx_kp_u_Read_audio_frames_from_ExtendedA) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_audio_unit_render_into_line_2522, __pyx_mstate_global->__pyx_kp_u_Process_audio_through_an_AudioUn) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_normalize_audio_line_7959, __pyx_mstate_global->__pyx_kp_u_Normalize_audio_to_target_peak_l) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_apply_gain_line_7988, __pyx_mstate_global->__pyx_kp_u_Apply_gain_in_decibels_NumPy_wra) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_calculate_rms_line_8017, __pyx_mstate_global->__pyx_kp_u_Calculate_RMS_level_NumPy_wrappe) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_calculate_peak_line_8044, __pyx_mstate_global->__pyx_kp_u_Calculate_peak_level_NumPy_wrapp) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_11) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init coremusic.capi", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init coremusic.capi");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3875, __pyx_L1_error)
  __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 101, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 409, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 619, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = ('self.name is not None',)             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u_self_name_is_not_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(1, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "View.MemoryView":583
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(1, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_neg_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[1], 0, __pyx_mstate_global->__pyx_int_neg_1) != (0)) __PYX_ERR(1, 583, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "View.MemoryView":680
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
*/
  __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(1, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);

  /* "coremusic/capi.pyx":1876
 *         previous = <at.AudioComponent>previous_component_id
 * 
 *     desc.componentType = description_dict.get('type', 0)             # <<<<<<<<<<<<<<
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "coremusic/capi.pyx":1877
 * 
 *     desc.componentType = description_dict.get('type', 0)
 *     desc.componentSubType = description_dict.get('subtype', 0)             # <<<<<<<<<<<<<<
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_subtype, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "coremusic/capi.pyx":1878
 *     desc.componentType = description_dict.get('type', 0)
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)             # <<<<<<<<<<<<<<
 *     desc.componentFlags = description_dict.get('flags', 0)
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_manufacturer, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "coremusic/capi.pyx":1879
 *     desc.componentSubType = description_dict.get('subtype', 0)
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)             # <<<<<<<<<<<<<<
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)
 * 
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "coremusic/capi.pyx":1880
 *     desc.componentManufacturer = description_dict.get('manufacturer', 0)
 *     desc.componentFlags = description_dict.get('flags', 0)
 *     desc.componentFlagsMask = description_dict.get('flags_mask', 0)             # <<<<<<<<<<<<<<
 * 
 *     component = at.AudioComponentFindNext(previous, &desc)
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_flags_mask, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "coremusic/capi.pyx":6597
 *     for i in range(params.numSources):
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)             # <<<<<<<<<<<<<<
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)
 * 
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 6597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "coremusic/capi.pyx":6598
 *         if isinstance(sources[i], dict):
 *             params.sources[i].endpointRef = <cm.MIDIEndpointRef>sources[i].get('endpointRef', 0)
 *             params.sources[i].uniqueID = <cm.MIDIUniqueID>sources[i].get('uniqueID', 0)             # <<<<<<<<<<<<<<
 * 
 *     # Destinations
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 6598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "coremusic/capi.pyx":6621
 *     # Transform settings
 *     note_number = connection_params.get('noteNumber', {'transform': 0, 'param': 0})
 *     note_transform = note_number.get('transform', 0)             # <<<<<<<<<<<<<<
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)
*/
  __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 6621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);

  /* "coremusic/capi.pyx":6623
 *     note_transform = note_number.get('transform', 0)
 *     params.noteNumber.transform = <cm.MIDITransformType>note_transform
 *     params.noteNumber.param = <ca.SInt16>note_number.get('param', 0)             # <<<<<<<<<<<<<<
 * 
 *     velocity = connection_params.get('velocity', {'transform': 0, 'param': 0})
*/
  __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_param, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 6623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "coremusic/capi.pyx":7981
 * 
 *     if audio_data.ndim == 1:
 *         audio_data = audio_data.reshape(-1, 1)             # <<<<<<<<<<<<<<
 * 
 *     result = audio_data.copy()
*/
  __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 7981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "coremusic/capi.pyx":648
 *     pass
 * 
 * def audio_file_stream_open(file_type_hint=0):             # <<<<<<<<<<<<<<
 *     """Open an AudioFileStream parser for streaming audio data"""
 *     cdef at.AudioFileStreamID stream_id
*/
  __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);

  /* "coremusic/capi.pyx":2068
 * # AudioUnit Plugin Discovery and Management Functions
 * 
 * def audio_unit_find_all_components(component_type=None, component_subtype=None, manufacturer=None):             # <<<<<<<<<<<<<<
 *     """Find all AudioUnit components matching the criteria
 * 
*/
  __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "coremusic/capi.pyx":2148
 * 
 * 
 * def audio_unit_get_parameter_list(long audio_unit_id, scope=0, element=0):             # <<<<<<<<<<<<<<
 *     """Get list of parameter IDs for an AudioUnit
 * 
*/
  __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "coremusic/capi.pyx":2451
 * 
 * 
 * def audio_unit_render(long audio_unit_id, input_data, num_frames, sample_rate=44100.0, num_channels=2):             # <<<<<<<<<<<<<<
 *     """Process audio through an AudioUnit
 * 
*/
  __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_float_44100_0), ((PyObject*)__pyx_mstate_global->__pyx_int_2)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "coremusic/capi.pyx":3038
 *         return self._link_session_ref
 * 
 *     def get_link_timing(self, quantum=4.0):             # <<<<<<<<<<<<<<
 *         """Get current Link timing information (if Link session is attached)
 * 
*/
  __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_float_4_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 3038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);

  /* "coremusic/capi.pyx":3296
 *         return <float>self.recorder_data.current_frame / <float>self.recorder_data.sample_rate
 * 
 *     def run_loop(self, double seconds=0.1):             # <<<<<<<<<<<<<<
 *         """Run the CFRunLoop to process audio queue callbacks.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_float_0_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]);

  /* "coremusic/capi.pyx":6567
 *     return result
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):             # <<<<<<<<<<<<<<
 *     """Create a MIDI thru connection.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(0, 6567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<19; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_slice;
    for (Py_ssize_t i=0; i<1; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 11; } index[] = {{2},{68},{397},{40},{55},{56},{57},{57},{29},{18},{35},{383},{389},{54},{37},{60},{41},{24},{52},{1333},{1683},{80},{35},{34},{31},{32},{41},{43},{47},{45},{43},{30},{40},{35},{38},{37},{35},{40},{44},{36},{31},{35},{37},{29},{36},{31},{27},{27},{35},{32},{27},{29},{31},{29},{27},{29},{26},{28},{28},{25},{18},{13},{26},{34},{13},{34},{25},{32},{30},{32},{30},{29},{33},{24},{34},{45},{22},{35},{15},{41},{50},{21},{4},{433},{179},{18},{18},{37},{25},{1086},{1335},{1328},{1204},{36},{13},{30},{32},{1},{1},{1},{1},{2},{0},{1},{1},{8},{5},{22},{6},{46},{52},{39},{41},{34},{21},{20},{26},{25},{26},{15},{23},{25},{82},{10},{18},{7},{6},{41},{9},{26},{9},{7},{2},{6},{35},{18},{26},{9},{30},{50},{27},{8},{18},{17},{27},{100},{21},{85},{30},{22},{20},{32},{22},{14},{30},{37},{5},{5},{14},{23},{12},{23},{26},{17},{17},{20},{19},{17},{20},{13},{16},{15},{11},{17},{12},{11},{19},{13},{22},{28},{29},{25},{27},{21},{31},{25},{29},{17},{19},{25},{14},{20},{24},{16},{20},{20},{26},{30},{19},{25},{19},{26},{30},{26},{20},{19},{11},{29},{31},{27},{24},{22},{21},{16},{26},{23},{24},{17},{16},{24},{17},{23},{19},{15},{14},{13},{31},{33},{28},{26},{35},{33},{31},{26},{22},{26},{25},{19},{18},{32},{33},{24},{28},{24},{21},{20},{24},{19},{15},{21},{20},{21},{14},{21},{18},{10},{18},{12},{11},{15},{33},{35},{36},{30},{23},{14},{18},{20},{8},{25},{19},{23},{19},{16},{23},{17},{16},{17},{21},{19},{16},{17},{23},{21},{19},{22},{26},{19},{22},{22},{30},{24},{19},{28},{27},{28},{27},{20},{21},{24},{15},{8},{18},{26},{21},{29},{16},{24},{25},{22},{27},{27},{20},{19},{16},{28},{22},{18},{20},{18},{28},{22},{18},{16},{15},{25},{21},{24},{28},{26},{26},{21},{28},{31},{26},{10},{14},{16},{4},{20},{8},{15},{0},{3},{7},{12},{11},{11},{7},{15},{6},{21},{22},{10},{18},{8},{9},{4},{6},{18},{14},{14},{17},{26},{14},{27},{30},{16},{21},{21},{25},{23},{19},{23},{16},{19},{12},{18},{13},{20},{14},{13},{21},{15},{25},{25},{31},{32},{28},{30},{35},{23},{35},{40},{28},{19},{21},{28},{10},{10},{16},{23},{13},{19},{23},{28},{23},{30},{22},{30},{29},{22},{12},{39},{39},{40},{26},{21},{30},{32},{33},{30},{17},{23},{22},{27},{19},{26},{22},{17},{16},{37},{38},{27},{31},{32},{27},{10},{30},{29},{30},{24},{29},{29},{23},{13},{21},{17},{22},{29},{24},{23},{23},{13},{8},{8},{4},{4},{12},{16},{4},{3},{6},{9},{11},{11},{5},{5},{5},{5},{5},{5},{9},{11},{5},{16},{15},{16},{10},{1},{5},{16},{25},{22},{12},{22},{14},{13},{14},{22},{13},{21},{13},{15},{25},{18},{15},{8},{7},{11},{9},{7},{12},{8},{7},{10},{15},{11},{8},{18},{9},{17},{6},{13},{18},{5},{8},{9},{10},{8},{4},{18},{4},{9},{12},{17},{14},{10},{6},{10},{17},{11},{17},{10},{8},{24},{24},{9},{12},{4},{14},{5},{8},{27},{24},{31},{35},{12},{4},{5},{5},{11},{8},{9},{6},{13},{4},{9},{11},{16},{4},{11},{10},{10},{9},{11},{12},{8},{6},{8},{12},{9},{10},{12},{7},{8},{4},{11},{7},{20},{22},{6},{11},{10},{5},{15},{8},{7},{8},{7},{6},{8},{11},{20},{6},{12},{9},{5},{6},{14},{8},{11},{35},{27},{32},{28},{24},{29},{32},{25},{5},{11},{11},{18},{9},{9},{14},{20},{18},{12},{14},{20},{5},{10},{5},{7},{10},{6},{12},{9},{7},{15},{6},{17},{14},{8},{4},{7},{3},{45},{35},{35},{31},{32},{37},{42},{50},{51},{50},{51},{58},{32},{31},{31},{34},{31},{14},{56},{36},{41},{35},{35},{30},{45},{55},{46},{40},{39},{47},{35},{42},{43},{30},{45},{44},{54},{45},{49},{40},{41},{45},{49},{51},{48},{41},{46},{52},{54},{55},{45},{39},{45},{42},{42},{42},{42},{46},{54},{50},{46},{48},{50},{46},{45},{48},{54},{55},{51},{24},{27},{49},{48},{38},{38},{30},{38},{37},{38},{42},{43},{27},{57},{39},{49},{54},{63},{45},{33},{43},{37},{27},{26},{27},{37},{26},{30},{34},{32},{32},{35},{20},{49},{51},{52},{54},{51},{43},{51},{45},{36},{44},{15},{27},{32},{31},{26},{31},{30},{35},{33},{27},{26},{29},{32},{33},{28},{29},{27},{31},{28},{31},{28},{31},{31},{31},{31},{28},{31},{34},{34},{27},{36},{36},{29},{27},{28},{29},{32},{27},{27},{36},{41},{36},{36},{26},{27},{27},{30},{30},{30},{23},{22},{25},{25},{34},{35},{27},{21},{21},{38},{22},{29},{30},{28},{28},{28},{23},{24},{39},{34},{22},{34},{33},{29},{30},{34},{35},{25},{41},{38},{34},{25},{30},{25},{27},{41},{32},{36},{33},{29},{31},{31},{12},{21},{19},{48},{37},{39},{39},{39},{43},{40},{32},{40},{27},{24},{12},{5},{8},{5},{8},{17},{8},{12},{5},{1},{2},{6},{9},{10},{12},{5},{6},{6},{12},{10},{15},{18},{9},{8},{11},{13},{3},{8},{15},{13},{12},{14},{7},{10},{12},{10},{11},{10},{5},{8},{1},{11},{6},{11},{12},{4},{9},{3},{6},{4},{7},{11},{3},{8},{12},{18},{8},{15},{8},{7},{9},{7},{7},{6},{30},{23},{17},{16},{19},{14},{22},{27},{20},{14},{13},{16},{20},{18},{19},{19},{23},{22},{18},{19},{22},{20},{34},{27},{24},{27},{38},{22},{25},{29},{21},{22},{26},{26},{35},{27},{20},{38},{33},{22},{27},{20},{15},{27},{26},{31},{26},{26},{15},{22},{29},{13},{12},{32},{28},{21},{20},{31},{32},{31},{23},{15},{24},{27},{17},{19},{14},{21},{30},{24},{33},{18},{27},{28},{25},{31},{38},{31},{9},{7},{17},{9},{4},{5},{11},{10},{9},{22},{3},{3},{23},{23},{22},{18},{33},{25},{21},{23},{20},{33},{25},{21},{18},{17},{28},{24},{28},{32},{30},{30},{24},{32},{36},{34},{31},{1},{4},{8},{10},{8},{4},{7},{16},{18},{4},{7},{15},{23},{4},{10},{16},{11},{14},{2},{20},{7},{9},{12},{15},{12},{25},{9},{11},{12},{10},{11},{10},{11},{20},{11},{6},{5},{3},{9},{7},{19},{9},{9},{19},{6},{13},{18},{18},{11},{23},{16},{11},{19},{14},{4},{6},{12},{13},{5},{8},{10},{10},{6},{11},{10},{4},{11},{19},{5},{13},{5},{9},{7},{12},{4},{6},{3},{4},{9},{15},{6},{11},{13},{13},{8},{21},{7},{7},{13},{10},{7},{9},{11},{13},{17},{8},{14},{11},{10},{19},{14},{12},{7},{5},{8},{4},{6},{6},{11},{15},{10},{17},{13},{4},{4},{8},{16},{13},{8},{14},{7},{6},{10},{6},{6},{8},{7},{6},{11},{12},{10},{5},{7},{4},{3},{8},{13},{11},{12},{14},{10},{12},{19},{11},{12},{5},{4},{8},{6},{13},{18},{12},{11},{13},{7},{9},{15},{10},{5},{11},{12},{5},{6},{11},{13},{4},{11},{22},{4},{3},{6},{13},{9},{10},{6},{16},{9},{7},{10},{11},{15},{11},{16},{5},{8},{10},{4},{11},{9},{11},{13},{5},{11},{11},{9},{16},{5},{4},{9},{8},{4},{9},{6},{6},{3},{7},{5},{9},{11},{6},{8},{18},{7},{4},{8},{1},{0},{47},{47},{53},{151},{7},{107},{28},{48},{47},{45},{49},{68},{49},{198},{265},{49},{198},{80},{215},{127},{88},{255},{47},{53},{55},{10},{237},{198},{17},{53},{86},{447},{57},{320},{315},{92},{189},{332},{73},{100},{47},{47},{67},{92},{41},{46},{47},{53},{53},{47},{43},{140},{179},{47},{45},{52},{67},{64},{74},{74},{10},{41},{22},{55},{47},{10},{212},{178},{49},{72},{55},{47},{47},{54},{107},{45},{42},{51},{239},{34},{68},{54},{55},{37},{57},{10},{73},{168},{63},{54},{146},{41},{54},{86},{52},{82},{61},{12},{124},{49},{28},{15},{50},{10},{53},{10},{54},{43},{41},{42},{78},{103},{470},{65},{66},{88},{90},{19},{273},{22},{40},{11},{12},{457},{82},{10},{10},{10},{844},{377},{486},{210},{201},{11},{15},{15},{11},{40},{363},{56},{84},{198},{35},{23},{10},{239},{110},{183},{178},{108},{109},{113},{29},{104},{179},{132},{116},{68},{50},{120},{65},{152},{307},{82},{53},{161},{107},{107},{14},{10},{141},{10},{10},{53},{9},{102},{7},{50},{9},{17},{10},{10},{55},{84},{54},{54},{10},{10},{90},{71},{284},{356},{86},{91},{40},{40},{163},{48},{48},{34},{37},{30},{34},{29},{36},{92},{12},{16},{17},{17},{50},{52},{110},{114},{53},{96},{29},{57},{843},{50},{17},{10},{48},{85},{19},{56},{9},{58},{29},{256},{70},{76},{61},{101},{84},{95},{92},{85},{75},{148},{122},{60},{64},{13},{17},{14},{55},{82},{53},{207},{111},{58},{40},{257},{100},{56},{59},{105},{40},{47},{73},{77},{74},{67},{67},{83},{80},{1}};
    #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (16783 bytes) */
const char* const cstring = "BZh91AY&SY\236W\312\366\000\033\202\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`Q\360\352=\343\356\002!r\355\367\275v\r^\035\305\366\321\366\261\355\274(\0324\033\315\357\257\037E{\354\000O\2768:=\031w>\263\212\001\320O\271s\323\353\346\316\364\001_Th\032\003]\237}5\247\271\003w\307\334\355_\034R\350g\315\276\373\332\202\275{\244\020\327\034\315\335\205\327\330\014\037{\336\350\037U\350\372\372\372=\346\031F\312\324\205$\213\321\223#l\350\271\276\030{\225\356\304\276\347\325u\353M\263\335\341!{o*\352.\236\373x\255\260u\356n\371\343\317\241F\332\337sv\300\007\240\000\000\000\033\340\001\230\362\234\025\336\365\205\254\212\245}w\r*\335\204\222\020\232&\001\220\002b\031\002hjyO$\315\t\200\r4\323M\025<\233H\323\322\236hL4!\244\0324\0324\002SB\002\010\002\024\310\322\215\264\214\231F\023\324z\236\246\230\020\320\032\r\0004\000\014 \000\000\r\000\022\231\004H\220\212\2175=5OS\312l\247\224\320\375H\323\324\374\244\362\236\247\246\221\241\345=\031&\236\030`\302\r\025&\233d\323SQ\221\352hxI\345\002M$\204\"bi\244\324\236\312OSdM6\223\023@y\0202i\210\017Q\246\232\003@\003\010mF\200\320\323A\243M\001\022\210D\323\322\036\232\230E\0324\324~\244\317*y\251\240\023\323\324\233OQ\242i\211\241\352\0324\000d\320h4d\321\2406\211\350@\"H\2012\002h\206\246\214\002\2316\206\246&\215=T\366\244\323\365'\251\372\243\322h\323C\324\364\215\000\000\000\001\240d\001\243\377\215\265\360\317\231\036\024\334zL\312\177\212\2412\031z\311\320\000\227T]\002\370\216Jk!\320zg\326\212i\240\224K\023\346\303\270I7|!Q\333\330\207\013&\313o0\253\360\241\217:(\232\211\217wF\333.:lV\241\243\336\007MKPw3A\034xf\252\2772yP\223>\342i)\314(;\225\036\036\037\023$\017h\232\267\253\253&\013\275\211\265\274\212\272\023\275\3068\353\n\\\327\257\302en\357k\n\371\217\010z\321A\257D\227\313\347\316%`\370\370\311\327.\333\363\230\030\347Nx\020\354d;\255\341\220\362e\001TP\3357\336\350F3\216\300\240\037l\234!\262.\230O\301K\"\0036\245\213\020\005\024\363\331\nD\024\203""\006\022/\357\241q\300\371G\265\374\333\307\341\355\374\264i\333\370\352\215\004J\010U\007\344T\003\345\006\344?\340\344\272\335#Ph\n\202oU\377\327\255\274Q!p#4IL\230\235\200\326:\0213O\n\310\222\242le\"\220\214\033\024\"\211\211\255-\352\232\336\311\202\206\310\005\245\225\222\257z*\354\273D\020mA\210@\316) \241\214S\371x\346\\\014\314\\\334\177g\37033S0\3159t\234\377\370 r\001`\260\026\010\212\301PDDX\202\203\"A\212\212\242\"H\3102*\221\021\030)\000\362%\020Q\001\024b1\025EA`\304A\024QQAX\212\253\030\310\240($dR$\004TH \261A\001\024b\213\010\207\222\200X!\005\220dD\024QB\"\221A\"\262\010\rDJC\2672\031\026d\220`\010\352\232\272\272\206\253\251\206\340DO\377%\003\216.>\325\003\345AG#m\241!\252\346\246a\237\013\237\200\0037\212GT\00460\007E\3158\006\206!\3418\000\233\321S\204d\001\200(\251\026\014`\252\202#\006\n*\021PU\030\203\"\301a!\005\0220\214d\022\014A\203\030\n\203\024\210\202\210\300\202\250\261@Q\212\310\000\240E\207\\V\000\253P\225D\203\030@\2504\306\2023z\213\212llp\324\303\004u8\000\273I\021x@\035\3242\272r\233ah\213\270\277\353\211=\336\304\244\367\313!\356\366\373E\237\317\265\265\264R\333l\017x\226\310\266b8\251\0016,\201\030I\017\020\025\211\272\037\247t\nu~%<\266?\326XJ \325P\222\001\261\3676l\372\201\376\225\242T\t\013\362\207\022g\254\310\272\377\324\016\013\257\322\240\367\220\254\244GI\013X;\010Y&\270\355\343q\\a-\262\267W*WG.\240\326\200\301\201f\021\213U\006e\230\316\021\002y\252v\362\024CT\215\223!\"\224HD\203\"\021!\020\001\024\030\"\251\325\324s:z\362\014]^ \207\255\003\212+\274 '\245\201! \214`B\n\252\013$P\202\"\222\001\330\372\3470\356\222D\216cx\010y\221h,\030\222!\202`\340\3409n\264\336\334\002\362;\344dSar\231+\363\202s\201F\362T\337\274;\016\00688\202=\023x\216\304$\331\014P\014b\n\034]u\023S\263%2\320\0161G\211\271\r\341\004H\020H\261\301\n\250\326\272\352\006\257\rLW\360\251\304x\213\324 \262(\310\022\001\301\220\374\334s\341\362\004\335\310\242\022E\"\304\220\227Q\253\007=4\n\203<}\352\275\364\266\370\373\363B\216\226\265(\304F""\345\035~\\\352\223\204\234x\007\324\220\036\006\246\250\006\341w \365Wg\346O\003\226V\227\265\266VTNA\336'F<\265\016'N\234\365\256\213k$\005\016\225\221\030$\026\265\026~\346B\010\265\210\324c,\201\357.\203A\000\n\005\247\270\222fI\242\203T\010\326\342\214F\2627,u\010\240\322\350\204aQ\221\300\346\202BL\2366\034a\270\024\004\tm\356V\245\324\351\026m\356VV\261TN\340\014\322J\t\325C\207+K{TZU\262\335J\033\341\211\010p\2721\320\270\020\220@7\223x\r\327;\300\343\307G\246C\221\275@56\213\263\026/J*\245\021\225`\2442\273Ksx\031\256n\3617\233l\346\000\376G\230\2077\302\3019H\365\355\373\247a\241\357 t\204\t\002R\036(\333\255v\302\244,\035\256\235:CK\252\375$BC\000\017>\273w\204R\020\200g\205%\342\032\266\246m\222\315c`A\341\360x\003xp\016\370<\370\307\024u\021\r\252\031\322Nbs9\275N\247LKpF\312o\334`\2217\033U\244#cjJ\336\005\367\355\201~.&\\\261;\214@N\014\027\014\014\235\001p\325J\346\"N\314,R\264Q\323\247N\235\004W\304\033\031hN\000<\022\305\231\357\342V\327\337!&\243\253\327\253\2668\234\345E\352uQ8\201\340\344<x9L\373\341`\234\271\230^\367\217\202\t\2137\206\025\332\366\275^\253\332\366\366\234\214\334\272\366\010@X\232:\245z\000Vu{\366-A\324\325\200,\005\202\305[QX'\005N\3120g\301\334(a\n\031\2334\022\260\325\201\206\030\032\264\231\035\032\016\004\300M\227)rS+\023\262\260\017r+*\312\265j\301H\242H|3\212\255Ta\254\005\252\327(\327E\253^\353\\//\032s\256\207D\350\364\351\275\317\366\023\227$G_\343\357Bc\274\357\272r\203\357\224\322\362y\001\342\342q.v\241\345\020\364\304\020C\300\212\024\260\005}-\237\247\367\253\355\006\024{\017\214\371~KZO\256\337]\027\224W\357\252\203\220#\353\022\r%\307\345\2341\261*\277\375\317)3\032\022\356\236\030\226~\241\311zc\341_'\355\177c\314;:\251\ntcyRvs4\200@\240<!m\277\3524\221\216\035h:\330\311\356\317%$Y\004\204\030D\221;`<-Ym\277\213C\207\3362k\322\226W\013\215\305\r\036f\371G\232\307H\0076w#\346EZ\343\375A>\226\013T\251_#^\020\302@\321Z9\035\305\363\035\362\263qQC\006j\341\214q\355\353P\242f8\252w\2107d\010\354j\371Rh\2445n\232q%6""\243&\343\327\347\234\255PU\023\t\t\t/\006?\323\254g\230f\350S\313{^\364a|\327\373\020\204\223\257\214 g\310\272o\363fx\003j|>`\3046\232e\323\274\371\370Dr\307\241'\026\211\341\341D\017\324\316l\t3h\263fvu\225DA\t\340\313T\265F\245\215\370\301\234\t\027\216\327y\301W1E\032j\300\343u\345\347\251\373\023\343\353\363cH\340\271\034\205(\362~s\246\r\257\247\215\372c\230s\005\3211M\016\027{m],\334pU\010<P\026\354\355b\031\320\324\013\025)?^m\026s\033\223\210\247t\352\233\276\212\254\277\007'mf\346'H\377\237\307\273Z\333?\023\247\251\321\371w*j\352\020m%\216\260blk\251\240T\347u\343_\243\364\263\341g\031\321\030\237q\244\216&\252\352O\311ZR\266b:\304\307\212\311\345\025\202w\271\305\326\232j\024k'\\\217\264\267\230j\363`\357]\r\274\204\314\243]\035.\206\367\362(\330\205\177N\250\325\270\265\212h\363}X2l5-\273^\216Y\221M(\316\276!\375(IVM\027\247\325n\205\333]\207\340\374\016\031\216\037\311jG\253\265\355\366g\236f\340\325L\303\244\203\210\230*U/\224=g\003_,\247\026RJ\016F\276.G\207\014\200\326\231[\302\314<]>\304\373\020if+\303\313\333\305\223j\203/\353\360.\3326\314\2535\360\353\256u\273\351\252x/\242k\3231\013[\272\325\247j\025u$\367,H\364\264\027\2408\220\205Z\235\252SWr\35391\303\255\233o\022\371\347@\356,3rs\316\037\014\332\033w/\214\307\327\257\022\037M!\274\254\356\3055\345c\263i\230\353\351\256\2257N\231Y\340\207\312\314w\352R\226\r\211\323U7F\355{Nz\343P\233gX\032'<\353\352T\013\264\335 KRP\260\372e\263\246.\327\027W\231\275\341\272\361u\337\327\203\316 hF3 \372$`\306)\010\r\321\353\370\353\317\327=\t\346\324\347\250y\3578\024\005\364\215\3614o\314\370\276\223\210\343`V\264M\372g\020\335\020\335\004\354!\203\350\261N$\362\007\000\003\2131\252\000m\264\332\354k\251\226\327/\032\272\244U\313uR\316\213\23359+\r2\234a#w\"\232\242\0252\223\223z\\4\n%\251D\022\321\311\266k\206\022\244\337XT\312\242qk2QI\031\223Sj\354\246\325\203\247wm\331\376\360\371'\352?\354\266\226#\210\250XS\315\345\360\277\r\301\367Z\354\025\302\355\2652&\234\273VDDq$\255\314\205\204-$\205}W\227""\013)\251X\375n\261\310YU\203\025\253V\212\032q\236\263Ny\301D\302\264XG\226\251\\\276`u2\332-M\r!\211\036\243\"\230\256\023M4\301Ye\343\206\211\277\257T}\340\355s9\034\372\021:v\326\257L\212O\353F\376\004\330L\030\002\231@\301&\225\332\226`\032N\030,\276\276\241X\365\260\370\350\337H\263~\375b9\357\037G\370p\371\035\275\265\201 \304\323\347z\302\030QT\272L\327\3569Ke\257\346\212\036\033\302\274]Z\225\025I)\014\225\334\273\350\263\302t\356\036\372x\363t\336\340R\006\372sP\007\341L\227~HR\305\301\302#\303\nC\361jO\240\265\311\221\005\270p\252\332\227\310\035S\257\304c\306k\354\343\010&\200\262\265\366\212\317\311\247\247\263\222\240\212Rw\260u\366|n\307\211\336w?\n\336<\332\230\327\242\3135!\375\317\321\375(\372\"[k\007\026\334\372x\242\005G\374^X$\372'7\372\331\341\365\262Y\211\355Ts\227q\375\020\324\026!\275xXr\266\307\032\264\216\312Q\201 ^nz\354O1B\307\\\333A\237o\350\016\r\235W\270\3326\335\033\327\323\021\365t\016\206\331\302m\207\006\362\002\372F\362\262/\225io\025\346\361\276n\371<&\031\275\221\215iZ\265h*\253DJ\\\266\255\027\2211AY\263F\255V\\$Wak\353\212\025\205g\206\321j\261\302'\027\364g\335\314\377X\360\330r\352\300\305\236\201\030\2722\274\367\267(\017\350\272\203\205\274\245\245\030\352\031\000(\322\205\214\202B\310+\270\376\2756Zc\276f\212l\255\007\3431\0300\310\242\210\221,\007\351\330\326G\266\330[K{w\035\361`9\305\221\030\360#\002.\370\360\216\234k\356\2359\376\303\025\3348Mn\200|%s3\305\25318\360\320\227\022\366(\211:\252\212#KU-Z\030\261.r\013c0\306\313\221\305\253h\211\206U}Z\205\240\327\036q\333i>P\242\212\"$\221\234\337\325\341\020>\002/iQ::\021\270h\325\367\365S\215}r'\370`}qi\253\305\353\206\345z\325\216\265 \255\326\252\020ZK\207\177\227qn1\270\032\271\367\373\273C\236\347@ \234|\257\333\006n\353\000\335\376\226\351G\t\363\224m6a\t&;\205\263 \342\177\003\324TA\254&\026\210@|\032\222m\303\034k\272\263\243wQyo\233[\036N\236U\356`>\\\003\232\022\003\"wq(=\350\332-\253\305\272\272y\247?4\262m\251\316/\023\365CpGm\264-M\257\213cl\025\361T\343""\212\352\"\307\260\341\033fk3\2024*\204;*\034L\314\215[\2042\341\222\027\270\243-l\226\016\346t\r\262BMT\221\017r3y\014\014f\253&\367\201\250C\240\225-\346Q\031\247\n\036#0\250\233y\032\267\310\371\300\220\276\210\342?\277!U6< 9a\303\207\010\245\014\014\260\263\260\271`\300\351\311\304[-\205D\216\226S\276\237i\237\007^E\340\2757j\202\327, P-\253XU\204\254\001aX\326+\t\2064\274\316\302\252990lgze\34248+\232r(\003\377c\325\220z\263\256B6\264\204ZE\221Y \267\333\002\000e\240\344pM;\303\254\374X\214U+\023OsI\263\336\360\335W(\333\304\213\227)l\2661\203\244\rr\370}\263\327\256\330\266\250YVT,\264\266R\026*b8\230\231\261\234$\036\342\0321\366\244\267\177\251\273\247\205\3321z\216\205SA\240\260\210\327M\2521T\034V\013\256\306\212\353\031.p\323\316R6L\263O\236u\232%:S\213\r\252E\246\324o\030\323\006\035G\36761\330uB\242F%v\261\222\275'\014\025\360\230C\t(dF\247wM|\024\240!\310\027\362\335\357\241\347\243\267\031\343bW9\314\335\226\034\315B\364\3736`\226\276\007\004\027\025\245\350\022b\227\305\213S\352\365\364\261\376\303y\200\363+\345\370\317y\2173&\367\331n[N\326XL%\032\210\246\251\247\224\303O\243\334\340j\343\005uPL\315Z\277\320:\260\336^H\316\022k\"\360|g\316\304\342\235h\266[\376\371\316\226\327e\255\327\371J\352b\\H\266,D\\\364\004+\271s\0337\211\324\350\234\237\257l\245\330c3\023\241\265\352\324\032\263\272O\003\242t\001\362\022 \022t\342\036U\002\212\217\246+\236\003|SR[\323\351g6\033\003f\215\275}\374\220\343\255\216\252\247E\336-\327\253\002\315\301S\214\226\211\232c\334\374\335JK\207o\035\235\006\320\252{\366\0366:gQ?\360\366\245C\265\366\344\331l\314\337M\246\337\273\367\277{\355\315\347\270\371\304\314\257\255\357]\337/P\202\275\224\024p\231\321\365\345q\321\\\252\263G3w\2139\365\325\216\025\255t\232\320o\271\371\316\243\342\357\370\207K\253i\210\271\320\275T\036\313\340\323:\252\343\030\201\317\260k\277\006g\333g\233\305\024\273{\177\027\3438\276A\020\343\005 \0378\266\004\270>\325S\330?{\301\371\267\024\327}O\273\361\037Bk\303d\373\356>\355\273ZnHM!\311\273Q""\331\341P\225g\241\016 \270\244y\021\225X\201B%\032U\254\222bl\311\272V\346\366\245Z\032\0220\261:\033\025\262\2524c\241\316\246\220\225E\312>\010\006\203ph\343\212\204\221\311#\336\347G\004Pt\236\355?\237\267ct\017^\034\360/\263\373x\010&\264\225\213\010\254\026k\233\324\267{\274\177.\002\345\345\244\030\241\272\324k\206\333L\364}\376\207\333\275\261,\203g\242I\332\372qI\273R<o=\311=\360\216?.DE\037\340\215\277\210\222\205\n\365\310\342(\210\224\367\215\007J*\304\375\243\332\344\352\317k=P\365\\\000\375\272\234\342\306'\303\232\375\300=\230=\220\371\313immx7W\027\247exL\200\013Z\250p'\362X\264\370\230\323e\2066|\355\002\n\204w\245\220\276\327\331\354\312\364QiED\272\027@\272]WWO\237+\026\316\216\336\271N\305j\251\344\316\271\263\rVA\013\332\317\236\260\206\274\335XRu'EJ\214#\324\020]E\333\241s\340\273\336\313\320m\323\260\215DW\275y8\270\"\273\t?-\213\001a\"\302Y\025\235s\2717kSc\221\355\252X\317\242gL\347\rf\026\242\203\235\321\315\004\3704!\002\020s9\277\230\221<\304\312b\270w\266o\324\025\344Kx\357\026\364wIK\235\316\206\207+\342\320| \"\334\0203\013Q\220\210\204^\032k\321\354\243\034xdT\2434\242\010o4\204\255<\353\002\301\253\340\362\363\365\260\340}\345I\024\212E.YFLq\341\214\250\022\351\224H#P\243\0355\371K\303\374\322\326\267n\3733|%qx\234\016\274}\247\370;\262=~\2547\375[\007\246\004>\312\365\022K\313\204\017TV\204v\226\247\017BG\367\356\035,\261KE\313\267}\305Z\324\341\003K\262\356\225vsB\203\237J\037Q\355.\032\250\304\263hk\245\n5t\234\313i\357:\365+\017\2226\034A\2714tb\265%\252\001\200\032\200\302\226\3125\215cY\030\2278\304K`\324\243\223\252+\0140\315\226\276\245R\264\355q\rj\204\244*\026V#\025\243\253\353\375\377\307\206\241\342\334\331B\333\031\004\326\262\032lP!\177\232\0018\227|\026\013\260\030\240\225\3320\332\321\026\263A\010\217m\232\240\032\"\033[[\255\324\036\177\031\304\235\203\350O9\037A$\010F\022\004H\224\036\200\017\276\217\245O\304?\030\3760\315\266t\022\365#Ydd\342\237\204\365\373~\0338\033\265\312\250\253GNr\347\242\312\333\263\265ih""\232\353\227F\257^\272\305\225\256,\006\353\026\005Avq3\216\215DJ\221@\211$A\020)3+D\326J\312\267.\212\3125\276)g\0345\210o\201(Dp\242\031\027\266\264\333\254xMm61\331\234\320\243\2669j\363\177\022OK\326\365\273\344\014\"\304\014m\023$\261\207GN\016\350A\360\214E-]!ZE\240\260\202\312\260\023\223)\342\027\363-\214\006\322\332\375e\304\212\305\222\306\256\276\302V\306Lq\337C\216\336\365\367\2573\232(w|\007\277\0377S}+C\326X\323/o\310\025k5\253\265\320\337\330\305\016Os\035c\032W\214b\306\003\265\260(\320\177C\017\210\300\002\263\275ST\254+hxW\212\317S\032\336#\224\220\316\023\245:\316\214\353?\001mc\006\270g\0224\023\206\266V\340@\354W\035j\302S\207\0211@\356\334Lm\345\365\034\r\035j\243\272\247\003\021O\007B\373TE\365\250V\006\352\236\361\336\247\273\211\260\214\005P)\230U\333\250\252\252\207\007\213\342\377\253\345\340P\375\206\365w&\340\335\242\001\247#\343\357\177x4\007L\3633\364\236\303\217o\260\344@7)\373\375M\221\347\275\352pxa\277m7\207[v\027O\224w\020\312g\317\237=\346\356\302\363\274\370i\023lt;fc2Q\3372\372\372\342\367\357L\343\244\254\022\330\r*p\255\245W\376\002Q(\343R\241K*\255n\217\360\270\177LA=\270\273B\357|\232\213\2462\200\233\245\342x\237|L\344u\\=\215\r\324\204\230\267\335\020\337E\010\340\244\350\307\244\370\tf\277\206\333~\026\370\226\323\337\217\\\005\363\364^\367\275\272\350\226\352\247\316^\354\342\023\t\223\210&\361\t\274\212\010\305\005\020\200\267\273l!5u6\335\244\340)I%5\223\246\007BIe4(v\230>mv\242n\216\225V\332\351\032U\362\307=\260i\\\241%\366\"\367\202\320c\307\027\033Z^8u7\327T\257+\2106/g{\033;\356\307\026\235\\\"\226\237\250\034\323in\026\241\005q\313\227\026g\265\330\2630\333\243\313\030M\322\203\244|\364%\326\223\035\334q8\367Z\263H\016\331\023\016\232F\351\305L\274\216\324\230\221\363I\217(-.\226\031Y*\271\215\343\254\234\310\232\024A['\rx\263\254\263\t\3234\337$!\357\244\t\341F\206\217\336\332\276\223\317\263\357\323}\271\252\252.v\035$\332;\234\225\371pC\336\201\245\372a\321\343\314\315\206\236\232k\326x0\246K5\222B\004\201""\323;\t\242NoM8'~E\216\243\027\036\372\301\213\263>\250\252\224\323\202\256\323jR\305\026is\023\002@\3234\325|p\353\321\327\307\031;\362\362vY\333\014+\024A\323\014\364\303\263\321\237\301\225\034~\020\362Q\265\262y\240j\374G+K\344\354\026\353;\233'=F\245\t\333cMR\227R\252\\\307{Z\221\353\236\023\tM\3573*\231s\301\230g}\231\246\361e\201\t\356DC\250\331\"Q2s\365&lh\356\323%\013V\353vN\361oW\317\232f\241mU\336*\370\306i\243I\274\035\270\\\204Q\335\017\260\351\033\3324\205\204\316\356\311:f\266\257g\323\275\035\351H\212o\321\254t\213\r\000\256k\376\0213\311tnsm,;\341t\223\277iJgC~q\212\224\\\323o\331\232\373$\035\321\206\031\223\"ZRA`;\234\223\304\353\257g\313\333\243H\242\204yR[\271\025\023\333\273\264\014\2265.\254\370gs\272\231\335\3167*\210\222\260\260\253\214CR\305\216G\026\276\2761\021\021z\336\216\356\210L\311Hq\023\217\2044$\223\005\341\232\232\246\360w\267\202p\334C[\204?JmT\263\261\326\204v\337\201\332\345U\327h\276\257\2528\010\333\213\234\r\351-sd\255b\316\032<0\361\303U\004\224f\230\260\"D-@\263\276\334\370\304\202U]\001\240&\004Z\346\312{\306\274\234\341\215sv\336\373%\3358&\326\357\005G,\204>\320\322\223\037%\346\3535\263)\216m\334\2656\023-]\206l\326\250fN\333\241\212?+\325*\234\355\335\2121\315?\006l\034AU7\\nB\002\2561R\241\"\260\310\336\232\363\353\254\277{\r3\204\020i\004\306\227\036\256\233\234\312I]L\2169\2757\216\014\305\031\223!!cFf\327z\034<S\363\265!\327\034\276\2570\254\023MI\227(M)\034_\234\016)P\270)\212\306\335\036\334\230\035dY\326C\2516ZP\351W\341;\361\361f\341^\216\357W1\207\304\365\203\212\006I\200(=\236\250\255\016I`\226\201\354\361\272]\016\335\031\262\305\252:k q9\371\216\032\036\013j\026\326\027+O\006\250\033\333\313`&\255\334n\270\220P\021\200\212(\252:\233d\351\325x\363xr\344\235@Da\331,h\373#*\276\2533\342m\253\020\253*\324 \275\274k\336n\225-}\303j\311f\242\224\213d\3316\r\215\363h\3366:?\251\272\007\374\201\235,\316\0109+`h\031\014\010$`1\200\037t\021\220=\357\272\360\3178#\351\332c\230n\237\037\227\233G\257)\004B'\247\003""\3400\200\260.\005\266\355}Js\326\274wB\ny\311 B)\233\265\203\016I\371\341\216A\014\010\033\266\262\346Z\325Z\206NKS\220\345\034\300\374\363\265\013\240\311\224\360F\365t\362r\224\314(k\031E\252\265\356O\264\212q{K\211\212\333M\240@\201\0100;\\\311M\363\022\311\372\0102\017e\354\026K\232i\322\276\306$\356\017*F$\202\242\000v\375\2241\202\252\226\331\026*\204\347r[\177\230\207\306$R\327\200\341\277\345\207J/\207A\210`\215D\260\221\r\366\"\027`@\236\205\250\032F\270\346CkO\315\276\303\351\315\223r\203\241\221I3\366\375\025\352\355\266\343=\016\236B\025\002\007\234=\014B\020J]\307\251zn\347\247\303\037\212\325\037|x\330\320w\213\024\203\310\351m\216\034\020\2302\314\306&\200\010\205\177!\363\363\273\342\002\366\276\241\332=\2235J\2479\220%\226hq$\3547\003\3442\010\305\002#\005\200\030\355g\244Xu0\261\022{\202\322\241\214\271\266{\303\000B6<\312J\270zh\027\002G.\345*\030\t\226\354\212\200\350p\254\323d\007!\256U\223\010:\244\312\316\340\204\204\232\345C\321\357T\030\222\023\234\230}\022\207{o\347\332)]\236\347Q\231\227\323\017\244&\222\266\254U\237\341.:i\0375M\246\033\356\256\314[?\204\020\022\201\251gd\246f\005\305\300\037+\227yh\321\301\261\005\355\373\334'{31\224uL|\256\0324\024\336\275\244jG+z\275\364\252\222\304\340~.\342A:r\262x\351kY\270sX\322[8\230.#\346\006\365\300\2357\266\320\276\343O\t\353\200\310\370K\313\226\212\007\202E\026@\236'bx\335o;\310\346\002\252\226\240US\231\016t2\t\2252\206\021\020]\305\373z\rV\231rO\350\273\242\215\233\204\265\202\024\274g.L\274\323\255\233\234Z\213\250&\243X\254\340(\232i\262\326E.8\270\230\243\t*\235\344\222\223\267\266\326\232\035\227B\207\2234\016\326%x\370\210\257\223T.\2634\314\351\225\342\021\355\034\024\014\207L\335I\367\222X\245\244^\206\310\360\262\005@\314\333S\367?FURi\304?\230\222\001\020\016\"\034:g\301\256\030op0\026D\222\021\017\352\305\240\236Z)=e4\004g\232\207\010c\020\3066\207}\013\311\207\231\343\376-^\256\327\235\2150L\312\322$\tA\203\246\257\244\370\0213|ew\217g\250\020{\220fF\2422\206P\312x<\273\007y""\356\351\370\334!0\353\325\307\276\240\257V\013\252\te\305\005\220\003$kW\2534\357\244\254|$\252}=\375\375\367\305\226G\022\017\305+\305U\207\031\350S\330HQ\214\212\346yy\243\353\370\235\275.E\244\243lmdaD,QX\314(e\01433\002\303*1\210\225\220\252Z\345\204\306F\021\r\223\303=\234\206\346h\303\026!\207\016\336`\321!\216\312\247V\241!Ym^\313o\335\366[\024\346\275\034\273\254\030@%\312#\023+\323\240\335\343i\235\275s5\303\216\364\310#\002F1\201\006E\201\"\301\026N,\034!\207\335\336Vp7FG\276s\200~KRm\273 8\207\340\\\330\345w\316\311\350\2766\007[\016\036:Z\035\365\025zY:>\2434\217\355\230%\233)7U\227\364\312K\373,?\224\270?A\225\010y\246K\365\rq\315\360C\212\244\017\305oF>\214)<q\r\331\321\333\202;\256a\200\220w\364:'\252\222\262\0022\001l\243\224!RB\2672I\335\211p]\027)\000\346Q\003\300C\224y~\204<\203\322\342]\334\344\335\244\245I\352%\355,\2255\240\240\202&\037?N\300\006\230h\330\016\373u\273\266I5\2417)\230T\224\244J3\334\271\304\323\301\244\314\255\314\262\225\20446\226\350\261\264n\263U\2455%\261\272u|5\\\332\025\266\210\246\306\017>\370w\304\021\223\312\302\244&__\277{\201\002\017\216\007\305\360R\033E=\001\241m\365\r\344\300\222^%\317`\305\265\212=jI B.\244\275\3002T\320!\332x\243\333k\034\364b\324\tL\345]\343\326\276\020\206d$\031>-q+8\303\236\342\205%PU\007\257i\217\240\206\2526\253\263\001\010\033\010.\304\352\355\276\376eN\205TWXs\325\204\220\035\035\\\000\353,/f\024q\261V\226\021T\300\301\214=$\023\003~a\276\036\033\356\262\030\331\304(]\034\026\206\203\231X\344\020\240\004\031\321\254\t\324a\220\220\3034N!-g$\322\265\002\014F\005\010eF\372\314\031w\3658\265O{\260k,\030\364\355\375\271\342\307\2453\177}\374\013a\345\003\310\354\330Qg\365\220U\036\252k#5\230\225\"\342$\270\267\202\310\343\201\237\274\242\270\026\233\024\nP\370\0306$y=\027\320\243kL\323#,\\\220V\321\033\343\014\324\366\030\306RA6\030\204f\333\034\357b\224\246\265\334\300\331\031\271N\362\245e\035\0311\234q\025z\233\247\025)F\021\254\2530\020f\241\223\206!J\023\2044\014wRMi'\314\223\026\305""\336\326\302fI\233I0\024\350p\347D)\306\353b%\216\335j\371\3579\202f\322\307\336\\\023\2749\263]\034\334\260i$\225\313>l\235\022\365xm\276)\325\317\035\006\343,-\0149\266]\0100;\275\362\322\020&\241U\003BYES\250\215\240xE\014\323\241\300\244d\264\341\262F=\024i\034\226pnu\262\013!\322\232\035\032`\230\206\305(+'s@:\253\260oiS\263k\244r\267\016\242\"\007J\271\313\346-\334E\313\330i\216&L\240\337.\346\343L\263\233b\037\255\022E!\005\312\033\343\232~b\001@\201\221\305\214\003\016O\340t*\003\010\2155\026\211_\224\230G\006w\243\220\361.\252\026\254M\031Eq\300\3218ab\306N!\305X\234\317\375Q\t\026$\2209\021\204R\021HA1\340\226\020\220.\215_\263\177\r\306\215\360\342&@L\375q\022\311\222l\007\260\204\202\263b\005\316&\257a0\302wK#\271\2528\303R\010\275\272>\2244\247H\326\2754\337\337{\353g\213<\306^\325\347\2737\002>\014\034q\275\264\202\211\340\354\310T\006p\312*\275\253=\230\316\341\264\027\202\243\301\274\305H\242\025\273\245\316\245B\247\034Q\236\366\224Y\253\027K\030\275\334\231\350\332\rT&\335\000\223\tSq\275\230\210f\220\247\234F\332\355\320\321B\271\305w\223\236%s\031\265QZr\251(\253BT\242\327\240\261l\262\337\222\0362/brL\376\342-,7a'RX\250u\360Qc\213E$`\366\355\307-0x\002\230wb_1\035\236\021:\207\275}\223h\233\253x\351m\370\374!\227!\207\200\357\303\302Q\033\034\270\336^\231!\224Kyr\251Z\230\211P\221.\332\275\001\355\363dh+G\313\342#\327%\361g\274\306\266\275B\335\366\265\270\355\003\036\345b.\235\336\n=\311\341\202i\003\031RsJ5!o~m\003.\242J\207\224\030`\372PM\366Q\020V\"\242\266J\227JX\347\223&b\"\331k\014\275\306U\r\023\247!\342\355\013\267\030\260\321\225\023\277\206\255\3352B\255&Y\006Y\224\331\264+#dL\323\016\216\327\013A\017\034\261[\r,>S\232\233Fq\267\224\201\323,\324\271\275m\026\341\240\345d\273C1\235\356\250`e{\367%\234h<\021\027\303\020\312`\341$\207\005\335\322\227\224Y\005\031`\0208\035\251\025\3542\234\230\024L\276,2\301\254\n\204\317\013\242h\256y\261\202\221\230\224)IB\266\007O\013\211t\232\375\261C\336z\232G\257N \3403\275\312R\253\273\3208N\335""\372\317\226\007\215e\212\216\314\311\305\260\361\014P\253\020'U:6\344\014r)\264\036.s\\\272\275NQ\025-\021W\364\t\340\305UQV*\250\244Ur\324]I\002`\016\220\"0F\022AA@e,\252\202\261\005\024\021X1\001[%\225\225\253Jx\260\304\352\300\231\255Q\\\314\301\010\244P\207@\350\250 lr\030\346v\306\2141\266\233Z\373\326\300q\030#\212H\214\020\014\016\301\330#\372\341\010\005!P%\327,\242n\376\304\204$y\017x\211\370>O\230\322\365\314\271\352\350\314\360\251O5j\324L\334\355kxt\327\263\345\371\205\336\034&p}f\004\"\222@\320P\277loM=\032\026\204\224\260\234|H}4\364\007\024~\000Q\214K\340\2029\305\315\033\372\356\235\307\345\335\271!\030'|k\217}\223\224C\010(\034>\365+{\370\277c\342\303ta\026{\370\345s\221\200\033\037\210\250]p\201\365\353\223\277\220\271\242bn\003\3144\331\213\244\274\023\272)I\372\336;\030\261\206u\354\201d\204c\215\031\330\225AyH\023\336\331v->\343\370~\343\322\276\344\367'\273\335\356\367|:\366(\367\244_\014O\rJ\211\023\227a<uk\006E\036\017=f\231\251L\t\"`\237=0\3140<M\373\355\217\262\004\363\377\027\317\3709\351\277w\035\323\016|H}v\"\022\"\"(\246v\242p\224\324M\005\355F\245\323\231W\303\3722CY\026E>\326\225AYGA\231\353!x\220\245\315\255%\255\315\335\256z\357xi-?\"\204\022\270\324\237\227\351\372\235y\333K\216\351\360\260\234\344\355\310\237\336\035\366\245\003\222\201 ]{8\251\202\325\243\\\270\005\031\035Hp\035\326\261\006UT\313\036\017xj{.[\335+\263\207\230d\233\335h\226\275\213F\212\315\347=\267\304\210\322T\331\n\"\374\025\350X\247N\300\206(\260\300i \316\263\347Y\315SW\347\037\017\332\367~O:\221\024\214|\237\r\230\204\304*W\003)\004`\360@\240Uyc\010\243 \313\022\213\251a\263\272\331\224\312\017\222E\307\030W\305\rf:b6\370-\214\314}\341\303\030\215\376\275\376\233\225\2659\244W+\267U\333\246\335\342\361d\356\036\3773\347\266!\001\252\310\016*\311,\302}sDP:\242\032@\027L\214\017Q\021\010D\\\240\241p\373\370\036\350\032C\274\311\200\311\030B\014\203\360\313\271\243\n8\0203QC\327Z\221H\304\366\351\351\"\221\327\231\250~\254$d\312\375\023\036\010s/\230\027\267""\233\357\226?h\312\252)\005\"\210\330\0308\332\223K\215\017=1|\260a\025\306\026\353\002\207\325\351C\017\2317ZE\204L(\274a;\212\201V\006\372\355\014K\014$\322\0246\354P\306K\257\2468\223^\257\256\323A\251*\362\376VI\236\316M\326\022\211Q\334\307\222\257.\345dN\335\370\033I(\247\007K\001n?=\037=\337\230\217\320\345\256%\272\327\327:A\310T\243=GI\nDz\341\363\003M\206g)\310\\\335{\016\261\301P\t!\022\311\231\326\303\200\241\331\013\221\020B\320\024\256\346HE\212\013 )\005\221J\320E\"\275~\203/\203\017+\210\247\023\302w\007\0058\214C]\203\2443\214\237&\352+\315P\206\023\017\031\003\363\367\017K7I\024\200\235N\237\264I!\004\337\255/\323\366\361j\006Q\031\021\242\022$\"\235\244\362\r=<\033\032\335\307#\360/\343\21435\204Nj\314D\215\344\230\331 \365\035\310N@\201\032T\216\345!\013\346mr\037<(\2504\020$\031j\245$\023\362}\017\321\364'\344\360\274/\013\354\364\223H\203\201\324)/Q\274\033\302\367\304\316g-\266\360\360\357\235.\010\275\325\341\251g\225'\273\345aJ\332\364\230\310@d\022\026\265\224_\314\323\266\313+L\022\003F\316gd\034@\231$WA]LL\211\211\210M\303\351\367\372\0360\352\034\310\302\274\320|!\033\220\273EN\324\226(,46\220a/Iq\262d[\345\006\036\240\215v\206\202g\334}\301\004\2021Y\017\221\233&\273Cp\231\252\026\303i\037$j\025M\020\331\311\225H0\225$\366.\370CI\014A\022\005\2334\000>\363lp\233nK\032\251\006\226B\204\367X\207\241\371\037$\307\000\234\rv\305\323\025\001\r\2236f\250\270]\375\0221m\267\020\033\003/\205\270t*s<\2676\344\322|Q/\032\233/H\243\374\210\205W:K\rU%v\376\232\260&\020^\303_E\260\372u\324\332<\221}\246\200\006\344\355^\240\022\2571\017\016u11c\323\256X\366\025\272\232^\025@}xU\371Jd\352\216+\035\330 a[\353M\372\362B\215\324\330p\277\255\000\017Z\372\375~\260\266\235\373\303\231\330\300S\266\320\331\320!\223H\252\200\352wa\334\3522&\233\"\0237\224\310007l\310$XB\246\304,\363n\276\372\301\251\024\2109\345\nG\337.\341>\\\312\353;\243-\272\020\360\353:\230\200\200\221r\225Q\237\002\360\230\"!\300\0058I\275\035c+\002l\023\341%\323P\225\327n\347Zy\374""\335\237\207tj\353\244\324a\023\323E\341\215=\030d\336\323i\002\230\371\374{L\243$5\361lu\351h,\300\236\311\240f\\\0234F!\301\237\261C\224\252hbI\365\334\312\376N\335\264\r1\243\273\n5\301\027\266\261\2001aa\240M\302[i\346\304C`\261!\236\373X\220\364nh\264f\273\222\353\221\332\233\262!$\303w\264\024\343\020V\247tz\213\253\321QK\021\006\214Ai\364y\376\371\345|\257\224\236\337\217\313\317\336\016\331\261\335i`\251V\265\240\323CD\226\252\205YrysS\017\000\313\r\242*\003\006J\306\t\356\221h\310w\222\241hT\270\321s\366|w\016\242`OW\201\360y\347\030y \271g\265\tJ\365\235\260,\005\221@b\262E\017Wk\266\241\210\033\032\317\2229\202\005\215F@62\032@\324\323Ow\252\032\223\020+\211$Y\003\027'\000eJ\035\205{8\026\274\270\205E\010\t]\022V\374 \234\342\330\331p]\242\241b24\215V\264\031\332\274\201\006\366\022\016\347\260\336\226\246\242\267\244\002i$Y\034K:6i%\251\202|\020V\350\205\230\207;lI\004\346\200\263\261;_\r\274\273V\023\262!\026,XE\330\254\031YS\316\030\300j>{\270\036P\364\224\236\240\201\304\365t{\002\001\t\".~\t\251\267\024\202E\354F\343AD\320\224df@-p\330\302\331\2612\030\221\231\n\251YD\210\254FC\032\301\210E2\"ld\307a\212jeL\003$\312a\232Eo\033\210\321t\013Z\020-\210\224g\335\342\316l{\210R\302\212\221+\000*i`\r\267i\263\007e\020\330\363yO7\230\363a\372\235\235~\344:\223\266\205\200?.\330\2122\036t4eG\262\220\242K#(0sT\367I\3016,0\231H\036fB\005j\000\352\220\331\222E \357d7\315\266\321\t\004vt\230\014|t\224\214b\310\001\347\243\0141\301\027\353qD3\311\204\243\2715\201\313\025:V\000\031\322\"\334\361a\202\356\t\311bRX\264)\220\266\\\363\330\027\231\262\027\201Q'\016s#@=\310\\\003\262\306\314\022\276Z-\017\202\364\343lot\rBo\342g\333\016q\"EhNQvf\024R\020\010\005@n\364-mA-sF\343\316'\353\366WOhv\323\241\353\344\244`\204Y\240\324\014\031\203\006\005Aa\024\006\"\200\214\021\020\022\001|@_\205\327\325\344\003\004\347\022\305J'Z\014\207m\201\214\355\304\004\013\344\030\351Ecq\332\001\352t\335\"iTE\210\320\0160\250\004\201\202\247\306d\034j\266\t\264Z\\\0067$\242\003qm\332""\263\211\340\244V\262\342b\245\321q\311\232\327C\030A\t\030Dr\232\271-E\221d\001\320\216\360\202\220\217,^\375*\362\031\234\321\017\310l\017\037\005U=\003\006\003\233w\023\030\304J\034\275`s(\355x\034\031\241dh\200}\3466\2673\315\336\331\307\205e=\221{a\340\023\r\310\365;N\022\235\3715\207\275\367\271\330$\367%\240_ \200\207]\247\217\323\272t \242$\313K&l\026\001|\221^J\215\031\002\0205\346\315\336f\272\344\204\3132E\253P\305\332\214\003R\203?\223g\301\203\021q$ \020\210c\230C\377\221\326\\\244\207\317\001\305\376rD9\310\230\201k&\236\221\277I\245\000`.%Tj8\300\33499<\370\021\026<2\027\351\217SZ$\005@s\216;u\217\216\224:D\264\032\206\324\276Z<A\317\001\336\001\272\2019\341APl\232\361\343\252^\025\333\005\016\213\302\037L\032N\023\\\303M\324g\265\005s\304\267\nk\204r\214\306\260\301\241B\360\022\321WC\001i;\010\023#\236\246\243\355yw\321D\261\030$)\036v\346\334\0060\024E\213\004D\200\242\262\n\250\242\210\252\252\304QPS\0009I\037\016P\317xs\311>K\343\353\232\0257_\203U!h\356\243\337\372\177\017\327\345\224H\td\372\201\301\003\000\017\244G\322\"\211$\321_K\373E\321p\255\273\313\025\361rF\300P\032B\024\336\256+8\034\233S/\376r9\337\005\022\230\336Sh\246\342-\032\0348j2\362l\301[\224\022X\270\013\211\327\r\226\207C\304\312Z\253\221\3303v\353.\"\230K\226\230\240\251\030\022\220\211\330\331.\316\032\270!\313md\333\215[\325'S!\346aXD}\305\225`\212\221\221\220A`2(b\001,\006\022\260\2022\036\262I\210y\3352b\260+%AHeYq\205A1\224\n\206\003\000\304PY\025\261\201H\360v\000\212\026K;\340\253\306\200Di\001\263\271\002l\327D2\220\177\224)\222.\236\320\3102KC\327^{5\366U\0074\222!\\\200J<\206\330\"\332\014k\232\245HrZ\207\340[Xp\270B7\233DH\260#\326\245\004\343\241M\240@\342\007\253 \220]\007'\014u\201\335\245>\245Nl\244\365\233\253\262;\230\353\270\343\317]o\212]nP\32270 \366\252\301\3277z\2508v\314\r\356>\304\252\320]\373b\333\357bF\336\006\233\326\262&Ka\223\337\220I\312\006$\322E+\271\253\321<O\352\310\3050>\336#\256[\216\203\251\t)\022\240\241\002p\341>hY\340L\005\305H&\274""\211 \232#i#\344\020\340\357\3001c\005 (\357Py\024\370\316\307c[\243\257\260\342\\\302'\020 \207i7\241\217\305\200\300\205H\242\023k\266X\036\203~[\374\035\367\027\001\211,+`\226\260aj\322\205\264)*@\006ID\t@ l\016)\342\333i\014\0052\007(\255\010\331A\256\264\002\3315\315\200\332&\376\305\315\320\276U\034\264:\340\320\203BG\220<~7\204`\240\340\213M0\006\032=AV\366\355F\020$\026\305\036\"\\{z]\311\243h\206\206\275\340\255\034\273\020f\231\254\265\356\364P+\267t;F\271!\264E\032Oh@\"\021\334 \350\014(\272\335\031W\261\023\267od\313\237*\205\260CM\321\213WrH\324\023\210\275b\322\323f\326\223a\003\2558)\025\014c\246$C%\r\031\334$*\232^\313q\022\357\351\310\007\231\376\223\264\257U2\037\216\256\"\276\264no\305A\206wuX\245\265\013CJ\276C\221j\244\253\365\267W\232e\026\242:\320\362\260Z,\232\025\211\342V\260\222*/y\306\337\370:\345\314Xn\026)\247\303\206f!\007\226\3334\310\0073\221)\326\032)\313\311\230\211\021\223\030\264\275\311T0>\3311Z\273\277Xo \326\307N}@I\210k$\265T x\335\355\300\355\317\203\206z\357\311q\210\211\245\264\264\331\201v\024\325wMMC!j\024&m1\000?T`\325:E\207\036\3120\373\321T\206TC\325t\332\031\2411\2724\371\236\375\352\275\367\253\0079\215\026\3059s\215\304!\230)\272\257G\033\237\222\304H\035t\253\302\274$`\\z\t4\214\332\226&\367A9\035MxC\2264\226d\t0\n\341\006\360&\215UN\002\326<\254\335m\301V\3510\010\241\241,\337\032\224e\024@\034\323\340\333I\000$\344\2775\220A\315\0218\215\352\376<\312m\341\311\213\032\347\007I{\207\2432\206\240iDK (2\340\316\220gK[[YpU\242m\324v$=\356\265j&\037\030\374D\032\023SS\270\301\221\311\n\361\343\326l\026B\347'9\216&\346\213\337\261\227\253\016H6L\245\270|7\006A\250KO|\253\005\261\344H\307\002\333zLt#\\h\312sZ\024\024ap\020\301\005\241\014\254DY<jo\346\201R\222\266\322*u\272\235\356\034\230')\324\313\310Bn\311\221\232Y0\354\226\005\024\342 \333\311\014p\245J0\246\316\231q4ngNG>$\200sHK\312\0340\030\202\231\016|\256\260\260\032SR\030\315\232\270V \3145\320\333\222\231\270v\363\030\033#{\300\326\265H\331YT\371D\251\230b""\227\251\032\231R\227\005\315\362&cW\030\243H\246\307\246DD\026\201&\270\303J\313,#\216#w\260\025\300Z\"Jph\215\016 \246\302\220\322!p\341qU\020V$\245\2451\025{\222\214\031\303\324\301\2168\311\216Dw\210\202GkS\2079\363\230o\317\221$\r\377\033\303\314f\207\030\350Ce&\235\336\364\367\260=\304\2220I\0141\2442\271B\034\013\357z\274\3676\2725v6W\2536F\361\023\226\353St\351(#\222\215#\366P\014AJD.P,d1\016-\302 \302\244p\272\031\311~\224\231\230\006\020Yd\023a\301\322B\342\233:1x.\260\220\251q&b\252\000\363_\233U\254C1\270\303^\025\324p\304\352\035\275\2320\301\202\370A\200Q\n\222f\027`/)\310\206g\010\337V@1t\222\\\020\333\220\342\304\273\335\313B\305\342e8\345a\307|+\005v6\350\353\2448\315wo'\036\252V\227\311!\231Hwfe7\243\211\303\"- `\006\333\332\033\246\320\036{\350\337\313 s7\233\363\n\006\354;m,\026\264dZ\264\254\336\331\273(,\266[\262D\277C\n\006[H\206\364\204\214T\204X\206\252\02093[\201\211\320\222F\001\304\320\341c\034\266\222\306\265tWSn4\256=2,\205O,8a\257\n\200A\027\226\205-\222B\r\337\213\331\000\240v\035{]6v\3201\016\346U\356\275\370\3459h\272\337m\315\304t;\223{Q\005m\026C\233\000\356\031\313 * \320@\216!\303\266f\020\030\202\300XH\221X,\024Q`\002\302(\212\214\0048\340;\002{\346C\322@1\307\030\210\014\3712\276\201\246\002\333Id\310m\231r\231r\307\267\216\310)\222\024\311\260\013\\M`kB\347'\016E|X\001\"\301Q\200\202\353\272\r\220g&\301J\205\225\202\022\026\321a\363\326\014\013\350\201\351\200\237t\220\220B\004\030\305\003cT\357m\343\r\332\031\237\017\300&j\206\373\360SY\347\242X\237`\026\260\266\203\0105,\204Y\036=\n\362Z\220:\334\375\037'g\036\010\237e\216\020O\317\003H\t\356\372\212\010\365\0375=,\223\241&\210\302\374\0209\022\2161\245\2120\370\027\023b_\252{;\314|.\220\245\003,F!\220v\307k)\372\235\351\220\026$\031\000\262\3315\306\247\n\363\242\300\027=rK,H\327\241\336\002TO\216\322\025\210\210\310B\214\201\233/?>\333\021\235\023\263\323\275\224\322\004\010\202S\356\365?\031\366\344s\350\264k\275\010t\303\255\220\236K\217\2308&uII\357\3330>\2154\374\241q""\014\007\034\253=G\266\002\005\2152@L\222E`b\216\246\253\235\314\262\r\017\205\243\247\267\332\207T:\243\355\037h{}\2777\257\347\344u\"\244\204\234\242\036\225\215\274\247;[\271\013B\326\037$/\342\364\030\246r\354\010\007U\020:\211\325\352%\242\325\244t\226\375\212\350\345L\346\300\316\304\367\340d:\002{\334\364\311\240#\226\002t*$\201\022\200\210B \306\t\343\234W\211\3048\360\357\323\265\365y`\375\360\372!\036\305f\030KQ\002\222\004\302\302\260,\"\320Q\010\206\262\025\223V\222j\370\220\330\327\237,\222p  \222M\334Hm\253\200\311\027\316\303\235\2442oh\020d\335\206\023\002\241\350\253x\351\272{\010\000\024Oa\210n\242\201\370\220\037\246\010\036\312\306\300\212\024\322\247\006FK\210.+\212\346B\351\234\312\031\316\017\220Y\200J\367\000\220\373\200nnn\306\373\0336\306\306L\001\2001\200\301\273g\006.\327.\327\263X\310{\245\230\251V\245\036X\263\031e|\273\344\373\377\356\373\267q&_\003C\030\224\371\244\372\237I\325\215\241\374\351x\351\0226]8\232Zp\313uJ\211u\244\2474\256uj\214\320\261\376\303bH\304\326\217\343s:n6\342P\270\271H\256&q\262\252j\236\326\211\251\032BS\252\233B\271\256\003\325\273\355\273\313\\\033\357\301\277\330\237a\202\304D\025\211\010\244\024\204P\212(\304\030\242\254Ab\"\306)\021\201\030E$\t\031\031\026H?\000\003\333;\331\376\324\204\020\372,\"\200\035\242BS\335\302\r\202\304\025K(\005\210\244&0+\006(\212*\010\306\021V\002\250\242#>\274EA\210\207\\d\225\221\211-\244\254\225;\252\377\313DAE\177\307\333\270$A\000P\261\366`|Ip\320a>*\022\007\263\252\035\225\020)TE,C\311\024\377d\370~}`\226\222\007\312\202d\030}wI*\023i\031\n\231\007R>\200\324\364\010\243(\205(\211\365~7\322\303Sf\021`\264eI\364@>\210\201\353,\327\260\020\001\237\212&\005,\366n\343!\310Q\237\300@?\205\006\006\201@\345\273Bhq\356\301Q\037\322}\344\375\212\245\211i\354\331h\222\002\263\330)\332\370\0162\001\361\331\311P,\232I`}\276\0217\230Mn\024\367\310\253$~\236\371\246\332l\302\312\024\013l\200\366\342\277\204\203\324mh\025\"\374\201\356\024\245\207\233\013\217\244\331\333.\225#\363\213""\205(9#\362\373D\023\377@a\355\243\316\307X'$B^P\375I/&V\372\243\374\001\2411~xe\212\220p\201\232gk\004\256\311oL\341\377+d\237f\330\236\302\306|\330{2%,\373_\022e\345\275\302\215\223\371\351.\256\303\014}\217\231\3614|K~.\026M\241\025>\233G\355+7\241A\237\360\"\305_\256\302\367\302\373;\373E\352l@\225\363\231\"\316{\273\"\037\236\014\023\256\205\032\tP\364ZN{9\352P\260=~\337\233\351\314\264\375g\337\352\r\212\034\346\343'NEU\207\325w\352\262a\316\305\370\337K\345_\222\317\307\350\236R \305\375Q\375FG\332K\r5\022G\0010!}\250\211\200\254z\303\2210\033\317\303\374?\304Y\235\332\303h>%\320n\265D\306\323pr\177\177\314\240\373_\302\317\267\020v\006\203\356\002\370o\316\000\002\221\177\310\235\373\324\027*\037\365\362\373\305\034\240\201w\0334\206\264\332\300p\035\310DK\016\211\211\267\007\033\270\223XQy\367>\364\307\344\226~\023\357\263\2250A\010\370h\177\203`\2543\303\356\344\324\\a\371.v\\\216\034\026\023\257w\363\375\330\017\273\370\276\377\271\371\317v\277\036\322\211\321\251\332e\270\367\226\035n\317\344\201w\372\003\242\340\326\265\023*2\216R\\)\367\375\317p\370\314\217z<\r\0064!\036\374\337\025g\376`\376\235@r\257\322\242Pe?\030U/\022\346V\214B\204$I\372\377_M\337\206\"\237\217\365\017\377\326DA\263\252\272yO\005@\230\322\341z1\363:\367\312\254\256\\P.\305\377\216\212#\037=Tt~gK\365y\037\233\372\303\371\250\277\321\331\331\350\355a\177\322\200B\355\364Y6\217G\244cP\201(Q\250\333\23671\335\357P\203&\214\324\\6\241@\226\336\010\r\332\341Y\007F\233~\342\217\373\375\330!~\317\245!\301\345\363?Lz5\\z1h\312\256\322\251\007\"g\363]\330\035\311\214\203\322t\032\240\373\006\307\017\204J$B\001!\n\027\207\312\372\275\004y\303\321Pb\211C@\224\273JF%\002Goi\251\313\223\r\3779\347\321\226\251@\222:{\342\006\377\202z\377\263\310x\365\3230'\036^3\313a\243\203\\\265\372p\346\203\317\\\271s\342q\\\352!o\313\315\031\271\363\364y\316|Gr4\341\263Y\014\365\037\233\341\200\362\370\313\213\363v\035\271E\204\245\262g\261i\377\362\267g\366H\343\213\364\330gi\202\376L\\!\202\361\307\213""\265\235}\227\344l\354@\274\345\036Z<\310h\217\227}\247\305\316\322\276\037%\305q\001\320*:\001\036\204.]\322\312?\334c\354#\320\240\366<\231\036N\304\177\264\222-\n`\355\232\267\265\333j'#\342\370\3751\374\275\313\016\023CG\203\246#\314\035\327\322\036N\272\216\3379\0271\202_dr*\2664!D\3513t1\"\253\264\234\3559.\324\"\217aG\020\371~?'Q\036e\344\237S\316\214:\242>\277\227\312y\2623b\034II\336\240I\210<\276p\3632k\272\333\303^~w\220\222\360|\200<\235\350\037g\216|\350\217\307\344<\344v\021G$G.,\223\222\253}\272\211]\240\242\252\341\2775\315\361\276d\3259\027\374O\350\372q\361|_\333\253\007\036u \317\212\274\204\010\317(o\313Qq\333\003\201\250\364~=\364z4\023\241\353\322\373\265\361\300\314;\333\331\275\021\320\257\212\347\227\336:\275=~\220\230\370\376W\255H\301G\244\310p-\010\020\332\020\220\374\344\354\254Q\351S@\357\317\267d\321\277\037g\306vy{\177\216\327\237^S\266)#\316\022\310\276\336S\313D=\300\320\217\224\311\341\314\232\344\353\265\007\013\243\247\301\323\327\036G\366c\245,q\325\236bb\227\234[\027\0370We\"^\327*ET\324\263\315u\275\316\347\236\353\221\337:\177\037\330\362\240\352i\236/\330\217#[\252^T\221e\252+\353\027\213\027Y\257$L>\r\363\315\330si\365t\257[\337\356\235b\004\217\002\271\213\253\220\262|]\177\212j1\263\361c\272\344\216J*\316\255\321\357\370\317\027\203\247\327\376+\361&\024\3743\340\360\234\244\224G$>\23597%\341\323\345\314\027=\3074w9\317\216?\007\2703\364\004DG\276t\324\2358`\211\017\031\323\361H\372\257\212\311n'\247\342$\276\276]\223\311A\302k\367O\007\255\324x\216\222\350Q\337\205K\250\361\324\2153\251\035s\003\276\267\020DGZ\215\362\236\216\377\273\357~\374\3745^+<#O\340Pt\250\273\361\270$m\302I\241\376&\373\027\013\255V\247\253\277\327\376\304\272\375\376\257\005\020\272z_\0248%\211\014:\233\351\347\375\010:*\032\212_\350\217{\303\340$\225\000\035\365\324\212\021\360\037\264\303\3637z\353\232@\222\353t\247\2163+H\270\021\373\260\177?\203\362w\350H\357\207\354\270\021\340\277\024\315\332\361~y\211:\225\235N\265\3210\001\360\325\361""\316\343;\037s\374\361\342\360t\223\007\202%\303\361'\035v2T\267\325\360O\301N\033\353\370\017x\351\376h\360BT0\372\037\004xj\203\260\306v I\202\276\233\374\035>\377\177\303\364\317\n\204\337\277\357\2118]>\027+=\330#\332G\335\255\207\324\372\223W\365\351\250\020f\222\302\023\031\021Oo\347\226\034M\215\337\361[\363\177\003\237\342:\247+.~w\007?\360\212\214\031\223\330\350\267\307\034o\032W\276OSq\252\001\370\260\275C \344=Ns\036vw;\230\221\303\371\275,=\344\177\210\3430:S\227\240/\303\237\320\377w\242 \2071\351\214s!\231\316N\211\234\242`~\352\343\345r\\\3361\302\361\373\204s?\033DA\n\034\216\020\356z.\215y\250\036\211Ht\017\311\205\356c\215\227\215\205\306\301\3104\016W\216{;\315\372~D\261I\342\3627!\344\307\307\027\273\330\236\227\336\341\324\"\374a\350\213\361\224 s\261\311\353\346\376\302\347\207\245\340\275#s\214\r\247\361e\373\206\372\374\313\322\376^fsz\034\303'A\306\263B\000\343\355\373\276\322\205\005JL\3073r\3628\373]\007\21699\275\022E\031\021\037\250\364\307\317(}\234\376\215tr'C\237\321\366\034\247\356\035C\317\351\346\371y\017?\237\354\201\353\373\030\375\376\241\320=2\376\343\233\220\363|\307\235\274\354?\320\356\227;E\375\3206=z\0179\310\235\364\263\206nW{[\324\322H}'\354G\224\362q\203\274\374\272\017?3\243%$9\374\274\177\304\324?7\036\321\337\234M\034G\230\214<\036\016<\335\361\201\355\007\216w\201\347\257\271\341q\336\031\r\352\360\036\342\r\021\341\342\311\360\235\316\367i\235\2219@\215\375\336\301w\322u~~\313\223\273=\222N\343Hu\376\016.'\361\037\2133\334;\360?_\300|\007X\343\034\316\371\216\311\330(\371\350\3747\231\257\266|\277\247\325\365[\372\262\276\276Y\307\355\374\217\233(\372\037\345ud\253\244\356\352U5(-T\024\"\323\213N\233\032VL\323\030\221N\333\366\350\317c\250?d\260\2373\351\301\020X\375\004~_\362\214\026\017\361\227\353\024g\310j\214\005\001@\354>p\203\336Y?Rg\320\240\214U\004DB\013\025\022\036B\211\364>k=q\t\355\373B}@\371h\222y]R\215\027p\207X\340\n\225\t\373l\343!\353Rhy\243\200\212\370\222D\356)!\274{}\226\207\021NS\324;'f\007""\030\251\357\336\373$(}y\220\205UdE\006*\242\014f\222\305b'\367%b\214Y\002FI\010u'=OQ\224M\237\223\257\253\207\307)ZdI\316\373\324\354\004)\022\036\324\331\032@\236/\223\345\021\256\367\256I\010\310I\t\035t=\216#\325\240\343\214\030:\207D\2560y\354\367\272\376H\326\007\3006\237\344!\263|\361\310~\227F7\364j\226W\322{N\267\345h\252\031V\222\242\250\237\225\004}T\017\231\245G\216\216\375$|z_u3?\346\305D\332Z_\016\300I\352\314v\274\2377\007\007\365(B'\247\035'\021\271\336\317\303\026\340\3277X23/\275\336\301\235\335=\207g\357d\333\316<\003\275\257n\307:\361][,v|M\303\364\375\303\003\231'\254\277\267\354\375\277V\332:\303'3t\375\234\000{\r\267\017o\270>f9|G\334{\234\347n?q\320Y\374t\375\314\212\303hN,\313\335N\233\320\207e\366\337p\210z |\253\345\373\313\341\362\277\330>gH:\002\301}\\^\253VO\321u\215\357\362\321\374\273qZ;\254\314\335L\014\370\2426Z\027\252x\007\312\315A\231\337o\201\323\372\231\205\336g\267|\2231\313C\324\375\215\353\347\372\346kM\350\344\270\275\313\232\216\364\246L\271S{a\nqs\323l\326\224\252BJ\t0I\356\033L\202\364d9\2606d\322\032\032\3512\357\223\236\334\264\357\273\344\376\317o\325\367\317\237\257@\341\235w\336\033v\263UT\023L\323xr\365\210&Y\236\2612\245\351\0234\315\034\265\271\315S\032\247\010*V\267Y\205\0131\257\221\3016\367\212kf\354\334\014B\222\312\307\r\263Ge}]\322|X\257D\351\n5N\335\253\250\007\225E%\270\242D\245\025\303X\312\252\231\342\234]\033\221\013w2\361%\2061*P\264(`\210\263\346r\3433\026\336\247\326\312\317\332\347\305\250\305$\325\232\020~\276\236\205\343\243\355\247\346\247 \312e\016:\n\016>\217\255d\026\n\233]oh\351\353\t$\242}k\207\006\333B\272L\016&\203\336\264%0\202\325DY\024\222\310\231\251G\274\375\215\2679\206\022\246\006\330\313\322\343\274\273\205\363\216\207\256\006w\nT\360\324\337\006\r\034\251\234[I#\205\003C\316&\237\004\331\273\342r\244\347\304\356\344\030_\367\271\033\254\307U\244\036\326\226\327J^\330y\306\\\275\013V-\357R\334\031\360\205\352d-w\362\257\240\301\354\357!\241s\232\203\341+e\264U&8\361\275&\320\241""\221A\345\342B[\014\345E\014&\201\271W\0278\325\3632\"\032\034\210\021\331\252%\365\253\032\3219\253\242t\216\213Lh\263\201IU\276\003Q\305\2712x\t\036'\003\261\020Vj\n\334\267\234M\256M\264R\201Q\307&\023\256\\\355Kis&I385\247\303\345\020\002D\2101o\347\226l\250\303C\256\353kKq\216W\nh\024\244fU\351\302\210OO\241B\324\261\rR\323z}\276\204\346\230|\005\221S\033\252*Uy\26714)\027\201|uH\366\367\2752\260\377kj\355Wq\332\027v\271m\234\032r,:\010\211\326\263\371Fp\030\256gM\215Pl\036\220T\322\315\203\017\332\256\251G\033\256\227\246M/\177\272\3277\2324\"\014;\342\354>&\266\376\333\014\264\363i\313M\330O\334\216\016\254|\225\337\234\360\372|\374\2654\"\310\223\215P!$\310\025\274\344bq\232z\231\370\374y\374\216\333\377\316\261\345\355i\360g<\255\333\276J\217\2553\2646I\347\016\373\266\374G:5m4\310\035I\3118M\367\262\030es\250v\257[aT\257(\324\214\231\254$\301\231p\312\2625\243'$\24554\207\224\236\250a\245zZU]\311\216\203\205\225B\247\022\204\202\331\270\235q\306\264\342\0279W7\265\262n\255\033C\255\316;\231\263j\212\235\254\234\240\305\026\204\254\024}\035}\030\342\241q_B\306\270\253\314\276V\212'j\002\022I<7\252\242\305\373\351[\322\372\300S\277\323\240c\372\275\250\301\213\341\364:5\334\305j\362V\235:\231\216M\205\267H\037\031\301JC\330iU|\227\275\024\257\226\352l\277\360\222\363\005d\2567\353\034P\202\312\324\355N\313q\204\323\343\255v%\251\204\301B\322w\010@\351\345Q\322K\n,\217\207/DX\221\245\031l\333\260|\351,\314\223'Z\014kk{\326\267\311SF\305\305[[b\347\014\271\215j\363t\324,VJ\223ASX\256iK\331\241%NR\326^,\337\212I\302\033\241r\302\345\271\2565P\254\341&\276\265!l\nV\361\317Z\264?n=!m5\322\371\303\t \246\032kg\361\305\374\356:bS\025M\204\035\262\377\311?W\363$\237\377\027rE8P\220\236W\312\366";
    PyObject *data = __Pyx_DecompressString(cstring, 16783, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (18348 bytes) */
const char* const cstring = "x\332\355\275\311_\023\331\3720\016\335\250\210\240\2408\341\024\034A\021\005q\302\241/\240v\333\355\2048t\333Cn\221\024\020\311D*A\261\273\357\367.YfY\313Z\3262\313,\263\314\262\226,\371\023\372O\370=\3039U\247*\225J\354\276\375\375\335\367\363\276~4Uu\316s\346\347<\3639N\307f\322\351X2\225\321\263F*\2275b\371\202\236\320\223\251\354\262\227\030;\227\214eJF1\266\250\307R\331\244\376QO\306\264l2\226\315\025cF:\005\3403\371|z#\266\254\245\262\000\020K\352\211\324\242\2366b#\317J\231\027\033\261\017\005-\237\327\013\243\343==1\3703SX6\246\351\r\377h\245d*\027OjEm:\306\340Z\241\240m\304rK\261\245tN+^\233d\220\030\202\270\245\260\251xrq:\366u\240Mn\342\245^,\025\262J+3T\305\207Tq\205{\t\035J\247\364$C?\374\250e\362i\335\203\276\177\377~,\225\311\347\n\305X\266\224\311C\227\214X6\037\226\235\310\025t\230\232T\002A\022\031\037\010w\373\036\224\034/\300t\3452\364\310\216LMM\\\275:\026\233\034\035\327\214\342F^\037\001\0001\324Q_\005\351\\)\251\027\240\206Df\034;\274\021\307\276\217P\275cr\n\356\335\030\277:\032\213\235\211]\272\221\234\355q\307\372(\225\326\277\326\213/\n9\230\371\342Fl\344\251\3661\225\201\371\325\022\253zq!\365I\037%\270\027im\003\332\300\245LeS\305\224\226\206\254\344xlN\003\2640`\032\363\361\\\251\230/\025GFcK\251\202Q\034\247b/u\030y\262E\301T\266\241\334k\000\365u\353\205V\3202zQ/<\316.\345\000T\203~'y\241\214\242V,\031\3231\267\340\202\257`A7\364l\221\036\305\360\202\263/\236\272x\273\\\3205h%V\\\321\262\261Oz!7[ZZ\302\357\\.fd\240\317\000\316)\353)\375C,\231\323\r\032\233\3761\2373t\250\262\220J\352\006\014.QJCE\261\227O\027bi}]O\377\rH\036\216\302^\213\200jT\352\277\016{c\027cW\307\257\373\252)d\014F\340\204\234\2728$1\016\373\261=_He\213#K\247\335qN\307~\005\320\351\361\251\245\337O3\2507\375y][\375_\236\377\027^\223\377'-\000\315T`\0050-j\t\274\241\302\032 \260\177\021\262\261\\\026\310}\202\266TL\213-\212\255\264\242\001-\200q\344\262\305\324r)W2\2200g\364L\256\2601\016\245p;i\206\221Z\316\302\256\213A\341\344e\252\207!p\333\t Q\361\207B\252""\250-\246u\001\300\033s\251\220\313D\225]\002\006\005\314`I+\245\2131\246\\L@\346r0\345Y\240\030\002\220\030\031\323\013\234\305\330\005\221^\204Y6h\317{u3\030\224H\001s,*\334r.\227]\007r\244 O\214a\240k0\2259\230\234|!\267\016\244#);#&k\004i\320\345D.\277!1\366\325\n\314\035\374\325b+\251\345\225\313\200\313K\271BF\313&\364\330\272VHi\331\"\242+cr\202\333\325\013\362-\316\325\002\261\305U`T\234\030\217\315$\022z\276h(C\271\"\332'\332\034\033Y\334(\352\306X\014\037\264#\306$\306\342\007\257\367\344x\354-\254\004\320Cwh40@\247\264^\270\034>>*y\r:\260\236K%aL\300\023\304*\302k.\241\025Q\254@\031\002g\000\204\215\260M\353\r2\225\234\226\213(\222b\217\0370*\004\347#\253\177\030\361\220\232F)\366\375c\032\261\262R\232\017U\345\2724\316H\256\3208)\370\207\007,f~:\006\234\350\262\030\\\343j\273\325\005k\033w\253\363\377y*\370VZ+,\3531=\233+-\257\304\000!\334Yq\233\030\001\364M\341bl\304\246>\212uE\300R\336@\272\004\223;\332\204\242\001%\\\204\316\001V\321\240i\303\025u\332\235\276\261\211\342Z\312\320U~T\202\271\313\350\017\013\205\034\214\376\361\222\350\031\t\214\310\215\r\034\252\177\032\000\273]~\033A;\317\304\346\230\002\270\313\032\033\321\307\227\307\307bSS\343\023\253\337|\212]\276\037\233\272\005/~\362\345\201\337\013\305\013#W*$\3648m\253\342\030P\t\243(>F\003\355\253k\031\\Jw\222\r\020xh\246\rmI/n\370\353\3600\017:\343\256>\023\3358M\267\037\3367\341\276\"i=;\342\325\206$~\312_\224j\213\313\305\273\327\202D\304\221.\215\270\025\214\217\217\3737\333\230\322\3651\177\267\202\2634\347\242\"\2153E\364\336W\342\307i_\347~f\006\342#\232\300\375@\327@\374]\004\321\364\362\242f@}3/\036\007\010\251Kf\270b\343?F@\227R\3514|\"\026~l\233\212\376)\362\231\360O\227JM\377:-\035\321?b'\t\037a\302\364BVK3\315d\261\366I\n\350\tH\261\245DQ\220\203\205R\036e\020\256\020Y\240\201\323\343mb\\\315D\272\204\252 \317\304\345\330\002m\326X\201\366&\010\322\313P&rg^\216\315\246\200_B\307V\202\005&n\\^\204<\200\237\234\3027Y`\016\300\262 c%r@_\274B\006\014I\317\305\356\002|&\227\315\271""\3209P\374|\235\026\325?}q\r\353~1\367t\364\277\205\267\374\247\030G\t\326\367V\013\366\261\260\222+\245\223\310@\302\310\225\267\212\036\223\210\255\200PU\310\3452\201\001\346Ia\214\323rL+,\203\323i\313s\375>\375\\\014\261Ya1HY\007\357\357d)\241\273\025\370hu<\231J@\371\005J\343\325Z(\002\213\310\314j ;?\320\215D!\225g\221\002\245\224D\261\t\303\033\361Q\243\261\230\226(\226\264\264\257\227\260\365K0;\177\222\345E25\337\356\361\n\006w\316\177\005\033\031s\327\346^;\024\363/0\225\261\206R*\336\031c~T\202o\037f\374\207Y\322\022\326\235@\252S \254\324\020\271\031\233\260~\312\206\274x1\207#\036\271\360\352\341\367\257.P\037&\246&\256\335\272v\365\346\324\325\036\252\017w\037)<\311\244\230J\302r~K\0031V@\244\240\021 \327!\020Lax -\262c!\371\"\007\211\200\350\t\316R\013@iqi\r\212F\022\344\345.n\207\200\013\316\205\340\220\016\212\274\264\377\030\321\300\255\272\021=\263n+\004\320|\002\013d\326\302A\004A\004*\307\346\036-\360(a5\347\304\210\025(\226[]\213\025`\217QD\td:\326\000\344\326D\274&\013\375k\001\302\006\2056\340\344T\265\001\273\256\245K\2150\257_>\241I\207\235\036\326s\312\306\322\230\017s[\\i\003$\244\036F\327&\215p&\263\226\265\222^\362\301\350YJj\206\360\313z\221\033f\"1\035\226\005\364p\331\337+\314\312\260\225T\242\023\362L\025\304\263tzk\254\346\303\304g\233\014\313\200\352\022\351\224\236-\206\364\n3\013z\026\r\252R\022\016f\033\304\360\302\312\026\265B1\274;\234\305\375i\230C\243\230\3137+\0069MJ!\331\324\025Ig:\366\000\t\255\347\036(\242\240B$\026\370r1\225e\361\224\255-\017\364\365TB\227\037\252{!\305\326V\226\211\037f\362\200\275\306\212\226\327\231\033\263\342\273Q\\\311e\307\211\233=\004>\\\334\020\025=b\323/\222\353&\2244\004\202q&$\303'\177\205\344\243\355\251!7\210\365\214\360^>\242V\222\007\257I\323\323c\372\205\346H\001\007\331\003d\373\021@?\003\346c\364q\243\255\211\227\206\205v=\311\022\347b\203\021\373q\026\266t\n\355* E'h\356=\022K+&!2 :\217\241}\033\300\240\227\027\022\027p\345.\300T\243\t\354\302Xl\031\332\223\300\274\030\3508\301\016>}""\374\34013Xl\231M\024#\260ub\223\327o\360\332\217\336}J\264\373\r*K0\276\247%\022\324p\006\260\360\303u\332\007!6{\002|U\200\r\360L\377\200\240B\037h^\342YN\025\274a\262\rm]\177\226\313\302?\330*\264W9\037\262\212\330\325\342\337k=\226\245\270-\262\265N\307^56|u\374*vib\374jS\373\214\034@R\324O\315\376w\373\254\262^\237\311\350\354~\307\251j\351\274R&\347\336\325\361[\\\3073\024\010\310\212<G{\035\251BRO\247@i\200\335\005\2322\262\333\204\353\305y\361\360\305\345\251[SdF,\350\357\001\215\r\330\037\213\211\264f\030\254\314.\226Ri A\254\335\216\243\300\276\221+\305\262:o\312<\300\251\005\212+@\274\221\324\302K\354\002Y\203\211x\305\321\300\226]\276 \250Sj]\307\322\217\264\264\241\217?_X 4\214\351\250\023\340\006y\236\307\336J\215@\007\355\362\271o\213C\206\330\265Z\"\241\033r\317?\367\251}\312\206~\001\242\250+e1\212\257\024\310\032\210\335t}}\254\017\341^7\376\262u\031YW\234\371M\234*dMC\230E\250:M\230D\264\354\206\354[n\021\227\240\205MdL1\242\214\322>\006\002\330\303\272\002\031\202iT8L\321\357\327\206\276TJK\361\022z\2040FB\317B\247sF\354\303\212^\320\245y\2028\0214\003+Dr\177b\245\224]5\204|\245\027?\344\n\253Wpl\3224\301\375\316\347ri\030H\001I{\t\215OZ\242\220\203u\311\224\000w\362$\275\340\n _6D\311'D\361\244%J\342\323\242\000M\312qE\031\267\305\364\272\326\007e\r\375\346\007u1P\274P,\020L\221f>\337\242\335hGp\353\\Jk\320M\201u\364\021\033\221\356\224\246\204\312\335\005\t\340)@\331x\271J\204\337\243m\252\3228u$\226\266\320\243\335\211s5\323\210\031b\245\360%\254+9\222\374\272\n#\223_\007n\324\233\247\256\336\276\341\257\360\303\n\312\217\204\\\261\351{$\020\304q\301\342\002\307F\204\265t\272A\263m\272\275\330\354\350\016m,&uU\324\332\251\245\321\237G\033\t\265\257\252D:g\350^\035\014\376\242\220#\"#8\240\240\034@<=\025\345o\265\263\226\240\2058K\266\177\223U5\317#ty\344\177\326\254\332\302E\245\014\322\335\311>\275\257\301\226(\234\220q\t\360\327\035Vd\355M\353 \364$c\r,\371\177\301\324(=U\300\266\241\027\006\211\037\260\037@\3444b\027\351#\301\"\034~N\261x""\350V\345\301\252\346AQ\232\321\021W\327\007/\253SK\270M\270\304j\362\177\311\353\205\374J\250n9\037\353\367:\375\006\225l\257\204\334Y\310r\332s\207\311]<qur*&,\341R\362\344\271\372\233\214\206\324\340\305\330$Y\0131\310\310]WeMQI\316-\215\204\212\203\341\276)\205*4\261\034\212-\025e7\244\331\030\363a\304\275\311\321\360\231\373\\{\340KT\362\204\036\317#\246M\374\360c\021;\235t9vso\377_t\363\353\242\245\270B\347\221\321\010\"JL\207\027=\330\203 \315\223\263\245!\231C\006\033I\344B\365\037\350\014\367\000i\034\314\2017|I\335\302\272\213\2548^*\244\025\352\326j\267\343\250\\\340p\232\325&\261\222\265\321\2544R\2560\357\372t$\341b$\201\325\212\263\373\244%Eb\354\t\241KB\374\300M\334\214D\275\"\243\007T\"\034\0268\22211O\3641J\301(\270|\260\240\354\305`\004\307Lo\270\257\204,\215\370&\367\240\037_\220z\005Pe\374\263\010\037L\361g\221\275vc\000$\316\001\315\210D\256\323\2248\376A[?\035\351\304WD\2776\251\350\337G\016\033\226\263\311 I\262\014\247\217rz$\025\224\273<\232\032>\020\270\220\315\241\254\025\363\023@l\355\347\340\0324\364)\231\242\340\250\021\331\201Q\217^J\217\021\313;\252\035\364o#\223\301\311\022]\370\377\205J*}\361iua\372\\\010m$[\255\030\300tl\001\277\260\037\302\020\235%\272\342#:b\254a>\331f\244tN\221\0367\274M\321<:\351O\220Q,\262\222K'\005}X+\351\006\322m\321\265\361\317\242x\242\320\377%$\257\205\365N`\226_\355\375\263tP\006a<\235\035m\223\350\341\24391SW\312\337Cu_6!fbdc\261\253H\316\256\242\2411<\340\3503\351\227\322\013V\216EC\\\355\002\320\000\341\215o\032$.\"\016\330`\277P\324\363\261\014l\0224\304\0034\002x\026\373\327Y21\240\326)\\\205\240\236fH\253 \303\330\370\375\013\243\343\261\216\257\264d2N\236O\244'^T\177l$\235\312\352\261\233\267o\335\032EU\352\352\3076\302\270D\241\333W\257\217\266\353\244\027E&&\240\235\250U\022p\327\257\337\030\215\266Z\010\300\033\267\247F\303\205{\0010y}rrT\250\\r\373\341:\027c\"\021i\005l\324$;{|\261\312\242\212[W\247\246F}q\344n\306\304\315Q\227\007\217I-\363\n\213j\243\211\034\020{\362\205\030\343\332b\342""\256\242D\343\"0y\270\037L\226\341\276\367\335\365\314\222\017_\304\010Lq\224\000\357g\326\272\212\030\027 c\004F\274\210\000\3067\016\026\020\266Na\201\037O\252\3163\35240XD$\235\320)R*\220K9u}b\32456\007B\024$\314m\230\037!\254\214\210\227\345Dl\004]<\313\344w\303\245D\312J-rX\217w\376'\266\002\344hQ'RJ\354?\031\030\254\\\343\2537G\201\204R\327\223\210\376\024st\367^\354j\203\007/\233s\243\264\3430$\214\375\211\307c\311\022\355\240l.{\271XH\255\247\200\306\307\343\t\364\272\306\343\001O\202\273a\256\337\036\025[\354~\320\233v\365\262L)`\030\031%H\036I\376*\237\233\327\320\323K\343<\321\344\366\034\243\004\241\255\363GA\034{a\345:\301\021\343\213\272\022\332G\322\305\013v_\010\2138\205/\244\022\253\030eE\265\240_^z<\321QE\211B)\305\335\303m\345\351d\316\237o\311\215\000\303E\"d\325\022\344\004\304\300y\243\220\270\342b\341\225\204\226O\215\3477>\336\345c.I\337\266hL\213\221\247#,\337\237\n\235 \372y\277\344\322F/T\205\304\r2\364\207\344\262\273\021k\024\007o\306K\305\245\313\267f\026\346\036?\236y\375uA\313\257\314$\223\317rI]|\315\245\201[\315\271>O\303M\006d\225\357\234\213\205\310\262&\222\037\244\214Dx\316\327zq\356\305\353'9-\351%<\316\252\255B\302S\355c\003\020B\314a0\231Hz\354F\r\310\004\303KJ\272i\317\201\227\273\037 {da\002\3057wm)'>\025\310\227 \247\242\273\323\355\023I\216\356{./^_gS\301^\274\316\303\364\353\201\303\021 \340>\003\364\364\247\302\230\224 ;\177\336ca\310|\300\224!<\363\231\376\301\037c)^\330\005\343\317\362W$\022A\220N\31717\013+\243\034)k\232A\363\347\313l\350\325K<K\346OZ\010\324\214\022=cU\310)\273\2604\267YL\307\205{\375\362\211\373\215z\023\237\3103\002^ \177\033\234\026\326RC\216\257=\316%t\361'\221\177g\026\371M cA\327W)\3519\221\024\245b\024\276\232\347\340\211B%w!\254\034Q8:\310G8\032L\003\\\365N$*\257\343.\203`\006\022\217\3733a\3150\026 <\033\275\314@\016W\343 \311\343~\nd\201$\002B\237a\250\351)#\216\2647\000\r\352|\222\030\260\232\210p\3527\035F\244\322\030\302\243\346`z:\227\313\007jUOX\372\322\335\031r\023\304\364\314#k\232""\021\204R\331\013\224\256\356\035Jx\310\201RA8\300\374\347^\233\224\344\255\211\370\024\355\311\223\236\276\217&K\242d\207/\212\013\200s\357\205U4\346\371\326\305\227#Xp2\236,\261\n\026\001\302\202\216\037\000D\231\270+,\243\254\343\317N\031q7\010\320\237S(ei\005\375\251\030lB\222\220\304\014/\307;\003\033\310pgZI\022\365.\350\005\214\2211\370\000\314\302\006\350\316\231\005\224f\036?\360\345\213\205n\016\020\244\025!\351.\245\220yAZ'\017\353\312\370\241\260\023\274ain\305\230\2560?\231\364\222\224\003\337\261\336\206&\302\372\242\362\260\271\031\240\220\211U1\017\342\0139v\251\000\272G\361\025\310\256^\"\356\241\2270\237\"\005\260_\274-4\344\3216p\337s\3719\020\222\024\272\026\370l\334\007\215\000\r;\241\001\004\244\354RAG\255P\232\327\222\r0H?X\312\003\0056\230+J\311\335\357\n6\370E\001ULD\324\224\005\264\314\000g~\230N\247\362F\312P\315\372\214|oS\305\025\340Uj\206\250@MR\226]M\026\214NMB^\247~/\204\227$\267.\005~Q\260$\367\305\373\226c\200\004%\276\320\203\342\0303\020\0169D\320K\n\202\370*\302\004\014\024\204r^\220\232\227\334\000\013\030\024\254\237\0051%\025\303P\n\017I\266}\232\003\274\315\241@L\301o\331d>\227\362\rE&\301l\276\324\227@\3700\324\324\205@*6\001=}^\220m2\030\347~\344\263?\301A\223`\373\"WP&\324\345\343\217\201\016.\353\005\271\032\276<\016\026n\314Z\210(\266\020Z\214\370\215\277\007\364\305\3027[Zd\242'\2247\244\313)[\000\"\302O \263\276u\223)\376\251psx\322B\023CJP\363^\217_\255\024J\236\232\321,]\351\246?\343Q\212;\355O\2254\326h\314Zp\263\274\000J\"Q\030+\347K\313\345\203I\033\260\251\225\335\257\320A4}i\005\177\236$\010\376T\244\243J\312c\343\005KFJ\332\213\202^\310\245\323J\312BDK\013\241--4\264D\203\364}\347\362>\302%\346\230BE}\031HDP\037\363%\262\352\326\010\254\014\374\325F^\017\346\275\322A\221\t-E\211\244\344\371r\20004\202/\2044\"C\\\245K\231Z\242 \327\206\010X\\W\312A}E\350\203\220\343\315\215\374r;\001\272W<\376b\343#\374{\220\002\216\361L\377\210\024D\346cP\356\270\027\237\253-&\264E#\276\016+\305\347\241\310\016%\336\227\264""\244.^\321J\242%\223(\226IE]\330\0001v6\233dc&\026\000\251'.\374_J\"H\271\376T\264{zon^a\231\346\025\236|$K3\026\223\034u\252\031\033\331D*7\016R\023T\226\312B/\213@h\026K\320\023\224#\275/\202.\305\227q\262\342lrMz\t\t\264\026\304\275\020iC\311\001\234\362\276\030\202\n\263$\347f%]\n\325$7\257V\204Ri\"_\212\243\022\341K\004z\340\357\032&f\264\217\341\320\324\022\317\211L\366$\"/\311PR\223j2z\013\324\357\002\033\031\334\244, \203\373\316\243Z\312\271)\276\322\005\"\230\376\276\223`\253|\345\362\356G)\033\322\321\022\031 \202\221Q\350c\213\243\211,\230\261D\223\005\250\034\314\300\251Iz\366\211\246\241V\356\2524\017\305\2126\272\267a\222\017\202\004\332\2140\317\267k\301\017\302\tu\211\030m\310\211\325`\022\251\250\301D\243\241\016\332N\256\3219\350IQ\276\033\233\027^\226\020/U\023\207C\224\037\242I\234ccr\223~(q\241\321~\214\310\320\347\306LC\327WE*\235\310\341\367\025\255\220\374\240\201,\217w\013\024r\033qm\031\324\330e\244\224|\374#\000\306\230Kf\360\270\210tj\005&\354\304\021p\244\313\005rJY&&\230(\324\010u\302\224\345\016\313ec\256/\037\215$n\266^\244\213Z|\000Fd\365\306JN`\246b\367\226\004\2441\031)\211k\227\217\007\271\217\222\345\333n\234$\316\212\205\000\303\356\020\355\250\251J'd\202l\336\020\212r\234\317\373\304\rR\277\343\006\352\337.\306\273@\242/-\240\032\361\326\315B;\022\014\026)\014\025\016\313V+\017\3447nj\234M\305IG\004U\023T\206h\241\241\344\022\317R\210\344R.\220\271\004r\001\210\020\320\006\222\224`Q\367\324Q\263\364\260*\275L<\247\031\314l\030\213;\233\374\241p\230\200#2\3343\251\244\342\\%\330t \306\023\310\014\033N\370\004\373x\335\242\226]\305\275B\247\250\350#m,\3223\203OC_\004D\302\177q\370\213\301\006\213\251\"\207\231\to\346b.\227^\314g\030y%\027H\212\027\234$\361\212\302\031\222\252\t\374\231\304\237k\3703\205?\327\361\347\006\376\320F\244\227\334\322\022t\237\210\233\027\332&Zq\277\311~\346}2]\346o<)\221H eHhH\222\023\253\022\337\335\357eeNqh\276\014B^t\276\273\251\260\033\335w#\024\202v\246\362\225\313\373\335\304\376/)O\372\034\306""\276\017\005\202\216\\\322\354\270\037|YFB\313\027\3218\003r*\364\312@wh\234\3149\211%E\200\244\225\200\224\214\226-\341\266\200\022\005\374\004\351(\rO\224f\340\221\373\220\245\325\203WB'\203^\212+\370\0004\222`t&W,\277x<\325\362\342\r\357\273Ck\221\370\204\026e\216!\237\336\322\305\343t\266)\036\227/0\363\350\226\305O4\246\360\257\340`\t\364\247\242\344^\004\335C\307)\240y\346\311\206N\323\263\240/\361\013-h\272\224\311c\026^\302\201\377\374\343\007\332\341\322\017\205\220$\275w\243\264\210\202\272\227\340\373B\001{)\265\354\315\2622\337b\376<\t\036\215\271\240\206\276\302\333\273p<2!\215\035\2417CJkb\325\205\207|\342\206L\247\017\262\345\n\264\220\342\221zY\010J\247\236\373\036\035\247$\217Kq]0\206L*\231\212\273K\204\n\323\262\256fa\000H0\035+\024\334\233\363\305\030C\262\215b\322\007\242l2Da\3747\201?\223\370\023\347\223\316\364\232/\026\350\211\324\202\327L\212\025\204t(D\343?\272oC\221\250\225W\231UTnO\242W\212\221\021o\300Q\351-K\r\270V:\345\325\200\221\320\246\341\021\361\357\343\007b|4\245\342=\225t_\014\371\306M1\227\243\016\361/\022  \032\350\277t\343\024\230\005\363\354\261G\335\237f\010\2358I\346:\376}\216\3734\351\r\017\261\222~H\207\"\001F:\037\364\264\236\201\251\3273\213z\022\307\312\241\017P!\214\\\027v9\371\004\r<\314\324\253\223=\217\177yhz\266\224\241#\217t\250\220~\014\214\267\364\244P\031}\251Df\207\205\212\010\334\301\343h(~G\304s\206e\251<7*\006\267Y\220Jd\360JX\246\321\242A:{\016\031\005\215\354\t\354\335\241\034^(zelW3\221\304\322\013.\241\373\022_\201n\300\027l\353\347\245\342\014\272\227\231L\270i\2630y\344\007pS\236\276\232s\337\311\274\346~\275*e\365\227\034\354H\207\346\350\007\310\241\261J\304DP\024z\020\227\021\035\346\333m\270\004\277\247\222\342\000v \220G\214\207c\206=f,\022\000\206f6\276T\312&\342dN\021\327\303\302\"\262\257M\350\334\200Mq\216&\211'\261b\227C\2237\354c#p\212O\200\307=\001\247)\210G\216\033@\310\232\200\215.\241\240\332\220-\244}\202\202o\317;\350g\r>*\250\002I\372\354*\034\314\216\326J\320\257\342F$$\032[|7\035!""mlY\302\177\277Q\353\"0\321\334\210\"\256\265,\341;\247\322\272\010G\273\221\310\244dG\314\201\310\212c\204uT~:\367!*\033\346#2\033\250p)\023\t\221\312\372\375\301\312\027S|w\214\332\272\226J#\215\005\\\201bh\225\364Fm4/'\276K\251dK\030\240\361\320\255u\2759 @\254 [\3126\007!\311/\272\271L\251\030\321F\310\360\232\003\203\306\002\030R\000j\351\312\200@E\342|\306\241y1iP!1K0\264\346\320\342b\324\002o\305\346p\3539\020\013\201\230\223\345\337\003cR\354\256\243\273\326\276\333\267\232\201\023 S\310f ([d\360\210\220\033\030\320\014R\334\361\022\276y\025+\224^\310\244H\340\017\344\212i#\276\034_DHwB\033\253\362\001\3230JY\027\211#a\311\300\014\362R\t\267\010\220l\216k\200\255\023U*\005\002\3572\240\215\033\240\036\t,\350\266\230\010V\t\333)\2009QpH\350sy\214\270\00113\n\260\004\030\245'RK)X6Ji\001,o?\211\273l\274\335\002\3151\250i\021\271\254Q\360$6C\251\325,(w\341\200lFD\036\357_\323&\320!;\204\024\366\260\375\021Q&bW5\224\002\234\002\222\033\017*\372-\212Q\257@\360h\017\030-/>\032\026\n&U&\020\324\201\371\265\000n\271\244~\310(\364v!\025i\262\025$\313k\250\303\264\202$U\274\335\231\"DQYMBK\2544\333E\376R\004\331\002m\275\232A\302$\255\t=&\205V\320\031m\031\004\257D.\267\232\322\003,\272\t|+\032\033,! Q\375\306\371j\033\032\321\260M`\222\033p\334\355\301c\247\343\245<\031\306<\251\265i)d\032\033\264\314|\225\245tc\204\027C\377\001\257\032\343%\256\264\313\302\002E>P\214\231\237\330I\354\313\242'3\237P\344+\327\346\257\0106!\256\203v\n\250.\t\017^\230\360=\316\313:0\254\271*\307\005\241T\323Ps\250\254o\351\203\271@=A\tXN\347\026\265t+(\352{+ \236\021\017\312\265\2357\260\365 {\362AJ&V\210\006\315\346\232f)\212\013\312{h\332\021A\244\361\324\022\031\037\223)U\276m,\010\370SJ\261\037 \004\314\347\203\210\340\272\341\005\204\235\220\354K\344\306o\253\024\336H\254\243\n/\211\201\024\314\232\026\017\343\276A`2\261\253\310\204\263\243\212#\004\240\372\246\244\311_Zv\233\202\362\316\014R\1776\365\207b\236\222\025@7%'\210c\234\305\226\317\300\326\014\000\021\204\227\343Z\276q""\035$\005@\337\201\3214w%g\360\2625\205`\375\242y\r\006\310\234\331dD~&\217b\200h\202\205\"\243\264\274\214\264\214\245\3170K\216\237\337\006\030yd\001\201\212\237S\204Ma\r\222E;\315|n\251\006#x\313\"^Z{\343\360\231\267Dp\273`\001q\305\234\204\344 \233C\243\203{9L401\253\0260\370_w\350d\276\303\270\277@d=\005\256\220\331\233\355h\214\275\023S\213l0j\222\025\317\026\362\331\250\374\246\3317\233V|3\272\336\233\r\325\256\307\371.Aw\271\363\302\311\022\006\"\252\342\213\311C\000\310.\017<\275iVX\303\371T1\261\002{\231iw03\227\336\210\352\022\305\312k\231`\227\204\312F\236\002\244'k\245\206<i\267#do\222\211\3448\220%\034\027@\033\262Ii\256S\262\263\271\200%0\220'\014\216\024\037\337\220]d\275\273(\244 %Opp\237\021Q\311F&\202\014\230\216\3217v\212\243\361\005B7f\013\r..m\365\315\262%/\n\311S\345n%\373C\001&\301\255\327\025\343\032 <;K3\210\342\n\212\230n\226\\\005Bj\211\271\3539`\244\023m\300L\206\303\220\353h\362Vx&pw\375c\323,`\374\341y\245bJZ )S,\244\340\177\256K\250I\276\224=\033\262\330c\022\236%\342x#\213{0\321]p\001\333i\220\017<\206\302\344\212+z!4'P\250\301 \231\014\311bW\227+/\007r\311\215\305\376\346\306\334 \177\n\344\242\345\26219\274!\240s\310.\0323\362\320\003\241\356\3733\360\177\027\204\316\271\206\312F\010\2623\002\005\210\000aj\026\230\230b.\001ty\"~\2651qRI\204]TR=\367h\315\227\273\323k\252(\375\310\030<\032\222\312\216\237\270\020\n\002\231\031-/\371D\223\\2\033\205\346}l\236\227\3126\315\003V\037\226\2146XNW\275\307LX0\240\230\254\027@\032\361t|\024X\023\210\202\313o\374\316i\244\300\304\353\232\224\303\310\215h\000$4\r\231\334\027\3321ZID\351\204\346\272R\024\266\021\rQ\304\260\353P\220\214\316F\216\306\214\020\337~s@\325\323\337\034\252\240}p\255*\r\020\331R:\035\232\341\306$\205\346\226\0145\203\372\301\271\245,\006\357\204g\031\240\344\024rtn\r\343_2R.\360\371\312Y\022\325\262\n\257\n\311\007\225 \235KF\3030\276\206\003\320 \\\365&,S\321]B\263=\325E\036'\014=@\030rd\020\223\274\3120\026_\225\330\2139v4x\027kG\301\343\231A\327\352\324\014\010\235A""B\236\213\002\023\266\"\251n5\0033r\351\\\033\265\221\036\007\323\222K\227\344<4\005\245OV>\010\316\037\323\210*\202\261\022\307`\025\366\212\005\363\021\031\0257\025\0055\206\301\255\247\026\245\2318\254H\034\203\022\3704\035{\217E({\222\220V`n\262\341\210':8\361\024\005>\337\000V&\200\217\257\000\3235R\200\177\313\331\\AOe\320MI\365\3625<q\364\215\273\014\230\3022H\305\237\240\337I\325\231\353]Q\350\275\221!\250\361?\320\021)\030N\3131\347n\3549\266!w\034}\024SYY\251\357\252\r2\t\313\363\017\252\321\320\037\366/\242\375\275\263\314\352\301V/\364?e\270\321\273h@\242\200|qs\207\270\276\343\375\252\276!\203\316x\375\205\202\210\001\006\244\377\211\2608\344%\356!\351tn\031\376\202\226\210\330\237\316}\300\331\207\207\234\374\264\261\030'{a\334'\215\370\314:\344\216@\206\210\225\342S1\313\342\247|\002Ot\331fF\317\340E\262\202\336fRx\2233\322\230\t\030\232_\376\215\27302\327\247\330\271\311R\235\013$d\335oOus\223\210}\251_\210\342\211\\&\303\305&\233\367d2\244\033\223\276>L\252\035\230\014\264>\031\320\005\231U\tS\006\305\002\251)\"\364\307\247!+\345\024\271X-,\366\004\236\251a\201XMm\204S\033\021Id\350h(J\347[\200\2346\244\321\355f0|.\223\322\r\025\202\004\030\354\013\1777d\2054O\351^\244|h\226\327\250\0103S\2410l\274\261\377\342@\214\232\301R8\307\204\201\\-\317\200\262`%\025B\265\207n\242o2|\251@\017q\261\014\177\216\321\230C\341d83\271\202\3277!\346\252 \342\360\214\\\352`\226\322\013/M\231\035/\242\2579\024\3537\r\000\234\314\251~\205M\305\243\260\376\005V\217>y\262\225\205\014f\001;(\3401\210\\\336\315\211\030Hs,h>\266\300\240\004\261Gf\242\214\307\247\032c\224\006\220\210\017@\226=iQ\354tu\243\253\2472\204\371\315\345\315\301|\037A\r\346\241r\027Lt\227XI\343\023\037\241m\030-\372`4+.B\246\002\363\341\247`\"[\234\254S&\223\322\225Cw!Y\3566\n!\202d\252Bn*\276\320\030\024 \033^b\000\033\225\\\261\221\232\245\207\026\344\377\256L\031qP\003\215\310RG\025\314\303\323\033\241\031\356A\n#4\233\263\024Y!\024\312P*\021z'\274\224\220%\247>J\3634G5b\002I\322\210]\214a\024""\375\304\361\004\210s%\240\177H\00096\201^\2129\021\236\344\326b,f\214\345&\032h\023\0053\\\253lT%\325\360_\377\351\003\021\246\324\000 \345\340\206\014\224\231}\211\236\204\345K\316\363\251h_\232\321\252e\243Y\313FX\3134\017\201\024 n~MHF;\223\000\037\246\202\221t\345O\227\007S\303\312\370\225\004\240a!\371\244T7-\315\252\004\211\303\201\\d\254a\245\214\3606\271\"\342\306>u^E\031\017\306\247\2667\207\360\224\341l\226NP(\277\204\320\364\006\2746\233Le\342T\216\013+\353\340}\313^c`+\037\250M\006\256\261\013|\312\335\200\335\300\177|\267+uJQ\025\350;\353e\271\026\237l\036R\347\202G! \355\251\226\307\207\030\202rI0\275{\307(\304'\005B\343\273*\004\272\342\203\314\020/\304\032\361U\nh\336=\332\312=\265\374\212\004\205\336\370\314\030\276\n\002\351\253]pU1D\274\020\025\230\213{\375\211\260:\neXDHR\203n\330[\316\020\372\257\373\302\024\007\331\0223\"_p\255?\322\026\245\207\306\330[\031=\001\024LyU\265\0225Y\375\326\201k5\376\177\250\3624\020\257\t\346p\256\n\343\213\314\243\331\243\037(%\236\331\245\034\277a\237yz\005}\307\016`\344\273\250^\327V\275\200F\370\004\335\327@\325\330=\224\224\007\255Y\247\037y\024\21583\375\314\342\342\254\026\251\r~p\365\200\355\214\361\371\034\271\355\211\023\343\006q_D\353\264\332\374\313\371\342\225\326W\340B\234\256\004\204\217\365T\256d\310\247z\0041)\254\312\202\277\213\307\034qy:@%\032C{K\222\036\324K7B\"\351\263f+!\002hg\314\025\\sq<\277\361\0216\210\236X5\000\027\351K\330\034\360\225\0047z+e\351\262E=\3760+\341\3269\310\010\376`p3\323\016x\313\026K\031:L\312'JSI\344\000\204\251\023\364;)\376\023\031\3343\302B>'#y\335\3331\033\356\032r\023\364\217\370\2724\001\377\240\246e\\\331\002j\353\270\230\353B\345\226\327\253\322\234\340\214\027\326\365\244\377\2762\370\302{\027\341QJ\027\371\027\267L\201.k.\340\346\311\313K\260\204$-,pJ\010\266r\035\026Y\2379\025\003!\2049\016\357\266\004\262()\243\217\256+\227\244\321\275I\202\370\372/?\202\017\0315\341\335\255\024\017\271gI\271\200K\275f\215\306\210\223 \215N\202\330\250\377\255l\343\377>,R""\310\020$\336\221\240\213WQ3W\344F\003yaA$?\031\205\204\254\03697\2131\274\346\312\335\3374\006&Y\256\3139)\022\342\274(\260\274y!<!\255\021\2570\353$Y\t\016\202\262\000,\031\007\265\370B[\334\377\"HH\351\2005|\326\321(-r\254b2\265\2362r\005\371m\210h\025/\256\003\367\205\001x\215v!\277\005O\371\217\335\220\031\253$\225\231s\034G'~\311\273\211\244F\211(\301W\030m&_\314\025\345]$\374*\220\215\030\266\"D\360+-\214\313\007\245\017In\"\372_$q\010%iUc\027\322\343\007\030hC\3016\210j\260\241\241.\266\202\225\ni\370\213\223C\213G?\310E9\342\227\272\305\253*7\230|z\334X\374/\270\250\335\341\321%\244\014\037\377\335\371\307\221\216\035\303N\354j\245\323\231\230\251\rlw\355\372\367\207\315Dy`\253{\357f\332\034v\216AN\345Hu`\253k\317\346D\003\370V$\270\323\001_\177\014Q\211\353\225\371J\272v\261>S\237o\247\0204s\301\322\2407\316\256\023\346\202\325\271\325}\3009p\036S\272\235\356\243\316\321Q{\320\236\267W*\332\026&\034w\216\217\331\017\240\222c\325\031J\030v\206'*\203\225y\347\306\243\032\203\0149C\027\355\263\266foT;)\341\244sr\334NV\206+\367q\324\373\235\375\243\366\200}\2612S\231\3079\370T>P\236\331\352\336\267\271\206\235\272Q\036\370w\347\266\230\201\235\035\023\223\330\277\303\345%\363\2215lMlu\0351w\232K\326\214\005C;n>\260\276\260\206\361e\006@{\366lu\367n>,\037,k\345\265\255\336\376\362\216\362ks\330\234\330\352?\004)\206y\316\\\267\346\255\204}\300\236\265\227+/+\353\325\371j\242v\2406[\323x\262\367n\376bN\230\337Z\313\366\273\312\332\326\311\021\273\257\362\256\272\006y\2034\255\023\225\001\030\302D\344\262Q\357\305\302\001\27439[\033n\265\316\333]\027\234\013w\2520\266\230\023\233\302Yi\272j\010|\302\374\305\206N\264\204\335\346\025>fN\374\321M\375\001\360\255\356\335\362/\314\031<7\007`\342vt7\257A,\207\327(\"\227\026\335(\314\300\371\216\035\375\316\276K\366\304V\367\220y\301\031nUj\307vw\177y\267s\364\212\275V\351\005\304\352\206j\266z\017\302\002^\260\006\254a\350d\337\021\3470\242\315\360V/\340$LW\365[\347\321/\316/\377t\376\251!\344[\201 \275\3736\213eZ\363U"",\271\325\333\267\325\177\32098bw\332C\225[\325\273\265\265\255\301\023\346\033\353\246=\014#\032\0342\307,\315Z\333\356\037,\317\224\347\267\021\013\267{\350\035Fq\250c\327El\322\236\300Y\332\t\033\243|\303\034\300\007\214\353\210\t;\0051k\335\374\021*?\000\233bG\345uu\030\026\262\3730$\316#\310NSsK\r\226\037\231\303\230\367\273\365\310\276T\371\251v\264~\336y\361\243\363\343O[\335\007\313?[\347\355\335\225\343\325\037jK\365\307\316\3537X\272\317zc\337\255\374V\273]\177\344\274\204\261\306q\331\236\332\207\234+_U\177\253\337v^\275s\336\275w\336\257\342$_\266\326\355_`x\033\316\2137\316\233\244\223\324\261w\031\353\006\014\373nu\243\276\263\376\336\371\376\007\204<\217[\\t\355$\356\245\255\356\230\265\323\322\334\307\t\354\373\301\362<\016\272\2271\324[\377\033\025\r6\307\347\256\177\253R\377\235\353\277\277c\307\210sa\272\n$\346\214\305\303\277YY\253\356\251M\324f\344`\366\227\257\225S\246\001-aY\234\262\203\345\347\326\004\314\352\316\376rg\2316\371\255\362\264\211\365uw\234\275S\035\376\343.UK;\376,\300u\r[\307\354G\225\363\325\316\352\300\037=\035;\316Zw\354\305J_\365e\225f\354\267\362dy\036g\354= \\o\314\352\264\006\266z\367\227\207\235\003\274\251`\300ke\254\033g|\0302\273\366mn\230\235\346~\347\330\270\255)_c\366\214\373e\336\006\022\372\306\236\260g\266\273\3669\373\260\326!{\302\031\273[\235\251F\221\024\354\352chv\021){\357\346S\023\311]\2777\036\244*@\242w\231\037\000\221\000\372\000Rj\234\224\317\354\033\315\365$\220\333\351\352\367\265\371\232\026A\021\377\330\333\261\343$\242\347\037\275\035;\3668=C\260\311\272z6\307\315N\032\032\3160\320;`\016\310\037v\023\315\203\2370\262\007\373\346\255\363\366{A8\201|ow\215;\343\337\326\241\276S\346\232\373\363\253\215\370\210\024\365\036\314\025Vy\3029q\331^\250\354\002\024\207\352O8\207\316\003\2339\\\351\224\215ERY\314:\n3\206\314\211\346\2148}\021\360\037\000W\315\001\023\030\310\016\342\3118I\200\316\275\304q\017T\276\206\t\357\355\333\374\031\271\355\031\373m\00537\347\341\007j\334\335\273y\263|\006\360\0060e""\314\324\234S\310+\276\257\316s\326ty\001qi\260\374\304\332e\255\331\235\333\275H\242\366\233H\346v\367m\316l\316\273L\014V\325\271\373\254\256m\267\332\361C*8\222\032\347\207w-%\234\317.\004\354\310\351\000\370\355\256\276M\337\016\335\306\035\272\005tj\036\267\020`\033L\226\375#n\251\246\250#\320\022$\035\353Wd\354\221\200@\0071\177\243\374%\322\376>\247\217\267\314\255\312\315\352\245\032L3N\340a\332\233L=D\345Hv\216\005\3304\354]ZQ \017\370\263\317\\\263\272\020I\017\224\277\002\n6e\255!u\336\007\353\322e\317x\274&\204\250\002\372U\265\377\023\211\352^\247\357\022R\233\373U\224\274NK$\300a\215Xc\266\326B&\201\315y\001\027}\2646\361\307\311\216\035\003@fO\321\324w!\305=aj\346\232K?&*Oj\235\265\343\365\371z\264\320\302\202\333I\037\303\337\263y\3119x\336J\302\367\235\nuj\237\263\367\224Y\004\352\376\235\r\244\240\307\351\001\351\312\234\203\005\354\201)\354\352\336\334\261\371\272<\314\334~\017\354\262\371\362\2629o&q\302\366\227G@\026\2354\343\316\330?j\273jk\365/\352g\353Z\375\177\220\251\273\231?9\243\323\325\013\265\201\332\351\332\203zg\3758\210\001\330\352\240s\340\254\365\300\356tFo#:C\263\210|HZ\343\225\231\320f\323\002\221\240\346\313\320\273/\254+\316\304\303\332O\316\374K\347\345+\347\325\367\264\323V\234\225\224\0071\346\214\243P1Q\237\255'\235\227\013\316B\334\211\377\223f\301\3519n~\353\234\277Y)\nZ@]\0302/:g\257W^U\007\234i\"\221\324\255\036\347\342\235\352Tu\315\371\007\022SJ<m]t\306\356U_\325\006\234Y\220W~\304:\317YO+\003D\220\001\275Q\370\337\215\374k'Q9\300\326\255\336\363V\2722\034A\307\266\005\263\335\215\373r/l\017\023\350\302E \314C\256\250>V}\017s\030\2556M!\353t:\376QCY\217\271\3106\222yd%\375*\357\350\206\205\026\202Q\024I\027\034D!\030\237\312'Q8\330\356\356\333\374\th\371\270\335S\271R;\350<\302%\330\352\035p\006\240\r\353\235\375?\325\225\332r\375GL\354G\341\361\255\344\233\335\314\t\366m~2\017\232\213\326\227\264\305n\003\355\277]\373\032\026\013\365\036\334\000\334\324\220y\315\324\324\246.U_;\263\260\340\257\225\246~\255\216\324.""\324\217ab\377q\330\337\027\020\341\211 \r\342J\020U:\210\022G\177\271\007\345\325\203\345w\300\367\344\343\2509\004\364\240{\000\332\232\300\022\337\232\270\205{;\216\237\370\343\276;\203\260\204\330\257\323 ,\314\332\231\352dU\014\345\327\362E\"(\327\254E\273\323\025i\220\000\177\252\034\002\301\252S\0106\327`\333\316 \037\370\025\220\223\225\266\375\366\204[\340\002\320\306\276\312\033\240V3j\001D\241=\233\303\233\023(\226\230g\201\014|\202\241\235er\362\271\262\321\317H;\230\010`\215\337\201\376\0108\336\267\031G\001\207&X\324\212B\201'V\320\217 \332\255\225+\2262\020(\206\242\005L\004\276\017\231\242&\226Yz\366\210\226\200\313;\227\277\001\234>\352\274|\355\274F\305\301\371i\331Y\246}\354a9\022[\251X\222\330\356I/BHD\262=\2605\2126\205Q\020\370\266F\201\016o\215\302\356\341\237(6\250\010*\3412J\223\272\251\346m\240NMw\363z\371eyM\225?\006\005:y\335\007E\331\242\255y\204 \305P\302\244;u\346Q@\177\017\033g\302\025\320i\2774\027\r\003\313F\363\271\353\337\377\"\231\311\225\361\235\301\263\336\026\375\r\232\320\230\361\377\"\333\351!z\346\332#\266{\201_\236s\316\241\200\035\257\317 G\375PN\300J\367\263\322\325\177\322\304\305\037\030\0042~\334Z\200a\r\002GF!\346M\345^\255\273\276\253\276\201\304\341\310yk\311\376\232\266\0070c\340.[\203Ppk\020- \335H\r\357\233\007\000C\211\"\236\264$\"\250\022\372)$GlH!)\2358\345-\020\224\206j\367\2046\332\322\372\300\243\376T\036(\237\007)\273\371\262\203\326\2675:U\231\303\255\275\315\273\327\034h)I\262\340\t\314\333\271\366\260\326\302\202\325\000\336\246\234:\t\354!U3\352\027\200%n\t\275\316\271\365M\275\333y1\277\335\302f6I\234\351\357\331\262(\035\361h@i_\213\322z\006\025\300OL\316#\240y\222\200L:S\017j3m\312\345\002\374\0334$F\026\271Un,\344<A\001\242M\033'\025zTk\255e\014J\360\312\363\332t\204y\323\351\000\030\234\314s\316Y@\305\352z\355\207\3722\210S\316\233Eg1\001z\202s\002\245\335G\265K\316S\264\225HV{mS\354c\251q\263T<\343\332\333\310\300\263-T{~l\267\226+\345(o\222y\250k\304\031\231\255\ro\365\260\214\212\203b\321\007h""\244}\017u\226\246\224\022\t\344Q\347\010o7`3\367\204Y\022\323\217\201\324\235\300\344C\316!T^\201I\017\370,\242\373\313\027\200T_B\362\035\"?\261z\300\357n\227\241Y\347\372\343\026R\024\261\232\213\316E\020\243\332\264a\236vNOUxR1\3650\220\207\026+/\313\010\315\033\005\341\317`\264\302\212\311Ulu\215:\243d\177\027\224\3570\320\327/\353\023\333-,\251\240(\341\254\234tNP%\273\376\375{y\266\274h~i\336\263\277t\245\023\363\024\312\351_\203\200\277\307Y@\311k\273\353\234\365\013\340\353w\3255W\201\375\2635]\260\376U\231\257\254\326<U\230f\321U\205y\301*?E8\013\234\256\243&\241\327\024it\275\375N\377ik\370\337\212\353\000\355\370+\240\232\254m\267\224\234]4\241b@\347Z\221\316\353h\361\247\356\302\2648\347\256#\232\020w?m]\262\211\231\236\267\346\005\257g[\263\224\277\243\244n\300\273\032e\234F\303\310\376\212`n\315\345\024\022t\231k\221A\245OZN\266z\017\343FiiF\221\002\313o\226j2\t\214\2119\272\212\2551\353O\231\204\232JZ\324c\224b\3323\374\3647\010Y^\217c\326>{\255\322\271\325\006g8\207z\337[\364\376\034'\335\267\223\326\n(\316V7\212\330$H\265\311a@@pn>\256\017I\004o\323\263\"\212\265+J\020\370\323z\273\262\001J-h\037wNNVF\252\303\255\\h\000\216&\014V\005\254^\373[\330\240G\353\303\365\033\244m/D\331gP\307\352\"\\,O\225\311\354\323\205^\231\201\362 \362\237C\345\244I\222F\037\250\037\353\346|\200\312F\233\324y\360g\2353\010\366\251v\270\336\203}\271\373Hj\231]\275\233s\233\037Q\253\001\310\343AH\022\003\0018U\377\344\374\220p\022\031'\223U\212\340\240S\3255WgVEt\320\375\266\273\016\207\010\350\221*t\243\220\276\237\265\331\255.P\\/\3317\220\311m\221Fx\206y\263\334\013\333\312^\330\273o\253\027{\322\213x(vu\213=\321\027d\217\027Q\254w\331\243TF\206\310h\305\366\256\233\325\213\265\231\255K\327+?T\337\203\\\0163\364N\314\266u\017&\177\250z\263v\261\376\215\363\212\03467\320\332\363\311\231\007}\237$\217\340w\303:(u<v^\243\014\005e\234\177\274 \331|\325Y]w\326?\370K1\326*\002, ^k#*\300\343\372\355D{\344\005\264\375\"\336\035*\027P\020\020/\014t\334'h\036\346\372[m\n(\270""\r\235\234\341\2119\356\034\273\311\270\372k\3714\260\272\204y\314\232C;\247\020\261.\333\363dgG\227\026\210\311o\210,!g>\206~\026\257\303\252=\036\255\360{\0255\004\251\372w\250\213\203PD\306@\242\362\273\321\276Dn7\246\371\230\207\357s\3455\223T\222\024\275\340~\222D:\302\230\337\304o\020\240\"\307\345z\240\267\356[K\263\326\355\371\0266\315\336\315G0\206\235dK\031\362\212\243+\003\177Z\233\021\3168gn9\267\000I\346q\276G`n\273\216\2219\177\307n\247\373(\213\022w\235\273\010\300^|\3639\032`g\235Y4\271\263\037\337:\205\221\006\263\302`D\216|\264y\240\377\2369\331N\022-a\261\354\325\352\000\020F26\222'\241\217\261h\000}\213~M\006W\361x-J\032\024\003\006@tG\276wF\246\253m\014\370N\365vm\206\204(&@\240)\013\212s\316b\247\014\361\"\037\315ic\355\206<~-8\300pK\226\030#\375\317\0346o;goV>T5\362;]d\253qe\243\366e\355f\375L}\2016\016l{\335\321\323N:\0235#\307e/\234\351'\365o\2357\232\243e\235l\316\311\345\333`\221\275D\252@*p:p&\317\013\0248\3061\023\264\366\337\241\323G,\3721{\306\236\027\253}\311ze\017\330\243(@\321\252\257R\344G\026\325\237}\233\377cj\346o\3664\010\240K-\234\204\356T\002SA{\307\273\332\007v>\317>A\232\366O\347\237\240\002\027\234\202\341\247c\024\201\0217g\314w\326\007\373=\240\303\251Q\373D\345}\255\323\351 i\275\317\351#]\207\353&\355\332\333\327\023QB\007I\334D\217\234\016D\224!\037I\033\250\267\344\361h\274\342\342g\3217\351\252/$4\355\252\254\265\220,fX\340\376\227s\002\375v3\350-\"F\367\0018\374\270\275\257R\000\025\244\253\366\0148\264\004\375\315\274o\037\260\375\220cV\256\362\022\360+Y\033\253kn\235\346\317\366\031{>\262J@\t`\201\010\373\275\265`\357\000\342\326UyV\273\342\314\263e\030Jn\203h\272\033\026\373\227\352W\365\323\365\007\316\013\340]+\316\n\306\026\240\017iW\271\010\3759\202\242u{\265]\260\212\366\375\352)rrd\235\237~\376\243\307\343\264\206y\005\224\324\336\203\345W\346IXh\r\315\375\2561\014\004\007\342\275\334\3140t\n(oe\340\217\376\3106\211\255\233\304\260\017:\203h\177BI\000\267=;\307\201@\341l\335\"3\035@_4g\234\023h\026\240""\"\203\345\257\254\263V\266\"]p$]\003\003\372\026=4\"\030j\321\376\302>\213;\201\276/ \357B \353\245U\240i\233\020\"y\227\375\254:,\003\250\004\277\2416\234\003\227\355y)\243\010eC\274\n\327X\243\316\357\365\3209\200^?Q\344@\371:\321\334\315We\305P\260\3674{\352B\312\022E<P\276\r[\353\245sj\262r\266\222\255\315()W\345l.8\013o\235\267@\240\200\324\2549k\005\027\306\334\340\221a\205\207h\341\344\004\314;\347oT\322\265\341\332\304v\317I\362\2745\014\203\334\224bU\025\315\223\020\245w\363\211\271\307\202\227\263\316Yd\025\203\350Q\017V\300\026\230f\025<3/[\320\352Y\3539h\331\017\252{k\332V\273]\020x\343v\003\255%O\234#H,\260C@\200\253g\253ju\375\345^$\236n\275\024.\021Y/\365\016\353}\346\014\301\032R\275(~\276\252\236\254\255\371j\336kf\354\300\372q\315\304J\317\223\351\330\025\206\200 \n.A\332\nj\255\310\245\211\315E\020#\224\267z\254ai\277=b\036\3042{7\265\315_A\360}\010\373\022\004\246[\346u\253\263\355\324\033\300fO\237\301\277\021%\326p\277\2773K\326#t5\037.\177\262\016ZKH\336\224\327C\240\000\354\300\230\224\255^t2]\267w\332\032\306\273\364\330\347\354uPQ{\321\331\244[7\230x\210\312\334\020%aD#n@v/x\023B\010\350d3v\274:\323\234\343\3160\006t[\235\342\225p\000h\320!$[\260rW+\275\325\307\265\227\265b\375>\212K\356rn\311\025\306\215q\306\032\265\247\354\1779\367\346\303v\022\002^\264\236\n?\227\240\335\337\223\245\037\326\374\2229/W\242X\276o\035E\232\216\006\375A&$\274\331\205J\203o\270\333\231~4\020\202^4J\016\222#\202\260\352=\267@X\365\020ci\260\257\207\313i\347\364Lm\177m\252\366/\3475i\"g\320\272\364\256Z\000V\253\032\r\017;\207q\232\006+\277\240\177\000\206\006\002\372\317\316\317\244\334\270t{?:C^\331'Ah\355\037\304\360\247-r\3753\241\200\327g\326EX\342\376C\350\230v\316`/\222 \355Olc\355\030\235\200\364\347,Y\235\212\316\002y\216\377d\325\017j3\265W\310\321q\014\317MV'Y`8\345\234\204\035\344\334{^_kmr\353U\024\021\222\00612\341\022\nJb\003\336\255\262\341\215\004\n\361\006\375b\353\026\212\242\n\363\032\354\330}\336\242\345l\306\235XIm\306\237\210\341\330""\273I\005n\306+\004%\332\215\241<7\315\341-1\263[\3750\203\007\340\027p\006\177\266=V+fL\032\317\372\206p\364\270\367\370\341\034%\226\203N(g\354+D\013\372 .F\231\267+\263\030}\006\357\350J\355eo\025\226?ai\333\201\346\221>\2057?\213\254\003\233\037\374\223\335>m\035w.\377\003\204\354\273\365\2023\377\023\n\033\220\0323\177\307`\266\331\352j\235\240\2169CW\210\212\364_\262'\355\227v\241Bu\376F&\006\031\326B\275\036E\372r\270\274\001:\344~\353\266\375\210\"\203\000\364Ws\324\232\260f\255e\020>:\031\007\347\225\222\373\313\303\345;f\n\326\351\013{\244r\006\351\225\250\3049\203F^\357\353F%\303#>f\016\363\362-Z{`\252\373A\026\2273\335\217\202\310ikfk\360\034\371\030\007X\\Eg\341n\220\320O#\334\357\365\031\367\333~\\y[\375\016c?\231\366\274s\336\301\036M9\251Ug\365\243\363qC)x\257\032\257\317\3263\316\217?m\367\037#\307\267\375\223\210\341\250Op\303g@^\030<\270\335\177\212D\252\276~ Iw\315\337\3559\\\027\264T\375f\335\305\320\356\352\376\352\315\332\031\320\355\006\321g0h\376d\037\257\374\000HK\003\340=z\234z\3377\000l\363\271M\364\250\027\303\307g\304\033!\223\313S\361\345\033\013\367\316\2763(\313HAp\257K\006Q\344\030%\307\207s\000\221N\210 2}\273{\300\031@\033\315!2e\302\036\271N\341Z\252|\310\202\230\275D,x\240QRxT\323j\350'\0071'\216\356\341\203\342\341\034$\241\017\203\236\234\221;\030\322@\037\324\033\312\334\250|Q\031\246wRK8:\212\003{\207=\033\025FW\300\356w)\367\274\020c\302E?\350\306\221\362\357\330> &*\224S\366\332\347\327%\267\212$$\024V\026\004\002\201\242\026B4\001\357\220`u\237\306\260,\216\352hf\263\006\275s\347v\367\221\020\347\024v\351.Y\226<\311\010V\212\243Dv\367\340\336\300pi\266\275c\004i\357\020h\3237H5EI\377a\365 N\307V\3571\2226z1je\330-\305\221\314\220w\017$\206\325\352\361\332\017\365%\347\025\031\316\210\030-\301\346\020\261\326d\353\350\245\020j\37377V\232\270\037\010\032}\366\033\347\332\034\320\221\r\347{`o\250qo\365\236\004\251\354F\345\244\033n\315AS\034n\375N\206f#\325AP\214\245\226\275;m\235\307E:\313\"\217\377A=\307\325\225:\021\r""\244o\013v\334\272\365=\240\347\"\222\030\254h\004\026}\322\236g\3722\355\206\005\205\026\304\220\225I$qX\3602l\001@H.\370\225\010\362\t\013\232:K;\016\275\331\030\035r\024\215aG\033\274\331\03472n'\234\211'\365\231\372\017\316\033\230J\234b\214\023\014\370\261\017@?\361\024\t\361\3309\024L\245E\027#\220\036ap\235b\310\245\";\304\216\016\251\036\010X\332'&\273\207:\016\227?\210\020\037\302\333\031P\244XY\007\204\375\343\"\342\251\2619\014\314z\177\331e\357\003\"\232\3562p\000\203C>\367:{i\245\354\260\250\333m\241\310Y\252&\005\302'\311V(n\303J\032\324\033`\347\2606\254\002\254\371\t\016jP\002\255\321\377\303\252h\250=z\313ou&\225\007\245\301\001\371:Q~`\366Z3\352\347^K\223\2377\310o\353J\274?E\204\276:\035\263\316,E\252\r\251A[\333]\310\363)\310[\306m\301\312\037p\366_@\033\346V\367\031k\2224^R18\350%8[A]s\330\247gv\252\032\345N\244(8\031w\312)\nA\274\300&\017!\r\343D\354#\215\202\031\357\212\235q\356|W\277\347|\317a\024?K\200\265\362\036b\343 \367\237B\205c\240|\334\234\027\013\206A\301\236{\317\347\343k\341\0308\002\350\265j\037\245=\365\026\004\t\325e~\227\242\301\302\205\202\037\005G\236aA\234\247\232\342\036\207\304\021\222[\346\244I\341u;\320\033\207\232\312c\230\017\264\026#G|iS\322\014\224\253\215\326'\3340\250h\353&\2072\2656\233\202\270\20556\034?\230\005\222\203\374\313s\234\342\312s]\207\315\316\006\347\343g,3\007\010q\354\341\232s\225\270\321V\363H0\224\250\2162\325S<\022\375\345n\264\327\367\nw\314!\241\354\261\010?a*J\237\324\374`\266\307\234Ks\265\t\347\001\207\242\322\370)\370\205\375\345\017:I\253\026\376\332_\355\363\225\235\354Qc_t\267\352\213\366\005\213\265\343\301\335\356:\343\234\271F\344\230h\035\031\367M\203d:\365(\307!v\016\370\017t\320\031\017AsE\263^t\232\027\363\200?\207\350\354G\364\262\337)kb\270\227\204\367\360\234\365c\245\247z\236V\242\353\274\265Z9Q]\002\305I\006\255\223b+\333\034\022\001\272\334\336\tT\n\333\260\243\307:v\2340\037\360\351\002D\263'h%\3053#'\314\3272\342\264\337\351GQ\251'f\355\265\265\355.\220\034\020\217z\330""\265\271\315~\277\t\314\336g\023o\332)\021I\320\336\203\030\234\375\2364\254\317\n\024V\003]\002A/\177K\267\275\263\033\177C\217\217\370{L\321N\242o\274\203\303B\007p3\376\0002\360#>\255\026\301\216\326\313\363^\344\376\320\237l\3139w\263\362\261\272A\321\330\177oc\244\274\2354W\254\024({\034 \334v\203G\310o\002t\325\272h\177]\231\006\210\263\343\366\2628\001\n\275\271\340\234\377\272\266\346|\203\226\017\344\177\353\233/7\013\345\003\345G\346\031s\336g@@Y\372\022\2368 \363\001\035\022:i\276\267\367VB\235\200\"\276\214\310\3237u2d\311}\352\205\354\262\323\355\004('\277F\307\024\250\307i\267\375a0\315hy\240\356\346\244\331\245\306X7\323bq\022c\030\273y\302|l\275Eo\022\355\021\364\347!\261<*Pv\323cPb\345D4\250\214\035\221LM9\230\272k\240\315\370\272\277\324:\006\255\n\372\332v\233N\307\343\372\000\222\013\340\244\244 Q\327\2112\373~\224\310aQ\017)\230n\324\334\2703Nq,\320\rR\371Z\235\346\375\216%\002/\230wMe\331;\243X6P%\373[\264=\324\276\253\257}\356*c\273'\275S\3044Z\212|'\021D\0144\312\203&:\356q\240\005\226\271\317\243\377\200N\023\2364\227q\001qP\037\320\"l\213\340j\234\276]\346Z\303x\350\234H\237?~+\222\254\016\224O\230\213V\247:0\222\227w\356\372\343\211\313\034\261\315q\233\016\221\201\2762l\035\246\220\217\t\014\323\003\312\216\274r\250z\003ue\372\246#\005\360Dkl\027\210\237\342\314\221\0102w\006@L\2622\374=\204v\262%\014\247|\341\274\020\201A\316\256!I<<!z\310\031Bf\321=\304\262\245s\3766\354\315,\372\271\274\244\233\225_k\227\353\353\024\320\372\326M\007\252\267V\351CW\207\220~\257U&\374\363#\004\340\226\262/\232\301\216\nu\262\033\215\310Z \030\346\244s\002v\275s\347)\307\340\266\033\277\310h\0330\246\272\226\006Q\343;\347\355\222\263\264\3342\204\354$n\372\247lc\245\230N\020\366\004\207P\030\366\026\322\340\257`g\t\216\334@\003\244\336\347\013\3735\007|hv\322\324\255\373\225h\356%\217\270m\271\034\345x\363\016\372X\230\257=\224\236e{\225\341\266Z\214\236\2130\252\327\320\324\261\026\234R6\345t\215\330\335\225N\366l\r\013\277:\031\277\3578w00\210{\"H1\350""\026\3160F\0177\222\342\300\370\235\243\244\027\004\370\270\346\251k\034Q\326\014i\245\346\274\347 u\222\375\365\324-\250V\274\001\233\363B\3249|<\342L\240D2\214\246\340HI@^d\345x@w\273\253\327\351\245\241\307\274k\025T\261<Z5\330!\034v\244\262P\314\237\371\006\217\353\375\273\323\r\216\225\215\265\274pA\364\023O<_R\216W\302\0048\227\240\006\247c\304V&@\306d\r\311\343\313\316\375g\365\025y\354\271\235\010\377\343\3161*\306\221D\237\025\320\205\002\\\263\255/\353DE\031M\323\355\205\217*\245tG_j\305\203\000\\\235\nV\003\273;\316\235\307\243k#b\306Q\025<K\366\341yZ^<\375\357*C\203\233\363\2330\210\363\226\326^,Q\267\027\257\350\311\033\336\264\243\345\261\255\333AD\317\304).\016*F\232\206\275\"\303\370_\017*&\264\336\341\232\326q\343\241\232\323\356\221\362\273\345\2229\203\316\247\273\346\032\213T}G\315C\320\343\023'\335\277\350q\371D\347\223\372\217\230\275\326\327x\375\300\326\3001\366\301x)n\301m\357\204:{\210\032\316\250\367\"\363\036\017\362\356~\344\276\273\320<(\314\216\222Mc$\037\261\204\317`\335\335\030\335\005}6\177\2423\210]\203\345\257\321\nmQ\314\220+\332\321$\266d\363$s\370\005\231\366\270\375\232\217\307\377G\271\273\220\212\266\331\304\342N\356\226\224\374p\303\016\303D\0036\236\001\354_*\317\221\361\353K\214\334Z\303\350\345\362+\230\236\007\326\227\3265K\263\212\260\202\017*_V\246*k\354\335\364\000\276@\277\022\035\246\026\356z>\270\357]\245\200\276\272\210P\254\366\342\245\245\005\264\017\224\232tD\360\266\n\227\253F\035$B\372\2655\nb;j\210g\254+\034\211\334p\200\250;\372\000\221\300+>\250\336HX\006\024\333\222\253\204|\356\371\"\222\237\230\334\266>F\265w\3635 \310\367dy\004\346q\276\374Ey\230\251\362\001XbT\000\200W|S~HV\206C\001x\316\331\017\033\341(\232:\371DK\013\240\220f\021\342\033s\026\375&M\032\371\316,\220\215\354\245\275\346\252\350\030\3504m\277\255|\013\374\344\334\025\373\003\206\010r\361\263\326Wte\310\333\332\267\365\224\363\2661\300\3724F\213L\323If\030\352m<\275\354{\271[^#z\213\347\016\231G\223~\343\022V\277*\367\274\276F\\\320""\223\024\234>\214\033\221LX\334,\2014|\214.;\330\332IAZj\302\031\274*\306\3518T&\364\352\337\374\025\335\t\346\314VK\375\023K\340i8\364\035\243k\266\305\331\r\227\331\236\206\325\270\3008\354\032UH$jnU!o#[U\204_\265m\023\316\237h\r\375\254\177\312\206\343t\000\343\022\222\001\037\203\032\302\023\362-b;\351\010\347 \205\027:\373N\223\357\033\335\250H\010\007\312]\316 (\250\250\261\0026\024\235c\227\3557x\206o\0336+\335\2431\214QI\0171\342\001Ofq\3328h\214\030\255\322;d\236\003^\210\365\007\374B\005`\037g\321\016\250\366\270\335K\333\304\225\005l0 \031\303\331u\224\230*\372\017\320\276\337\373\377.\261h\270\304\342\200\263\377\014Vf\357\255$\253\303\325\353l\372\226\215\272Hx\316\374D\327\265\274\251NV_V\215\332\2603\367\232\017a\360T^1\2070\234\343A\265\263z\252\336\331\344\036\014\020\304\337qP\345L\345\307\032\211\346c\345\367h\345\032\2445\036\366uh_\345\367\332\034Enlu\035,\377\210W\301\240'\227\353\371\3319\215\226,z\377\301\\\205\276a\323G\361N9\272\265\211\201/COG\353 \233\0345\217X\203,\267`\231Q\364\300c| \275\3376\277\263>\332E\320}\036\363}\014\377\351\213=\302o\373\350\246\206H\312\"\025\245\311\365\037;\275K\010\217\23171\010\227\002\212\350\250\373V\2670\262\357\005\032\202\307\255z\025\253\272\3753^\300S\323\"/\027\210<\352\352\022c\344\312\024\217\324\222\1772}\207\315\353\\\001V\341t\334\307\240\377>\345\332$Hp\276\212<\210#\014zTRJ\370Cx1\217{D?(%\320\245\034m\250\036L\322\372;\366\2344\027\360\\\305nX\213\016LBB\203\026\001\373\267\352t\344\245Z\312\001\317\355\235x\305\335\232\320C<y\r\336\252w\330\224\331\216t\002\263u\222\274\365\207+=0\242\341K\366u|q:\364?::\226:g\276\200\307\314\027\263_\3741\"\016\326\363\225\2160\3165$\275\354d\227w\322\235rN~\005(\177\031\003\276\200\0200B\366\341\361,r)\207\036\230\244\276I\327\033<2\254H N\364\242P\371\255\371^D\330\365c *\006\177\335t.\242\025\305\375\236v.\243\255\326\345\210\024\014@o\354e\336\224!,}-.\272\230w\245l\247\003/\003@C\321\031k\230\002/\202\307H\344i\233Q\365\3169\357\312\000\345\030\356""\341\362\212\274\030\363\210\331\215\227JP\330B\363[11\310\346\232\251[w\360n\317\212Q=\2037\316\311\272R\256I9P\001\214\320\374\322\274N^\356\341\300\247,\374\236[\307\216\364\310\340\212S\346\357h\334\305\315}\332\302\313*\002\365\242Ho\230\227(\276\340Xe\246\241\247w!\375\000\206\343\265l$\254\356;\240\343|A\206\207\306\031p\245\317\360:\207\311\027\333|\032\351F\034\262~\364\243\345z\321\356\224\013\323\013\\\225\022\242\252\307\343]\335\221\253$o\262\301c\036\3752|`\020\230\266r\3125\254\356\310j1j\352=][9\207\301\220\230\320\tR\304C\274\006\320\236\211\232c\014\027xBw\025\266F.\232\332\355\351;Hz\302k\343\013\333\232\327C\232\036\306\254\203z\231\244\260\212\301\223(\214\200\0060o'\244#\365\026\335\221H\326\207\002F\210)\025\240|v\020\203q\350\246\024\240\254\347mq\227Z\357\346\235\362\252u\204\325z4q\335\201\3150i\315\263\"\360\2535J1\010]{\034 \244\253(\324\234\346\000\374\273x\354\233\210\363\035\276\353\263AMhu\343\305ah\367\2200k\004\206\016$\256\274D\007\264\276\264\257\331\213\225= \000\317U\213\265\311\032\311\267\231\352\204\377|\241\2708W\306XEG\177P,C\03799]&v\005\2032\200\353q\317z\235=x\212\031\004\314\013x{\214rO\003ZGP\364m\305\032{Y\317=\351\036\014g\373\250\210]\360\375m\357\332\006>\025{\027T\217\036\020+\207\320\244H\301\347\327\277r\276z^\377\225n@-9\245u\277\246\267\227C\332z\202g\363D\210\003\260n\373W`a\267A\366\372PO\264<\252\255\272U\261\212\275\233o\361X\2519\021\345X\rk\004C\347\267\242n\367\330\337\350~\363\206\323\335d8\301\303\206\363\365U\347\007\226\311\".s:\206'\261l\322\372\247\313o\321\304E\3029\307A@\255\024\361\252\234\257ky\316N\032U\366\211\013\007#\340\306:v\034r\016\242s\245\007#/\337\362\265\025\333\036\353n\352\204\211p\212\260\322\366\237\274\361p?\3540s\276\335\213\017\017\361\355\254\301\373\017\245=\310\347\2619\355\032\223\344\335\302\256\352\313\326W\274_\030\003a\305O\364Q\366\320\320N\274-\353\317\310|\202\302\220\201\231\216 \037\302@?48\2646z\237m5,:\237\377W\307\246\"\332\276\326\367$\361\335\026\225\2016N""\317\366\253\321\027!7e\261\334\233q\026\210\006E\237\341\225\366@\237\365_\030\023$\317\000th\3053\234\216\303\345\217|'\341\316\255\236>\021v\362\300\374\002\227\246g\363L\263\004\266\342\271\t\373\313\034\230\005\342)\221\263\303 \267M\362M\317\357px2\256\363\023\020 C^\374\367\221\244.\014Oq\366\020r\377\265*0\272\006\204~\250\351O\327\322\267\371\016]\rt\276\035\217\013x\247\260\377b}\250\347|d\303\340\304\363\377\017xj\353\322";
    PyObject *data = __Pyx_DecompressString(cstring, 18348, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (60189 bytes) */
const char* const bytes = ": All dimensions preceding dimension %d must be indexed and not slicedApply gain in decibels (NumPy wrapper).\n\n    Args:\n        audio_data: NumPy array of float32 audio data\n        gain_db: Gain in decibels\n\n    Returns:\n        Audio with gain applied\n\n    Example:\n        >>> import numpy as np\n        >>> import coremusic as cm\n        >>> audio = np.random.randn(44100, 2).astype(np.float32)\n        >>> louder = cm.apply_gain(audio, gain_db=6.0)  # +6dB\n    AudioFileGetProperty (MaximumPacketSize)AudioPlayer not initialized. Call setup_output() first.AudioRecorder not initialized. Call setup_input() first.AudioUnitGetProperty (ParameterInfo) failed with status: AudioUnitSetProperty (PresentPreset) failed with status: BPM must be greater than zeroBuffer too small: Buffer view does not expose stridesCalculate RMS level (NumPy wrapper).\n\n    Args:\n        audio_data: NumPy array of float32 audio data\n\n    Returns:\n        RMS level as float\n\n    Example:\n        >>> import numpy as np\n        >>> import coremusic as cm\n        >>> audio = np.random.randn(44100, 2).astype(np.float32) * 0.5\n        >>> rms = cm.calculate_rms(audio)\n        >>> print(f\"RMS level: {rms:.4f}\")\n    Calculate peak level (NumPy wrapper).\n\n    Args:\n        audio_data: NumPy array of float32 audio data\n\n    Returns:\n        Peak level as float\n\n    Example:\n        >>> import numpy as np\n        >>> import coremusic as cm\n        >>> audio = np.random.randn(44100, 2).astype(np.float32) * 0.5\n        >>> peak = cm.calculate_peak(audio)\n        >>> print(f\"Peak level: {peak:.4f}\")\n    Can only create a buffer that is contiguous in memory.Cannot assign to read-only memoryviewCannot create writable memory view from read-only memoryviewCannot find default output AudioComponentCannot index with type 'Cannot transpose memoryview with indirect dimensionsConvert audio data directly into a provided output buffer (zero-copy).\n\n    This is a high-perform""ance variant of audio_converter_convert_buffer() that:\n    1. Accepts memoryview/buffer input (bytes, bytearray, numpy array)\n    2. Writes directly to a caller-provided output buffer\n    3. Avoids all memory allocation and copying\n\n    Args:\n        converter_id: AudioConverter ID from audio_converter_new()\n        input_data: Input audio data as contiguous buffer (bytes, bytearray, or numpy array)\n        output_buffer: Pre-allocated output buffer (bytearray or numpy array).\n                      Must be large enough for converted output (typically 4x input for upsampling)\n\n    Returns:\n        Number of bytes written to output_buffer\n\n    Raises:\n        RuntimeError: If conversion fails or output buffer is too small\n\n    Example:\n        >>> # Create converter (e.g., 44.1kHz -> 48kHz)\n        >>> converter = audio_converter_new(source_format, dest_format)\n        >>> # Pre-allocate output buffer (4x input size for safety)\n        >>> input_data = bytearray(audio_bytes)\n        >>> output_buffer = bytearray(len(input_data) * 4)\n        >>> bytes_written = audio_converter_convert_buffer_into(\n        ...     converter, input_data, output_buffer)\n        >>> # Converted data is in output_buffer[:bytes_written]\n    Convert audio using callback-based API directly into provided buffers (zero-copy).\n\n    This is a high-performance variant of audio_converter_fill_complex_buffer() that:\n    1. Accepts memoryview input (bytes, bytearray, numpy array)\n    2. Writes converted data directly to caller-provided output buffer\n    3. Avoids all memory allocation (except for internal AudioBufferList struct)\n\n    Supports all types of conversions including:\n    - Sample rate changes (e.g., 44.1kHz -> 48kHz)\n    - Bit depth changes (e.g., 16-bit -> 24-bit)\n    - Channel count changes (stereo <-> mono)\n    - Codec conversions (e.g., MP3 -> PCM)\n\n    Args:\n        converter_id: AudioConverter ID from audio_converter_new()\n        input_data: I""nput audio data as contiguous buffer\n        output_buffer: Pre-allocated output buffer (bytearray or numpy uint8 array).\n                      Should be 4x input size for sample rate upsampling headroom\n        input_packet_count: Number of packets in input data\n        output_packet_count: Number of output packets to produce\n        source_format_dict: Source AudioStreamBasicDescription as dict\n\n    Returns:\n        (bytes_written, actual_packet_count) tuple\n\n    Raises:\n        RuntimeError: If conversion fails\n\n    Example:\n        >>> # Sample rate conversion 44.1kHz -> 48kHz\n        >>> input_data = bytearray(audio_bytes)\n        >>> output_buffer = bytearray(len(input_data) * 4)\n        >>> bytes_written, packets = audio_converter_fill_complex_buffer_into(\n        ...     converter, input_data, output_buffer,\n        ...     input_packets, output_packets, source_format)\n        >>> # Converted data is in output_buffer[:bytes_written]\n    Convert fourcc chars to an int\n\n   >>> fourchar_to_int('TEXT')\n   1413830740\n   Could not add packet to packet listCould not allocate AudioBufferListCould not allocate audio bufferCould not allocate audio buffer Could not allocate buffer for packet dataCould not allocate buffer for property dataCould not allocate buffer for string conversionCould not allocate memory for note parametersCould not allocate memory for property dataCould not allocate packet listCould not allocate parameter list bufferCould not allocate recording bufferCould not convert CFString to C stringCould not create AudioUnit instance: Could not create CFString from nameCould not create CFString from port nameCould not create CFString from property nameCould not create CFString from valueCould not create URL for file: Could not create URL from file pathCould not create URL from file path: Could not create audio file: Could not create audio input queue: Could not enqueue audio buffer Could not get file format: Could not get file lengt""h: Could not get maximum packet size: Could not initialize AudioUnit: Could not open audio file: Could not set client format: Could not set render callback: Could not set stream format: Could not start AudioUnit: Could not start audio queue: Could not stop AudioUnit: Could not stop audio queue: Could not write audio data: Data must be int or bytesDestination index Device index Dimension %d is not directEmpty shape tuple for cython.arrayEntity index Failed to allocate AudioBufferListFailed to allocate bufferFailed to allocate output bufferFailed to allocate read bufferFailed to create URL from path: Failed to get device at index Index out of bounds (axis %d)Indirect dimensions not supportedInput buffer too small: Invalid connection parameters dataInvalid mode, expected 'c' or 'fortran', got Invalid shape in axis MIDI data too large (max 256 bytes)<MemoryView of MusicDeviceMIDIEvent failed with status: MusicTrackNewMIDIChannelEvent failed with status: No audio data to saveNoneNormalize audio to target peak level (NumPy wrapper).\n\n    Args:\n        audio_data: NumPy array of float32 audio data\n        target_peak: Target peak level (0.0 to 1.0)\n\n    Returns:\n        Normalized audio array\n\n    Example:\n        >>> import numpy as np\n        >>> import coremusic as cm\n        >>> audio = np.random.randn(44100, 2).astype(np.float32)\n        >>> normalized = cm.normalize_audio(audio, target_peak=0.8)\n    Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.OSStatus error in Operation failed: Out of bounds on buffer access (axis Output buffer too small: Parse buffer data through the AudioFileStream parser (zero-copy).\n\n    This is a high-performance variant of audio_file_stream_parse_bytes() that\n    accepts any buffer object (bytes, bytearray, numpy array, memoryview) without\n    copying the data.\n\n    Useful for streaming scena""rios where:\n    - Data arrives in chunks from network/file\n    - Buffer pools are reused across multiple parse calls\n    - Large buffers need to be parsed without copying\n\n    Args:\n        stream_id: AudioFileStream ID from audio_file_stream_open()\n        data: Audio data as contiguous buffer (bytes, bytearray, numpy uint8 array)\n        flags: Parse flags (default 0)\n\n    Returns:\n        OSStatus code (0 for success)\n\n    Raises:\n        RuntimeError: If parsing fails\n\n    Example:\n        >>> stream_id = audio_file_stream_open()\n        >>> # Reusable buffer for streaming\n        >>> buffer = bytearray(4096)\n        >>> while chunk := read_from_network(buffer):\n        ...     audio_file_stream_parse_buffer(stream_id, buffer[:len(chunk)])\n        >>> audio_file_stream_close(stream_id)\n    Process audio through an AudioUnit directly into provided buffers (zero-copy).\n\n    This is a high-performance variant of audio_unit_render() that:\n    1. Accepts memoryview input (bytes, bytearray, numpy array)\n    2. Writes processed audio directly to caller-provided output buffer\n    3. Avoids all memory allocation and copying\n\n    Args:\n        audio_unit_id: AudioUnit instance ID from audio_component_instance_new()\n        input_data: Input audio data as contiguous buffer (interleaved float32)\n        output_buffer: Pre-allocated output buffer (bytearray or numpy uint8 array).\n                      Must be at least num_frames * num_channels * 4 bytes\n        num_frames: Number of frames to process\n        num_channels: Number of channels (default 2)\n\n    Returns:\n        Number of bytes written to output_buffer\n\n    Raises:\n        RuntimeError: If the render operation fails\n        ValueError: If buffers are too small\n\n    Example:\n        >>> # Process 1024 stereo float32 frames\n        >>> input_data = bytearray(audio_bytes)\n        >>> output_buffer = bytearray(1024 * 2 * 4)  # frames * channels * sizeof(float32)\n      ""  >>> bytes_written = audio_unit_render_into(\n        ...     unit_id, input_data, output_buffer, 1024, num_channels=2)\n        >>> # Processed data is in output_buffer[:bytes_written]\n    Read audio frames from ExtendedAudioFile directly into a provided buffer (zero-copy).\n\n    This is a high-performance variant of extended_audio_file_read() that reads\n    directly into a caller-provided buffer, avoiding memory allocation and copying.\n\n    Args:\n        ext_file_id: ExtAudioFile ID from extended_audio_file_open_url()\n        num_frames: Number of frames to read\n        buffer: Pre-allocated buffer (bytearray or numpy uint8 array) to read into.\n                Must be large enough: num_frames * num_channels * bytes_per_sample\n        num_channels: Number of audio channels (default 2 for stereo)\n\n    Returns:\n        Tuple of (bytes_read, frames_read) indicating actual data read.\n        The data is written directly into the provided buffer.\n\n    Raises:\n        RuntimeError: If the read operation fails\n        ValueError: If buffer is too small\n\n    Example:\n        >>> ext_file = extended_audio_file_open_url(\"audio.wav\")\n        >>> # Pre-allocate buffer for 1024 stereo float32 frames\n        >>> buffer = bytearray(1024 * 2 * 4)  # frames * channels * sizeof(float32)\n        >>> bytes_read, frames_read = extended_audio_file_read_into(\n        ...     ext_file, 1024, buffer, num_channels=2)\n        >>> # Data is now in buffer[:bytes_read]\n        >>> extended_audio_file_dispose(ext_file)\n    Read packets from an audio file directly into a provided buffer (zero-copy).\n\n    This is a high-performance variant of audio_file_read_packets() that reads\n    directly into a caller-provided buffer, avoiding memory allocation and copying.\n\n    Args:\n        audio_file_id: AudioFile ID from audio_file_open_url()\n        start_packet: Starting packet number\n        num_packets: Number of packets to read\n        buffer: Contiguous byte bu""ffer (bytearray or numpy array) to read into.\n                Must be large enough to hold the requested packets.\n\n    Returns:\n        Tuple of (bytes_read, packets_read) indicating actual data read.\n        The data is written directly into the provided buffer.\n\n    Raises:\n        RuntimeError: If the read operation fails\n        ValueError: If buffer is too small\n\n    Example:\n        >>> import numpy as np\n        >>> file_id = audio_file_open_url(\"audio.wav\")\n        >>> # Pre-allocate buffer (e.g., 1MB)\n        >>> buffer = bytearray(1024 * 1024)\n        >>> bytes_read, packets_read = audio_file_read_packets_into(\n        ...     file_id, 0, 10000, buffer)\n        >>> # Data is now in buffer[:bytes_read]\n        >>> audio_file_close(file_id)\n    Scale rate must be greater than zeroSource index Step may not be zero (axis %d)Unable to convert item to object.>'). \000?add_note and apply_gain (line 7988) at 0xaudio_converter_convert_buffer_into (line 905)audio_converter_fill_complex_buffer_into (line 1188)audio_file_read_packets_into (line 556)audio_file_stream_parse_buffer (line 694)audio_unit_render_into (line 2522) bytes provided, but  bytes required for calculate_peak (line 8044)calculate_rms (line 8017) channels, 4 bytes/sample)collections.abc<contiguous and direct><contiguous and indirect>convert int to fourcc 4 chars\n\n    >>> int_to_fourchar(1413830740)\n    'TEXT'\n    coremusic.data must be bytesdisableenableextended_audio_file_read_into (line 1451) failed: fourchar_to_int (line 197) frames ( framesgc (got got differing extents in dimension  has been disposedint_to_fourchar (line 207)isenableditemsize <= 0 for cython.arrayno default __reduce__ due to non-trivial __cinit__normalize_audio (line 7959) object> out of bounds (0- out of range (0- packets (max packet size: self.audio_queue,self.buffers,self.recorder_data cannot be converted to a Python object for picklingself.name is not Noneself.output_unit,self.player_data cannot be co""nverted to a Python object for picklingshould be four characters onlysrc/coremusic/capi.pyx<strided and direct><strided and direct or indirect><strided and indirect><stringsource>unable to allocate array data.unable to allocate shape and strides.utf-8ASCIIAUGraphAddNodeAUGraphClearConnectionsAUGraphCloseAUGraphConnectNodeInputAUGraphDisconnectNodeInputAUGraphGetCPULoadAUGraphGetIndNodeAUGraphGetMaxCPULoadAUGraphGetNodeCountAUGraphInitializeAUGraphIsInitializedAUGraphIsOpenAUGraphIsRunningAUGraphNodeInfoAUGraphOpenAUGraphRemoveNodeAUGraphStartAUGraphStopAUGraphUninitializeAUGraphUpdateAudioComponentCopyNameAudioComponentGetDescriptionAudioComponentInstanceDisposeAudioComponentInstanceNewAudioConverterConvertBufferAudioConverterDisposeAudioConverterFillComplexBufferAudioConverterGetPropertyAudioConverterGetPropertyInfoAudioConverterNewAudioConverterResetAudioConverterSetPropertyAudioFileCloseAudioFileGetPropertyAudioFileGetPropertyInfoAudioFileOpenURLAudioFileReadPacketsAudioFileStreamCloseAudioFileStreamGetPropertyAudioFileStreamGetPropertyInfoAudioFileStreamOpenAudioFileStreamParseBytesAudioFileStreamSeekAudioObjectGetPropertyDataAudioObjectGetPropertyDataSizeAudioObjectSetPropertyDataAudioOutputUnitStartAudioOutputUnitStopAudioPlayerAudioPlayer.__reduce_cython__AudioPlayer.__setstate_cython__AudioPlayer.get_link_timingAudioPlayer.get_progressAudioPlayer.is_playingAudioPlayer.load_fileAudioPlayer.playAudioPlayer.reset_playbackAudioPlayer.set_loopingAudioPlayer.setup_outputAudioPlayer.startAudioPlayer.stopAudioQueueAllocateBufferAudioQueueDisposeAudioQueueEnqueueBufferAudioQueueNewOutputAudioQueueStartAudioQueueStopAudioRecorderAudioRecorder.__reduce_cython__AudioRecorder.__setstate_cython__AudioRecorder.get_audio_dataAudioRecorder.get_progressAudioRecorder.get_recorded_durationAudioRecorder.get_recorded_framesAudioRecorder.has_audio_contentAudioRecorder.is_recordingAudioRecorder.run_loopAudioRecorder.save_to_fileAudioRecorder.setup_inputAudioRecorder.startAudioRecor""der.stopAudioServicesCreateSystemSoundIDAudioServicesDisposeSystemSoundIDAudioServicesGetPropertyAudioServicesGetPropertyInfoAudioServicesSetPropertyAudioUnitGetParameterAudioUnitGetPropertyAudioUnitGetPropertyInfoAudioUnitInitializeAudioUnitRenderAudioUnitSetParameterAudioUnitSetPropertyAudioUnitUninitializeCAClockDisposeCAClockGetCurrentTimeCAClockGetPlayRateCAClockNewCAClockSetPlayRateCAClockStartCAClockStopCoreAudioObjectCoreAudioObject.__reduce_cython__CoreAudioObject.__setstate_cython__CoreAudioObject._ensure_not_disposedCoreAudioObject._set_object_idCoreAudioObject.disposeDisposeAUGraphDisposeMusicPlayerDisposeMusicSequenceEllipsisExtAudioFileCreateWithURLExtAudioFileDisposeExtAudioFileGetPropertyExtAudioFileOpenURLExtAudioFileReadExtAudioFileSetPropertyExtAudioFileWriteMIDIClientCreateMIDIClientDisposeMIDIDestinationCreateMIDIDeviceAddEntityMIDIDeviceCreateMIDIDeviceDisposeMIDIDeviceListAddDeviceMIDIDeviceListDisposeMIDIDeviceNewEntityMIDIDeviceRemoveEntityMIDIDriverEnableMonitoringMIDIEndpointDisposeMIDIEndpointGetRefConsMIDIEndpointSetRefConsMIDIEntityAddOrRemoveEndpointsMIDIExternalDeviceCreateMIDIInputPortCreateMIDIObjectGetIntegerPropertyMIDIObjectGetStringPropertyMIDIObjectSetIntegerPropertyMIDIObjectSetStringPropertyMIDIOutputPortCreateMIDIPortConnectSourceMIDIPortDisconnectSourceMIDIPortDisposeMIDISendMIDISetupAddDeviceMIDISetupAddExternalDeviceMIDISetupRemoveDeviceMIDISetupRemoveExternalDeviceMIDISourceCreateMIDIThruConnectionCreateMIDIThruConnectionDisposeMIDIThruConnectionFindMIDIThruConnectionGetParamsMIDIThruConnectionSetParamsMusicDeviceStartNoteMusicDeviceStopNoteMusicDeviceSysExMusicPlayerGetPlayRateScalarMusicPlayerGetSequenceMusicPlayerGetTimeMusicPlayerIsPlayingMusicPlayerPrerollMusicPlayerSetPlayRateScalarMusicPlayerSetSequenceMusicPlayerSetTimeMusicPlayerStartMusicPlayerStopMusicSequenceDisposeTrackMusicSequenceFileLoadMusicSequenceGetIndTrackMusicSequenceGetSequenceTypeMusicSequenceGetTempoTrackMusicSequenceGetTrackCountMusicSequenceNew""TrackMusicSequenceSetSequenceTypeMusicTrackNewExtendedTempoEventMusicTrackNewMIDINoteEventNewAUGraphNewMusicPlayerNewMusicSequenceNone__Pyx_PyDict_NextRefSequenceView.MemoryViewabcabs_valactual_bytesactual_fadeactual_sizeaddressallocate_bufferappendapply_fade_in_float32apply_fade_out_float32apply_gainapply_gain_float32argCountarg_countasbdastypeasyncio.coroutinesattribute_dataattribute_typeau_graph_add_nodeau_graph_clear_connectionsau_graph_closeau_graph_connect_node_inputau_graph_disconnect_node_inputau_graph_disposeau_graph_get_cpu_loadau_graph_get_ind_nodeau_graph_get_max_cpu_loadau_graph_get_node_countau_graph_initializeau_graph_is_initializedau_graph_is_openau_graph_is_runningau_graph_newau_graph_node_infoau_graph_openau_graph_remove_nodeau_graph_startau_graph_stopau_graph_uninitializeau_graph_updateaudio_component_copy_nameaudio_component_find_nextaudio_component_get_descriptionaudio_component_instance_disposeaudio_component_instance_newaudio_converter_convert_bufferaudio_converter_convert_buffer_intoaudio_converter_disposeaudio_converter_fill_complex_bufferaudio_converter_fill_complex_buffer_intoaudio_converter_get_propertyaudio_converter_newaudio_converter_resetaudio_converter_set_propertyaudio_dataaudio_fileaudio_file_closeaudio_file_get_propertyaudio_file_idaudio_file_open_urlaudio_file_read_packetsaudio_file_read_packets_intoaudio_file_stream_closeaudio_file_stream_get_propertyaudio_file_stream_openaudio_file_stream_parse_bufferaudio_file_stream_parse_bytesaudio_file_stream_seekaudio_formataudio_hardware_destroy_aggregate_deviceaudio_hardware_get_default_input_deviceaudio_hardware_get_default_output_deviceaudio_hardware_get_devicesaudio_hardware_unloadaudio_object_get_property_dataaudio_object_get_property_stringaudio_object_is_property_settableaudio_object_set_property_dataaudio_object_showaudio_output_unit_startaudio_output_unit_stopaudio_queue_allocate_bufferaudio_queue_disposeaudio_queue_enqueue_bufferaudio_queue_new_outputaudio_queue_startaudio_queue""_stopaudio_services_create_system_sound_idaudio_services_dispose_system_sound_idaudio_services_get_propertyaudio_services_play_alert_soundaudio_services_play_system_soundaudio_services_set_propertyaudio_unitaudio_unit_find_all_componentsaudio_unit_get_component_infoaudio_unit_get_factory_presetsaudio_unit_get_parameteraudio_unit_get_parameter_infoaudio_unit_get_parameter_listaudio_unit_get_propertyaudio_unit_idaudio_unit_initializeaudio_unit_renderaudio_unit_render_intoaudio_unit_set_current_presetaudio_unit_set_parameteraudio_unit_set_propertyaudio_unit_uninitializebank_is_validbank_lsbbank_msbbasebeatbeat_at_timebits_per_channelboolbpmbufferbuffer_idbuffer_listbuffer_sizebyte1byte2byte3byte4byte5byte6byte_databyte_offsetbytesbytes_per_bufferbytes_per_framebytes_per_packetbytes_usedcc_strca_clock_disposeca_clock_get_current_timeca_clock_get_play_rateca_clock_newca_clock_set_play_rateca_clock_startca_clock_stopcalculate_peakcalculate_peak_float32calculate_rmscalculate_rms_float32callback_datacallback_structcapture_app_session_statecf_connection_listcf_manufacturercf_modelcf_namecf_owner_idcf_paramscf_pathcf_prop_namecf_valuechannelchannelMapchannelPressurechannel_mapchannelschannels_per_frame__class____class_getitem__clientclient_formatcline_in_tracebackclockclock_idclock_refclock_timeclump_idcodecodec_manufacturercompcomponentcomponent_idcomponent_subtypecomponent_typecomponentsconfigconnectionconnection_paramsconnectionscontrolTransformscontrollercontrolsconvert_float32_to_int16convert_int16_to_float32converterconverter_idcopycoremusic.capicountcpu_loadcreate_midi_channel_messagecreate_midi_note_messagecreate_music_device_note_paramscreate_music_device_std_note_paramscurrent_timedatadata1data2data_lengthdata_ptrdata_sizedecodedefault_valuedescdesc_dictdescriptiondescription_dictdestdest_formatdest_indexdest_inputdest_nodedestinationdestinationsdev_listdevicedeviceIDdevice_countdevice_iddevice_idsdevice_indexdevices__dict__dictdisplayNamedisposedispose_music_player""dispose_music_sequencedriverdriverOwnerdst_formatdtypedtype_is_objectdurationelementembeddedenabledencodeendpointendpointRef_ensure_not_disposedentityentity_indexenumerateerrorerrorsext_audio_fileext_fileext_file_idextended_audio_file_create_with_urlextended_audio_file_disposeextended_audio_file_get_propertyextended_audio_file_open_urlextended_audio_file_readextended_audio_file_read_intoextended_audio_file_set_propertyextended_audio_file_writeextrafade_framesfile_formatfile_length_framesfile_pathfile_typefile_type_hintfilterOutAllControlsfilterOutBeatClockfilterOutMTCfilterOutSysExfilterOutTuneRequestflagsflags_maskfloatfloat32float_dataformatformat_flagsformat_idfortranfourchar_to_intframesframes_per_packetframes_to_read__func__gaingain_dbgetget_au_graph_err_cannot_do_in_current_contextget_au_graph_err_invalid_audio_unitget_au_graph_err_invalid_connectionget_au_graph_err_node_not_foundget_au_graph_err_output_node_errget_audio_component_type_music_deviceget_audio_converter_property_codec_qualityget_audio_converter_property_max_input_packet_sizeget_audio_converter_property_max_output_packet_sizeget_audio_converter_property_min_input_buffer_sizeget_audio_converter_property_min_output_buffer_sizeget_audio_converter_property_sample_rate_converter_qualityget_audio_converter_quality_highget_audio_converter_quality_lowget_audio_converter_quality_maxget_audio_converter_quality_mediumget_audio_converter_quality_minget_audio_dataget_audio_device_property_available_nominal_sample_ratesget_audio_device_property_device_uidget_audio_device_property_device_is_aliveget_audio_device_property_is_hiddenget_audio_device_property_model_uidget_audio_device_property_muteget_audio_device_property_nominal_sample_rateget_audio_device_property_preferred_channels_for_stereoget_audio_device_property_stream_configurationget_audio_device_property_transport_typeget_audio_device_property_volume_scalarget_audio_file_property_audio_data_packet_countget_audio_file_property_data_formatget_audio_file_pr""operty_estimated_durationget_audio_file_property_maximum_packet_sizeget_audio_file_read_permissionget_audio_file_stream_error_bad_property_sizeget_audio_file_stream_error_data_unavailableget_audio_file_stream_error_discontinuity_cant_recoverget_audio_file_stream_error_illegal_operationget_audio_file_stream_error_invalid_packet_offsetget_audio_file_stream_error_invalid_fileget_audio_file_stream_error_not_optimizedget_audio_file_stream_error_unspecified_errorget_audio_file_stream_error_unsupported_file_typeget_audio_file_stream_error_unsupported_data_formatget_audio_file_stream_error_unsupported_propertyget_audio_file_stream_error_value_unknownget_audio_file_stream_parse_flag_discontinuityget_audio_file_stream_property_audio_data_byte_countget_audio_file_stream_property_audio_data_packet_countget_audio_file_stream_property_average_bytes_per_packetget_audio_file_stream_property_byte_to_packetget_audio_file_stream_property_bit_rateget_audio_file_stream_property_channel_layoutget_audio_file_stream_property_data_formatget_audio_file_stream_property_data_offsetget_audio_file_stream_property_file_formatget_audio_file_stream_property_format_listget_audio_file_stream_property_frame_to_packetget_audio_file_stream_property_flag_property_is_cachedget_audio_file_stream_property_flag_cache_propertyget_audio_file_stream_property_info_dictionaryget_audio_file_stream_property_magic_cookie_dataget_audio_file_stream_property_maximum_packet_sizeget_audio_file_stream_property_packet_to_frameget_audio_file_stream_property_packet_to_byteget_audio_file_stream_property_packet_table_infoget_audio_file_stream_property_packet_size_upper_boundget_audio_file_stream_property_ready_to_produce_packetsget_audio_file_stream_seek_flag_offset_is_estimatedget_audio_file_wave_typeget_audio_format_linear_pcmget_audio_hardware_property_default_output_deviceget_audio_hardware_property_default_input_deviceget_audio_object_property_element_mainget_audio_object_property_manufacturerget_audio_object_property_nam""eget_audio_object_property_scope_globalget_audio_object_property_scope_inputget_audio_object_property_scope_outputget_audio_services_bad_property_size_errorget_audio_services_bad_specifier_size_errorget_audio_services_no_errorget_audio_services_property_complete_playback_if_app_diesget_audio_services_property_is_ui_soundget_audio_services_system_sound_unspecified_errorget_audio_services_system_sound_client_timed_out_errorget_audio_services_system_sound_exceeded_maximum_duration_errorget_audio_services_unsupported_property_errorget_audio_unit_manufacturer_appleget_audio_unit_property_set_render_callbackget_audio_unit_property_stream_formatget_audio_unit_scope_globalget_audio_unit_scope_inputget_audio_unit_scope_outputget_audio_unit_subtype_default_outputget_audio_unit_type_outputget_ca_clock_time_format_beatsget_ca_clock_time_format_host_timeget_ca_clock_time_format_samplesget_ca_clock_time_format_secondsget_ca_clock_time_format_smpte_timeget_error_suggestionget_extended_audio_file_property_file_data_formatget_extended_audio_file_property_client_data_formatget_extended_audio_file_property_file_channel_layoutget_extended_audio_file_property_client_channel_layoutget_extended_audio_file_property_codec_manufacturerget_extended_audio_file_property_audio_fileget_extended_audio_file_property_file_length_framesget_linear_pcm_format_flag_is_non_interleavedget_linear_pcm_format_flag_is_packedget_linear_pcm_format_flag_is_signed_integerget_link_timingget_midi_control_type_14bitget_midi_control_type_14bit_nrpnget_midi_control_type_14bit_rpnget_midi_control_type_7bitget_midi_control_type_7bit_nrpnget_midi_control_type_7bit_rpnget_midi_cv_status_channel_pressureget_midi_cv_status_control_changeget_midi_cv_status_note_offget_midi_cv_status_note_onget_midi_cv_status_pitch_bendget_midi_cv_status_poly_pressureget_midi_cv_status_program_changeget_midi_error_id_not_uniqueget_midi_error_invalid_clientget_midi_error_invalid_portget_midi_error_message_send_errget_midi_error_no_connectionge""t_midi_error_no_current_setupget_midi_error_not_permittedget_midi_error_object_not_foundget_midi_error_server_start_errget_midi_error_setup_format_errget_midi_error_unknown_endpointget_midi_error_unknown_errorget_midi_error_unknown_propertyget_midi_error_wrong_endpoint_typeget_midi_error_wrong_property_typeget_midi_error_wrong_threadget_midi_message_type_channel_voice1get_midi_message_type_channel_voice2get_midi_message_type_data128get_midi_message_type_sysexget_midi_message_type_systemget_midi_message_type_utilityget_midi_object_type_destinationget_midi_object_type_deviceget_midi_object_type_entityget_midi_object_type_external_deviceget_midi_object_type_external_destinationget_midi_object_type_external_entityget_midi_object_type_external_sourceget_midi_object_type_otherget_midi_object_type_sourceget_midi_property_device_idget_midi_property_display_nameget_midi_property_driver_ownerget_midi_property_manufacturerget_midi_property_modelget_midi_property_nameget_midi_property_offlineget_midi_property_privateget_midi_property_receive_channelsget_midi_property_transmit_channelsget_midi_property_unique_idget_midi_protocol_1_0get_midi_protocol_2_0get_midi_thru_connection_max_endpointsget_midi_transform_addget_midi_transform_filter_outget_midi_transform_map_controlget_midi_transform_map_valueget_midi_transform_max_valueget_midi_transform_min_valueget_midi_transform_noneget_midi_transform_scaleget_music_device_midi_event_list_selectget_music_device_midi_event_selectget_music_device_rangeget_music_device_start_note_selectget_music_device_stop_note_selectget_music_device_sysex_selectget_music_event_type_au_presetget_music_event_type_extended_noteget_music_event_type_extended_tempoget_music_event_type_metaget_music_event_type_midi_channel_messageget_music_event_type_midi_note_messageget_music_event_type_midi_raw_dataget_music_event_type_nullget_music_event_type_parameterget_music_event_type_userget_music_note_event_unusedget_music_note_event_use_group_instrumentget_music_sequen""ce_file_any_typeget_music_sequence_file_imelody_typeget_music_sequence_file_midi_typeget_music_sequence_type_beatsget_music_sequence_type_samplesget_music_sequence_type_secondsget_progressget_recorded_durationget_recorded_framesget_sequence_track_property_automated_parametersget_sequence_track_property_loop_infoget_sequence_track_property_mute_statusget_sequence_track_property_offset_timeget_sequence_track_property_solo_statusget_sequence_track_property_time_resolutionget_sequence_track_property_track_lengthget_system_sound_id_flash_screenget_system_sound_id_user_preferred_alertget_system_sound_id_vibrateget_user_preferred_alert__getstate__graphgraph_idgroupgroup_idhas_audio_contenthighNotehighVelocityhoursiidignoreimmediate__import__in_device_idindexinput1input2input_bufferinput_datainput_data_sizeinput_packet_countinput_ptrinstanceinstance_idinstrument_idintint_dataint_to_fourchar_is_coroutineis_estimatedis_initializedis_openis_playingis_recordingis_runningis_settableis_updateditemsitemsizejkeyPressurelengthlinear_gainlink_sessionlistload_filelogloggerlooplowNotelowVelocitylsb__main__manufacturermanufacturer_bytesmax_loadmax_packet_sizemax_sizemax_valmax_valuememviewmessagemicrosmidi1_up_channel_voice_messagemidi1_up_control_changemidi1_up_note_offmidi1_up_note_onmidi1_up_pitch_bendmidi1_up_sysexmidi1_up_system_commonmidi2_channel_voice_messagemidi2_control_changemidi2_note_offmidi2_note_onmidi2_pitch_bendmidi2_program_changemidi_client_createmidi_client_disposemidi_control_changemidi_destination_createmidi_device_add_entitymidi_device_createmidi_device_disposemidi_device_get_entitymidi_device_get_namemidi_device_get_number_of_entitiesmidi_device_list_add_devicemidi_device_list_disposemidi_device_list_get_devicemidi_device_list_get_number_of_devicesmidi_device_new_entitymidi_device_remove_entitymidi_driver_enable_monitoringmidi_endpoint_disposemidi_endpoint_get_namemidi_endpoint_get_ref_consmidi_endpoint_set_ref_consmidi_entity_add_or_remove_endpointsmidi_entity_g""et_destinationmidi_entity_get_namemidi_entity_get_number_of_destinationsmidi_entity_get_number_of_sourcesmidi_entity_get_sourcemidi_external_device_createmidi_get_destinationmidi_get_devicemidi_get_driver_device_listmidi_get_driver_io_runloopmidi_get_number_of_destinationsmidi_get_number_of_devicesmidi_get_number_of_sourcesmidi_get_sourcemidi_input_port_createmidi_message_type_for_up_wordmidi_note_offmidi_note_onmidi_object_get_integer_propertymidi_object_get_manufacturermidi_object_get_modelmidi_object_get_namemidi_object_get_string_propertymidi_object_set_integer_propertymidi_object_set_string_propertymidi_output_port_createmidi_pitch_bendmidi_port_connect_sourcemidi_port_disconnect_sourcemidi_port_disposemidi_program_changemidi_send_datamidi_setup_add_devicemidi_setup_add_external_devicemidi_setup_remove_devicemidi_setup_remove_external_devicemidi_source_createmidi_thru_connection_createmidi_thru_connection_disposemidi_thru_connection_findmidi_thru_connection_get_paramsmidi_thru_connection_params_initializemidi_thru_connection_set_paramsmin_valueminutesmix_audio_float32mix_ratiomodemodelmodel_bytes__module__mono_datamono_to_stereo_float32msbmsgmusic_device_midi_eventmusic_device_start_notemusic_device_stop_notemusic_device_sysexmusic_player_get_play_rate_scalarmusic_player_get_sequencemusic_player_get_timemusic_player_is_playingmusic_player_prerollmusic_player_set_play_rate_scalarmusic_player_set_sequencemusic_player_set_timemusic_player_startmusic_player_stopmusic_sequence_dispose_trackmusic_sequence_file_loadmusic_sequence_get_ind_trackmusic_sequence_get_sequence_typemusic_sequence_get_tempo_trackmusic_sequence_get_track_countmusic_sequence_new_trackmusic_sequence_set_sequence_typemusic_track_new_extended_tempo_eventmusic_track_new_midi_channel_eventmusic_track_new_midi_note_eventnname__name__name_bytesname_refndim__new__new_music_playernew_music_sequencenodenode_idnormalize_audionormalize_audio_float32notenoteNumbernote_instance_idnote_numbernote_transformnpnu""mControlTransformsnumMapsnum_bytesnum_channelsnum_connectionsnum_controlsnum_destination_endpointsnum_destsnum_devicesnum_entitiesnum_framesnum_packetsnum_paramsnum_presetsnum_source_endpointsnum_sourcesnumbernumpyobjobject_idofflineoffset_sample_frameoperationos_statusos_status_to_stringoutputoutput_bufferoutput_buffer_listoutput_buffer_sizeoutput_dataoutput_data_packet_sizeoutput_data_sizeoutput_descoutput_packet_countowner_id_bytespackpacketpacket_countpacket_offsetparamparam_idparam_infoparam_listparamsparams_sizepath_bytespeakpermissionspersistent_owner_idphasephase_at_timepitchpitchBendpktlistpktlist_sizeplayplayerpopportport_nameport_name_bytespresetpreset_namepreset_numberpresets_arraypreviousprevious_component_idprivateprogramprogramChangeprop_bytesprop_idprop_sizeproperty_idproperty_nameproperty_selectorprotocol__pyx_checksum__pyx_state__pyx_type__pyx_unpickle_Enum__pyx_vtable____qualname__quantumqueuequeue_idrateratio1ratio2read_framesreceiveChannels__reduce____reduce_cython____reduce_ex__ref1ref2registerrelease_velocityrequired_sizereservedreset_playbackreshaperesultresult_strreturnrstriprun_looprunloopsamplesample_ratesave_to_filescale_ratescopesecondsselfseqsequencesequence_typeset_looping__set_name___set_object_idsetdefault__setstate____setstate_cython__setup_inputsetup_outputshapesizesound_idsourcesource_formatsource_format_dictsource_indexsource_nodesource_outputsourcesspecifierspecifier_valuesrc_formatstartstart_framestart_packetstatestatusstatus_codestatus_resultstepstereo_datastereo_to_mono_float32stopstrstreamstream_formatstream_idstring_refstructsubframe_divisorsubframessubtypesuggestionsum_squaressystem_sound_idtarget_peaktemp_buffer_listtempo__test__test_errortimetime_formattimestamptotal_bytestotal_samplestracktrack_counttrack_indextransformtransmitChannelstupletypeuint_datauniqueIDunitunit_nameunpackupdateurlurl_refvaluevalueMapsvalue_bytesvaluesvelocityvelocity_transformversionwordwritablex\200\001\360\030\000\005!\320 0\260\001\3201A\300""\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\030\000\005!\320 0\260\001\3201A\300\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0000\260\001\360\032\000\005!\320 5\260Q\260l\300*\310A\310Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0000\260\001\360\030\000\005'\240a\340\004\007\320\007\035\230S\240\001\330\010\023\320\023&\240a\340\004\010\320\010\031\320\031)\250\024\250Q\250h\260a\330\004\010\320\010\034\320\034,\250D\260\001\260\033\270A\330\004\010\320\010!\320!1\260\024\260Q\3206F\300a\330\004\010\320\010\032\320\032*\250$\250a\250y\270\001\330\004\010\320\010\036\320\036.\250d\260!\260>\300\021\340\004\022\320\022)\250\021\250*\260A\260Q\340\004\007\200z\220\023\220A\330\010\017\210q\330\004\013\2106\220\021\200\001\340\004\013\2101\200\001\360\006\00012\360\030\000\005\027\220f\230F\240!\2401\330\004\030\230\006\230f\240A\240Q\330\004\034\230D\240\002\240!\330\004\034\230A\360\006\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\026\220a\220s\230%\230v\240Q\240c\250\023\250B\250g\260R\260v\270Q\270c\300\023\300B\300a\200\001\360\030\000\005\016\210^\2301\230J\240g\250Z\260q\330\036(\250\r\260Z\270q\200\001\360\024\000\005!\320 1\260\021\260!\2601\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\200\001\360\030\000\005!\320 1\260\021\3202B\300!\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\340\004'\320';\2701\330\004 \320 4\260A\260Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\340\004\035\230^\2501\340\004 \320 4\260A\260Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000\033\2301\360\010\000""\005!\320 4\260A\330\010\t\330\010\t\330\010\t\330\010\034\230A\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\340\004\035\230^\2501\340\004 \320 5\260Q\260a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360&\000\005\020\320\017+\2501\330\010\032\230'\320!5\260Q\260a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\340\010\020\220\t\320\031/\250q\260\014\270A\330\010\013\2101\330\014\025\220U\230'\240\021\240!\360\006\000\r\030\320\027)\250\021\250!\330\014\031\320\031;\2701\270J\320F^\320^`\320`a\330\014\025\220W\230F\240!\2401\330\014\017\210t\2201\330\020\026\220k\240\021\240!\330\014\r\330\020\025\320\025(\250\001\250\032\2608\270<\300q\330\024\035\230V\2407\250!\2501\340\024\032\230,\240a\240q\340\020\024\220A\220Q\340\010\017\210q\340\n\024\220A\220Q\200\001\360\026\000\007*\250\021\250!\2501\360\006\000\005\006\330\010\023\2206\230\021\330\010\023\2201\330\010\030\230\001\330\010\026\220a\220v\230[\250\001\250\023\250D\260\005\260U\270!\2701\330\010\027\220v\230Q\330\010\030\230\006\230a\330\010\023\2206\230\021\330\010\024\220F\230!\330\010\027\220}\240F\250+\260\\\300\031\310&\320P[\320[\\\330\010\025\220]\240&\250\t\260\034\270Y\300f\310I\320UV\330\010\030\230\r\240V\250<\260|\3009\310F\320R^\320^_\330\010\034\230M\250\026\320/?\270|\3109\320TZ\320Zj\320jk\330\010\032\230-\240v\250^\270<\300y\320PV\320Vd\320de\330\010\026\220m\2406\250\032\260<\270y\310\006\310j\320XY\330\010\032\230&\240\001\330\010\030\230\006\230a\330\010\036\230f\240A\330\010 \240\006\240a\330\010 \240\006\240a\330\010\035\230Q\330\010\025\220Q\360\006\000\005\014\2101\200\001\340\004\035\230^\2501\340\004 \320 6\260a\260q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360&\000\005\020\320\017+\2501\330\010\032\230'""\320!6\260a\260q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\340\010\020\220\t\320\031/\250q\260\014\270A\330\010\013\2101\330\014\025\220U\230'\240\021\240!\360\006\000\r\030\320\027)\250\021\250!\330\014\031\320\031;\2701\270J\320F^\320^`\320`a\330\014\025\220W\230F\240!\2401\330\014\017\210t\2201\330\020\026\220k\240\021\240!\330\014\r\330\020\025\320\025(\250\001\250\032\2608\270<\300q\330\024\035\230V\2407\250!\2501\340\024\032\230,\240a\240q\340\020\024\220A\220Q\340\010\017\210q\340\n\024\220A\220Q\200\001\360\022\000\005(\320':\270!\330\004#\2401\340\004 \320 7\260q\270\013\3001\300A\330\004\007\200w\210c\220\022\2203\220i\230s\240!\330\010\017\210q\360\006\000\005\025\220O\2401\240A\330\006\020\220\001\220\021\330\004\013\2108\220:\230Q\200\001\360\010\000$;\270!\360<\000\005(\320';\2701\330\004$\240A\330\004!\240\033\250F\260&\270\001\270\021\360\n\000\005$\240;\250b\260\r\270R\270q\330\004\007\200|\2202\220Q\330\010\016\210j\230\001\330\014 \240\001\240\021\330\014\022\220!\320\0235\260Q\260a\330\014\017\210q\220\001\360\010\000\005\020\320\017!\240\021\330\004\017\210y\230\001\230\022\320\033.\250a\330\004\017\210y\230\001\230\022\320\033,\250A\330\004\017\210y\230\001\230\022\2309\240A\240V\2501\250A\340\004\017\320\017 \240\001\240\032\2501\320,<\270A\270Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004!\240\033\250I\260Q\260b\270\001\330\004\014\210M\230\021\200\001\360\020\000\005(\320';\2701\330\004\034\230A\330\004\030\230\007\230w\240a\330\004!\240\023\240A\240Q\360\006\000\005\020\320\017!\240\021\330\004\017\210y\230\001\230\022\320\033.\250a\330\004\017\210y\230\001\230\022\320\033,\250A\330\004\017\210y\230\001\230\022\2309\240A\340\004 \320 2\260!\260:\270X\300Q\300a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\016\000\005\036\230^\2501\360\014\000\005\013\320\n\032\230!\330\004\n\210.\230\001""\340\004\017\320\017$\240A\330\010\t\330\n\013\330\n\013\330\010\t\330\010\t\210\021\330\010\t\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\033V\320VW\320WX\340\004\013\2101\320\0001\260\021\340\004.\320.J\310!\330\004\037\230q\330\004\037\230q\330\004\037\230{\250!\360\006\000\005!\320 =\270Q\330\010\t\330\010\035\320\035-\250S\260\007\260q\330\010\t\210\035\320\026&\240c\250\027\260\001\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\031\230\007\230v\240Q\240a\330\004!\240\021\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023,\250A\330\014\r\330\014!\320!1\260\023\260G\2701\330\014\r\210]\320\032*\250#\250W\260A\330\014\r\210Q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\014\210:\220S\230\001\330\014\024\220L\240\007\240q\250\001\340\014\023\2206\230\022\2301\360\006\000\t\r\210A\210Q\200\001\360\030\000\005!\320 ;\2701\320<N\310a\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005!\320 ;\2701\320<N\310j\320XY\320YZ\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\032\000\005!\320 ;\2701\320<N\310j\320XY\320YZ\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\320\000;\2701\340\004\r\210Q\200\001\360\022\000\005(\320':\270!\340\004#\2401\330\004\035\230Q\360\n\000\005\020\320\017,\250A\250[\270\001\270\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\020\320\017&\240a\240{\260!\2601\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\014\2101\330\004\007\200y\220\003\2201\330\010\r\320\r \240\001\240\032\2508\2607\270+\300Q\330\014\023\2206\230\027\240\001\240""\021\330\n\024\220A\220Q\360\006\000\005\020\320\017(\250\001\250\033\260A\260Q\330\004\007\200w\210c\220\021\330\010\022\220!\340\004\005\330\010\020\220\001\330\010\020\220\017\230q\240\004\240A\330\010\023\220?\240!\2404\240q\330\010\030\230\017\240q\250\004\250A\330\010\023\2201\330\010\030\230\001\200\001\360&\000\005\020\320\017+\2501\330\010\032\230'\320!=\270Q\270a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\340\010\020\220\t\320\031/\250q\260\014\270A\330\010\013\2101\330\014\025\220U\230'\240\021\240!\360\006\000\r\030\320\027)\250\021\250!\330\014\031\320\031;\2701\270J\320F^\320^`\320`a\330\014\025\220W\230F\240!\2401\330\014\017\210t\2201\330\020\026\220k\240\021\240!\330\014\r\330\020\025\320\025(\250\001\250\032\2608\270<\300q\330\024\035\230V\2407\250!\2501\340\024\032\230,\240a\240q\340\020\024\220A\220Q\340\010\017\210q\340\n\024\220A\220Q\200\001\360\022\000\005\016\320\r+\2501\320,>\270a\200\001\360\"\000\005!\320 ;\2701\330\010\032\230(\240,\250a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000'\320':\270)\3001\360\036\000\005\021\220\001\220\037\240\001\240\021\330\004\020\220\001\220\035\230a\230q\340\004 \320 2\260!\2601\260L\300\001\300\034\310Q\310a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\036\000\007*\250\021\250!\2501\360\006\000\005\013\210+\320\025&\240d\250!\250;\260a\360\006\000\005\017\320\016\037\230t\2401\240K\250q\330\004\n\320\n\033\2301\230C\230q\240\n\250!\330\004\010\210\005\210U\220!\2206\230\021\330\010\013\210:\220Q\220g\230Q\230d\240!\330\014\022\220(\230!\2302\230_\320,@\300\007\300q\310\002\310$\310a\310\177\320^_\330\014\022\220(\230!\2302\230\\\320):\270'\300\021\300\"\300D\310\001\310\034\320UV\360\006\000\005\024\320\023$\240D\250\001\320)9\270\021\330\004\n\320\n \240\001\240\023\240A\240_\260A\330\004\010\210\005""\210U\220!\2206\230\021\330\010\013\210:\220Q\220l\240!\2404\240q\330\014\022\220-\230q\240\002\240/\3201E\300\\\320QR\320RT\320TX\320XY\320Yh\320hi\330\014\022\220-\230q\240\002\240,\320.?\270|\3101\310B\310d\320RS\320S_\320_`\360\006\000\005\013\320\n\034\230J\320&7\260t\2701\320<N\310a\330\004\n\320\n\032\230*\320$5\260T\270\021\320:J\310!\330\004\n\320\n \240\n\320*;\2704\270q\320@V\320VW\330\004\n\320\n\"\240*\320,=\270T\300\021\320BZ\320Z[\360\006\000\005%\240M\260\021\330\n\013\330\010\023\2201\220A\330\010\t\360\010\000\005\006\330\010\023\320\023/\250q\330\014&\240l\260!\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\320\000*\250!\360\032\000\005!\320 1\260\021\260,\270j\310\001\310\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2104\210q\220\001\320\000@\300\001\360\026\000\005\036\230^\2501\340\004\037\230q\360\014\000\005\020\320\017$\240A\330\010\t\330\n\013\330\010\033\2301\330\010\035\230Q\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\033V\320VW\320WX\360\006\000\005\014\2101\330\004\007\200z\220\036\230s\240!\340\010\r\210\\\230\021\230.\250\n\260/\300\025\320FX\320XY\330\014\021\320\021$\240A\240Z\250\177\270h\300g\310[\320XY\330\020\027\220v\230W\240A\240Q\360\006\000\005\010\200t\2101\330\010\017\210z\230\025\230b\240\003\2407\250!\2509\260G\2709\300G\3101\310A\360\006\000\005\021\220\001\330\004\007\200z\220\032\2303\230a\340\010\r\210\\\230\021\230.\250\n\260+\270U\320BT\320TU\330\014\021\320\021$\240A\240Z\250{\270(\300'\310\033\320TU\330\020\034\230F\240'\250\021\250!\340\004\005\330\010\024\220A\330\010\020\220\001\330\010\025\220Q\330\010\020\220\n\230!\330\010\025\220Z\230q\330\010\025\220Z\230q\330\010\031\230\032\2401\330\010\021\220\032\2301\330\010\024\220J\230a\200\001\360\014\000\034\035\360>\000\005\036\230^\2501\340\004/\250q""\360\006\000\005\"\240\033\250B\250m\2702\270Q\360\006\000\005\010\200{\220*\230F\240!\2403\240b\250\001\330\010\016\210j\230\001\330\014&\240a\240z\260\026\260q\270\001\330\014\022\220!\320\0233\2601\260A\340\004\007\200{\220-\230v\240Q\240c\250\022\2501\330\010\016\210j\230\001\330\014'\240q\250\r\260V\2701\270A\330\014\022\220!\320\0233\2601\260A\360\010\000\005\013\210!\2101\210M\230\021\230$\230a\230z\250\021\250$\250a\360\006\000\005\020\320\017!\240\021\330\004\017\210y\230\001\230\022\320\033.\250a\330\004\017\210y\230\001\230\022\320\033,\250A\330\004\017\210y\230\001\230\022\2309\240A\240]\260!\2601\360\006\000\005\013\210!\2101\210K\220s\230!\330\004\r\210_\230A\330\004\r\210\\\230\021\360\006\000\005\020\320\017\037\230q\330\010\t\330\010\t\210\021\330\010\t\210\021\330\010\t\330\010\023\2201\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\0001\260\021\360\006\000\005 \230q\330\004&\240a\360\006\000\005\032\230\021\330\010\t\210\021\330\n\013\330\n\013\330\n\013\360\006\000\005\020\320\017*\250#\320-H\310\001\310\031\320RU\320U[\320[\\\320\\g\320gh\320hi\330\004\007\200w\210c\220\021\330\010\017\210q\340\004\013\2101\200\001\340\004\035\230^\2501\330\004\037\230q\330\004\037\230q\360\010\000\005\020\320\017(\250\001\250\021\330)A\300\021\330)<\270A\330)>\270a\330)*\250!\330)*\250!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\031\230\007\230v\240Q\240a\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023(\250\001\250\021\330)A\300\021\330)<\270A\330)>\270a\330)*\330)*\250!\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210v\220R\220q\360\006\000\t\r\210A\210Q\200\001\360\024\000\005\036\230^\2501\330\004\037\230q\330\004\037\230q\340\004'\240q\360\014\000\005\030\220q\360\006\000\005\020\320\017(\250\001\330\010\t\330\n\013\330\n\013\330\010\t\330""\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\022\2203\220j\240\003\2401\330\010\017\210q\360\006\000\005\021\220\001\330\004\017\320\017$\240A\330\010\t\330\n\013\330\n\013\330\010\t\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\017\210q\340\004\007\200~\220S\230\001\330\010\017\210q\360\006\000\005\025\320\024$\240A\240Q\360\006\000\005\010\200|\2203\220a\330\n\024\220A\220^\2401\330\010\017\210q\360\n\000\005\006\330\010\014\210E\220\025\220a\220q\340\014\025\320\025%\320%<\270A\270_\310A\330\014\017\210w\220c\230\021\330\020 \240\006\240a\330\020\036\230a\360\006\000\021\024\2206\230\034\240S\250\001\330\024\031\320\031,\250A\250V\260=\300\010\310\007\310y\320XY\330\030&\240f\250G\2601\260A\340\020\026\220g\230Q\330\024\036\230a\330\024\034\230A\360\010\000\t\014\210>\230\023\230A\330\016\030\230\001\230\036\240q\340\004\013\2101\200\001\360\020\000\005(\320';\2701\330\004\037\230s\240!\2401\330\004\030\230\007\230w\240a\340\004 \320 8\270\001\270\032\300=\320P[\320[\\\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\340\004\035\230^\2501\360\006\000\005\010\200z\220\021\220&\230\001\340\010\023\320\023(\250\001\250\021\330)A\300\021\330)<\270A\330)>\270a\330)6\260a\330)4\260C\260q\270\001\340\010\016\210j\230\001\230\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\030\000\005!\320 2\260!\3203E\300Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\030\000\005!\320 2\260!\3203E\300Q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005!\320 2\260,\270i\300s\310'\320QR\330\004 \320 7\260q\3208H\310\010\320PQ\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0002\260!\360\006\000\005 \230q\330\004&\240a\360""\006\000\005\032\230\021\330\010\t\210\021\330\n\013\330\n\013\330\n\013\360\006\000\005\020\320\017*\250#\320-H\310\001\310\031\320RU\320U[\320[\\\320\\g\320gh\320hi\330\004\007\200w\210c\220\021\330\010\017\210q\340\004\013\2101\200\001\360\022\000\005!\320 2\260!\260<\270q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\024\000\005!\320 2\260!\260<\270z\310\033\320TU\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\030\000\005!\320 3\2601\3204D\300A\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\032\000\005!\320 3\2601\3204D\300H\310A\310Q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2108\2201\200\001\360\032\000\005!\320 3\2601\3204D\300H\320L_\320_`\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\030\000\005!\320 3\2601\3204F\300a\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\024\000\005!\320 3\2601\260O\300:\310Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\320\0003\2601\360\022\000\005%\320$>\270a\270v\300Y\310g\320UV\320Vb\320bc\330\004\035\320\035;\2701\270F\300+\320Md\320de\360\006\000\005\010\200t\2103\210a\330\n\024\220A\220Q\330\010\016\210j\230\001\320\031;\2701\270A\340\004 \320 4\260A\260U\270!\2701\340\006\020\220\001\220\021\330\006\020\220\001\220\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\030\000\005!\320 3\2607\270!\2701\330\004(\320(B\300!\330\n \320 2\260!\360\024\000\005\006\330\010\023\320\023*\250!\250=\270\001\270\021\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\031\320\030(\250\001\250\021\330\010\023\220=\320 1\260\021\260!\360\006""\000\t\033\230,\240c\250\021\330\010\026\320\0261\260\021\340\010\021\220\021\330\010\014\210E\220\025\220a\220q\330\014\022\220'\230\021\230+\240Q\240a\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\200\001\360\030\000\005!\320 4\260A\3205I\310\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\340\004*\320*@\300\001\330\004 \320 4\260A\260Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\340\004\"\320\"4\260A\340\004 \320 0\260\001\260\027\270\001\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\340\004\"\320\"4\260A\360\006\000\005!\320 9\270\021\330\010\t\330\010\023\2201\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\340\004\"\320\"4\260A\330\004)\320)A\300\021\340\004 \320 8\270\001\270\027\300\010\310\003\3101\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000)\250\021\360\030\000\005\036\320\0354\260A\330\004\007\200}\220B\220b\230\003\230=\250\003\2501\330\010\016\210j\230\001\230\037\250\001\320)G\300q\310\013\320ST\320TU\340\004%\240^\2601\260K\270q\330\004\013\2106\220\021\320\000)\250\021\360\030\000\005\036\320\0354\260A\330\004\007\200}\220B\220b\230\003\230=\250\003\2501\330\010\016\210j\230\001\230\037\250\001\320)G\300q\310\013\320ST\320TU\340\004'\240~\260Q\260k\300\021\330\004\013\2106\220\021\320\0004\260A\340\004\r\210Q\200\001\360\022\000\005!\320 4\260A\260\\\300\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\320\004\031\230\021\340\010\013\2104\210t\2201\330\014\020\320\020\"\240!\200\001\360\032\000\005!\320 5\260Q\3206F\300h\310a\310q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270""\021\330\004\013\2104\210q\220\001\200\001\360\030\000\005!\320 5\260Q\3206H\310\001\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0005\260Q\340\004\r\210Q\200\001\340\004%\320%5\260Q\330\004\037\230q\330\004\"\240+\250Q\360\006\000\005&\240Q\330\004\037\230q\340\004 \320 5\260Q\330\010\t\330\n\013\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\033@\300\001\300\021\360\006\000\005\"\320!1\260\022\2601\330\004\030\230\007\230v\240Q\240a\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\024\220A\330\010\023\320\023(\250\001\330\014\r\330\014\r\330\014\r\210Q\330\014\r\330\014\027\220q\330\014\r\210Q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210v\220R\220|\2401\360\006\000\t\r\210A\210Q\200\001\340\004%\320%5\260Q\330\004\037\230q\330\004\036\230a\360\006\000\005!\320 9\270\021\330\010\t\330\010 \240\001\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\031\230\007\230v\240Q\240a\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023(\250\001\330\014\r\330\014$\240A\330\014\r\210Q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\020\210v\220R\220q\360\006\000\t\r\210A\210Q\200\001\340\004%\320%5\260Q\330\004 \240\017\250q\260\001\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\032\000\005%\320$5\260W\270A\330\004\034\230C\230q\240\001\340\004 \320 1\260\021\330\010!\240\021\330\010\t\330\010\t\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\032\000\005!\320 6\260a\3207I\310\032\320ST\320TU\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021""\330\004\013\2106\220\021\200\001\360\030\000\005!\320 6\260a\3207I\310\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\030\000\005!\320 6\260a\3207M\310Q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005!\320 6\260a\330\010\030\230\006\320\0362\260(\270!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0006\260a\360\"\000\005\020\320\017\037\230q\240\014\250J\260k\300\031\310!\3106\320QR\320RS\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\330\010\020\220\004\220A\330\010\023\2204\220q\330\010\030\230\004\230A\330\010\021\220\024\220Q\330\010\026\220d\230!\360\006\000\005\r\210K\220v\230Q\200\001\340\004*\320*@\300\001\330\004 \320 6\260a\260q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\030\000\005$\320#6\260a\260z\300\027\310\n\320RS\330<F\300g\310[\320XY\330\004\014\210C\210x\220s\230!\200\001\360\034\000\005$\320#6\260a\260z\300\027\310\n\320R[\320[\\\330<F\300i\310z\320Yc\320cm\320mn\330\004\014\210C\210x\220s\230!\320\0006\260i\270q\360\026\000\005\036\230^\2501\330\004\037\230q\330\004\037\230q\340\004/\250q\340\004\027\220q\360\006\000\005\020\320\017(\250\001\330\010\t\330\n\013\330\010\033\2301\330\010\035\230Q\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\022\2203\220j\240\003\2401\330\010\017\210q\360\006\000\005\022\220\032\2303\230a\330\004\021\320\021+\2506\260\021\260!\330\004\007\200{\220#\220Q\330\010\016\210k\230\021\230!\340\004\005\340\010\023\320\023(\250\001\330\014\r\330\016\017\330\014\037\230q\330\014!\240\021\330\014\r\330\014\r\210Q\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\r\210E\220\025\220a\220q\330\014\022\220'\230\021\230*\240A\240Q\340\010\017\210q\360\006""\000\t\r\210A\210Q\200\001\360\032\000\005\016\320\r(\250\001\250\032\2607\270*\300A\330+5\260Y\270j\310\007\310z\320YZ\200\001\360\030\000\005$\240=\260\001\260\032\2707\300*\310H\320T^\320^_\3306@\300\007\300z\320QX\320Xb\320bc\3306@\300\007\300z\320QX\320Xb\320bc\330\004\014\210C\210x\220s\230!\200\001\360\034\000\005$\240=\260\001\260\032\2707\300*\310I\320U_\320_`\3306@\320@P\320P[\320[k\320kv\320vw\330\004\014\210C\210x\220s\230!\200\001\360\032\000\005!\320 7\260q\3208H\310\010\320PQ\320QR\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\320\0007\260q\360\026\000\005\006\330\010\022\220'\230\022\2301\330\010\021\220\026\220r\230\021\330\010\021\220\026\220r\230\021\320\0007\260q\360\034\000\005!\320 2\260!\260<\270z\310\027\320PQ\320QR\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\0007\260q\340\004\014\210A\200\001\360\030\000\005\034\320\0337\260q\330\004\007\200{\220\"\220B\220c\230\033\240C\240q\330\010\016\210j\230\001\320\031-\250Q\320.J\310!\3109\320TU\320UV\340\004%\320%8\270\001\270\033\300A\330\004\013\2106\220\021\320\0007\260q\340\004.\320.J\310!\330\004\037\230{\250!\360\016\000\005\010\200z\220\021\220&\230\001\330\010\024\220K\230q\330\010\023\220=\240\001\240\021\330\010\024\220A\330\t\023\2201\220F\230!\330\010\024\220A\330\010\023\220=\240\001\330\010\024\220C\220q\230\001\340\010\016\210i\220q\230\001\340\004 \320 9\270\021\330\010\t\330\010\035\320\035-\250S\260\007\260q\330\010\t\210\035\320\026&\240c\250\027\260\001\330\010\t\330\010\t\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\034\000\005!\320 7\260q\330\010\034\230J\240a\240v\250Q\250a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\014\210F\220&\230\006\230a\200\001\360\032\000\005!\320 7\260q\330\010\032\230!\330\010\032\230!\360\006""\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000#\320#8\3208P\320PQ\360\030\000\005(\240q\330\004\033\2301\360\006\000\005\t\320\010\031\230\037\250\001\320)<\320<P\320PQ\330\004\010\320\010\034\230O\2501\320,B\320BY\320YZ\330\004\010\320\010!\240\037\260\001\3201B\320BT\320TU\330\004\010\320\010\032\230!\330\004\010\320\010\036\230a\360\006\000\005\006\330\010\026\320\026-\250Q\250k\270\021\270!\330\010\013\210:\220S\230\001\330\014\r\330\010\022\220'\230\021\230&\240\001\340\004\013\2101\200\001\360\022\000\005!\320 8\270\001\270\034\300Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\032\000\005!\320 8\270\001\330\010\036\230j\320(:\270!\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000;\2709\300A\360\030\000\005\036\230^\2501\330\004,\250A\360\006\000\005\020\320\017%\240Q\330\010\t\330\010!\240\021\330\010\033\2301\330\010\035\230Q\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005!\320 9\270\021\330\010\030\230\006\320\0362\260!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360 \000\005\032\230\021\230!\2309\320$7\260w\270a\340\004\017\320\017*\250!\250;\260a\260y\300\003\3007\310#\310S\320PQ\320QX\320Xe\320el\320lm\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\034\000\005!\320 9\270\021\320:L\310J\320Va\320an\320no\320op\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\200\001\360\014\000\005\016\320\r$\240A\320\000:\270!\360&\000\005\t\320\010\031\230\033\240A\240Q\330\004\010\320\010\034\230K\240q\250\001\330\004\010\320\010!\240\033\250A\250Q\330\004\010\320\010\032\230+\240T\250\021\250)\2601\330\004\010""\320\010\036\230k\250\024\250Q\250n\270A\340\004\017\210\177\230a\230|\250:\260Q\260f\270A\270Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005$\320#<\270A\270Z\300w\310j\320XY\330BL\310I\320U`\320`g\320gr\320rs\330\004\014\210C\210x\220s\230!\200\001\360\030\000\005\016\210_\230A\230Z\240w\250j\270\001\330\037)\250\035\260j\300\001\320\000A\300\021\340\004\r\320\r1\260\021\260!\200\001\360\032\000\005\020\320\017*\250!\330\010\024\220A\330\010\023\2201\330\010\t\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\320\000)\250\021\340\004\014\210A\320\000,\250A\360\032\000\005!\320 2\260!\260<\270z\310\021\310!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\000*\250!\340\004\014\210A\320\000$\240A\340\004\"\320\"4\260A\340\004 \240\017\250q\260\007\260q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200A\340\010\013\2104\210~\320\0351\260\023\260A\330\014\023\2201\330\010\017\210w\220d\230.\250\017\260r\270\027\300\004\300N\320RS\200A\340\010\013\2104\210|\230>\250\023\250A\330\014\023\2201\330\010\017\210w\220d\230,\240o\260R\260w\270d\300,\310a\200A\340\010\013\2104\210~\230]\250#\250Q\330\014\023\2201\330\010\017\210w\220d\230.\250\017\260r\270\027\300\004\300N\320RS\200A\360\014\000\t\014\2104\210~\230X\240S\250\005\250S\260\004\260N\300/\320QT\320TU\330\014\023\2201\340\010 \240\t\250\024\250^\270?\310\"\310D\320P^\320^h\320hj\320jk\340\010\020\220\007\220t\230>\250\030\260\022\2601\200A\360\014\000\t\014\2104\210~\230X\240S\250\005\250S\260\004\260N\300/\320QT\320TU\330\014\023\2201\340\010'\240t\250>\270\037\310\002\310$\310n\320\\]\360\n\000\t\r\210E\220\025\220a\220s\230/\250\021\330\014\025\220T\230\036\240w\250a\250q\330\014\017\210w\220c\230\021\330\020\027\220q\340\010\017\210q\200A\360\014\000\t!\240\t\250\027\260\001\260\021\360""\020\000\t\014\2104\210~\230X\240S\250\005\250S\260\004\260N\300/\320QT\320TU\330\014\022\220,\230a\230q\360\006\000\t\025\320\024<\270A\330\016\017\330\014\035\230Q\330\014\017\210q\220\001\330\014\r\340\010\013\2108\2203\220a\330\014\022\220*\230A\320\035>\270a\270q\360\006\000\t\024\220?\240$\240n\260A\330\010\023\220?\240!\330\010\023\320\023%\320%J\310$\310a\330\010\023\320\023&\240b\250\002\250$\250n\270A\330\010\023\320\023'\240q\330\010\023\320\023%\240R\240r\250\024\250^\2701\330\010\023\320\023(\250\004\250N\270!\330\010\023\320\023&\240a\330\010\023\220=\240\001\360\006\000\t\024\320\023-\250Q\330\014\r\330\016\017\330\014\r\210Q\330\014\r\330\016\017\330\014\r\210Q\340\n\024\220A\220Q\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037>\270a\270q\360\006\000\t\024\320\023+\2501\330\014\r\330\016\017\330\014\023\2205\230\001\330\014\r\210T\220\021\340\010\013\2107\220#\220Q\330\016\"\240!\2401\330\014\022\220,\230a\320\037>\270a\270q\360\006\000\t\024\320\023%\240Q\330\010\023\2209\230A\230R\320\0372\260$\260n\300A\330\010\023\2209\230A\230R\320\0370\260\004\260N\300/\320QS\320SW\320We\320eo\320oq\320qr\330\010\023\2209\230A\230R\230y\250\004\250N\270!\360\006\000\t\026\220T\230\036\240q\330\010\023\320\023%\240Q\320&6\260l\300!\3001\340\n\036\230a\230q\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037=\270Q\270a\340\010\017\210q\200A\340\010\013\2104\210t\2201\330\014\023\2201\340\010\014\210L\230\013\2401\340\010$\320$8\270\001\270\024\270Q\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037;\2701\270A\340\010\017\210q\200A\340\010\013\2104\210t\2201\330\014\023\2201\340\010\014\210N\230-\240q\340\010$\240O\2601\260D\270\016\300a\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037=\270Q\270a\340\010\017\210q\200A\340\010\013\2104\210t\2201\330\014\022\220,\230a\230q\340\010\014\210L\230\013\2401\330\010\014\210L\320\030)\250\021\340\010$\320$9\270\021\270$\270a\330\010\013\2107\220#\220Q\330\014\020\220\014\230K\240q\330\014\022""\220,\230a\320\037<\270A\270Q\340\010\017\210q\200A\340\010\013\2104\210t\2201\330\014\022\220,\230a\230q\340\010\014\210N\230-\240q\330\010\014\210N\320\032+\2501\340\010$\320$4\260A\260T\270\036\300q\330\010\013\2107\220#\220Q\330\014\020\220\016\230m\2501\330\014\022\220,\230a\320\037>\270a\270q\340\010\017\210q\200\001\360\022\000\005&\320%<\270A\330\004\013\2106\220\021\320\000A\300\021\360\034\000\005!\320 6\260a\330\010\027\220q\330\010\036\230a\330\010\t\210\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\016\210j\230\n\240!\360\006\000\005\010\200z\220\030\230\025\230a\330\010\016\210a\210{\230*\240E\250\021\330\t\023\2208\2305\240\001\330\010\016\210a\210{\230*\240E\250\021\330\t\023\2208\2305\240\001\330\010\016\210a\210{\230*\240E\250\021\330\t\023\2208\2306\240\021\330\"#\330\"#\330\010\016\210a\210{\230*\240E\250\021\330\t\023\2208\2305\240\001\330\010\016\210a\210q\330\014\025\220Z\230u\240F\250!\330\014\027\220z\240\025\240f\250A\330\014\027\220z\240\025\240f\250A\330\014\026\220j\240\005\240V\2501\330\014\031\230\032\2405\250\006\250a\330\014 \240\n\250%\250v\260Q\330\014\024\220J\230e\2406\250\021\330\014\025\220Z\230u\240F\250!\360\006\000\005\014\2101\200\001\360\024\000\005\006\330\010\024\220A\330\010\021\220\021\330\010\024\220A\200\001\360\022\000\005!\240\014\250A\250_\270A\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200A\340\010\014\210L\230\010\240\001\200A\340\010\014\210L\320\030)\250\021\200A\360\026\000\t\r\210N\320\0320\260\014\270I\300R\300t\310>\320YZ\330\010\014\210N\320\032+\2501\330\010\014\210N\230-\240q\360\006\000\t#\240)\2504\250~\320=Q\320QS\320SW\320We\320eo\320oq\320qr\330\010\014\210N\230*\240M\260\026\260q\270\001\330\010\013\2104\210~\230X\240S\250\001\330\014\022\220+\230Q\230a\330\010\016\210a\210t\220>\240\031\250#\250Q\360\010\000\t\024\320\023&\240a\330\014\r\210T\220\021\330\014\r\330\014\r\210T\220\021\330\016\"\240!\330""\016\017\330\014\r\330\014\r\210T\220\021\340\010\013\2107\220#\220Q\330\014\020\220\001\220\024\220^\2401\330\014\020\220\016\230j\250\001\330\014\022\220,\230a\320\037E\300Q\300a\360\006\000\t\027\220l\320\"A\300\022\3004\300~\320Ub\320bc\330#'\240~\260Z\270r\300\021\340\010\014\210E\220\025\220a\220q\330\014\027\320\0270\260\001\260\024\260^\300=\320PQ\320QU\320U]\320]^\320^_\330\014\017\210w\220c\230\021\330\022$\240A\240T\250\036\260q\330\020\024\220O\2401\330\020\024\220A\220T\230\036\240q\330\020\024\220N\240*\250A\330\020\026\220l\240!\320#E\300Q\300d\310!\3101\340\014\027\320\027/\250q\260\004\260N\300$\300h\310a\310t\320SV\320VW\330\014\017\210w\220c\230\021\330\022$\240A\240T\250\036\260q\330\020\024\220O\2401\330\020\024\220A\220T\230\036\240q\330\020\024\220N\240*\250A\330\020\026\220l\240!\320#D\300A\300T\310\021\310!\340\010\014\210O\2301\330\010\017\210q\200\001\360\032\000\005\037\320\036<\270A\320=O\310q\330\004\007\200}\220B\220b\230\003\230=\250\003\2501\330\010\016\210j\230\001\230\037\250\001\320)G\300q\310\014\320TU\320UV\340\004%\320%9\270\021\330\010\032\230(\240+\250Q\330\004\013\2106\220\021\320\000<\270A\340\004\r\210Q\320\000,\250A\340\004\r\210Q\320\000\024\220A\340\004\r\210Q\200A\360\006\000\t!\240\t\250\027\260\001\260\021\360\024\000\t&\240Q\360\010\000\t\025\320\024<\270A\330\016\017\330\014\035\230Q\330\014\017\210q\220\001\330\014\r\360\006\000\t\014\2108\2203\220a\330\014\022\220*\230A\320\035>\270a\270q\360\006\000\t\024\320\023'\240q\250\t\260\021\260!\330\n\024\220A\220Q\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037<\270A\270Q\340\010\t\340\014\023\2207\230!\330\014\027\320\027/\250q\330\020\021\330\022\023\330\020\021\220\021\330\020\021\220\021\340\014\017\210w\220c\230\021\330\020\026\220l\240!\320#@\300\001\300\021\360\006\000\r\032\230\037\250\001\330\014\031\230\037\250\001\330\014\031\320\031+\2501\330\014\031\320\031,\320,?\270r\300\021\330\014\031\320\031-\250Q\330\014\031\320\031+\2509\260B\260a\330\014""\031\320\031.\250a\330\014\031\320\031,\250A\330\014\031\230\035\240a\340\014\027\320\027/\250q\330\020\021\330\022\023\330\020\027\220q\330\020\021\220\021\340\014\017\210w\220c\230\021\330\020\026\220l\240!\320#B\300!\3001\360\006\000\r\024\2207\230!\330\014\027\320\027/\250q\330\020\021\330\022\023\330\020\021\220\021\330\020\021\220\021\340\014\017\210w\220c\230\021\330\020\026\220l\240!\320#@\300\001\300\021\360\006\000\r\"\240\034\320-@\300\003\300<\310r\320Q\\\320\\]\360\006\000\r \230}\320,<\270B\270k\310\021\360\006\000\r\033\320\032/\250v\260Q\330\020+\2502\250R\250r\260\021\340\014\017\210|\2303\230a\330\020\026\220k\240\021\240!\340\014\027\320\027)\250\021\330\014\027\220y\240\001\240\022\2409\250F\260!\2601\330\014\017\210{\230)\2401\240B\240g\250S\260\001\330\020\024\220A\220Q\330\020\026\220k\240\021\240!\340\014\022\220!\220;\230i\240q\250\002\250(\260#\260Q\330\014\027\220y\240\001\240\022\320#4\260A\330\014\027\220y\240\001\240\022\320#6\260m\3001\360\006\000\r\033\230!\330\014\022\220,\230b\240\013\2501\330\020!\240\033\320,?\270r\300\021\330\020\023\220?\240\"\240A\330\024%\240Q\360\006\000\021!\320 2\260!\330\020 \240\t\250\021\250\"\320,?\270}\310A\330\020 \240\t\250\021\250\"\250I\260W\270K\300y\320PQ\320QS\320SZ\320Z]\320]i\320ik\320kx\320xy\330\020 \240\t\250\021\250\"\320,=\270_\310B\310m\320[\\\340\020\033\320\033,\250A\250\\\270\021\320:J\310!\3101\330\020\023\220?\240#\240Q\330\024\025\340\020\037\230q\360\006\000\r\020\210t\220<\230}\250C\250q\330\020\023\2204\220|\240<\250y\270\001\270\022\2707\300#\300Q\330\024\030\230\001\230\024\230\\\250\034\260Y\270a\270r\300\021\330\020\024\220A\220T\230\034\240Q\360\006\000\r\021\220\014\230O\2501\330\014\020\220\014\320\034,\250A\330\014\020\220\014\320\034-\250Q\330\014\020\220\014\230K\240q\330\014\020\220\014\230H\240A\360\006\000\017#\240!\2401\340\010\017\210q\200A\360\016\000\t\024\320\023&\240a\330\010\023\320\023)\250\021\330\010\023\320\023.\250a\330\010\023\320\023%\240Q\330\010\023""\320\023)\250\021\340\010\021\320\021(\250\001\250\026\250q\260\001\330\010\013\2105\220\003\2201\330\014\022\220,\230a\230q\360\006\000\t\024\320\023-\250Q\250f\260A\260T\270\021\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037F\300a\300q\360\010\000\t\026\220_\240A\330\010\025\220_\240A\330\010\025\320\025'\240q\330\010\025\320\025(\320(;\2702\270Q\330\010\025\320\025)\250\021\330\010\025\320\025'\240y\260\002\260!\330\010\025\320\025*\250!\330\010\025\320\025(\250\001\330\010\025\220]\240!\340\010\023\320\023(\250\001\330\014\020\220\001\330\016\017\330\016\017\330\014\r\330\014\r\210Q\330\014\023\2201\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037>\270a\270q\360\010\000\t\030\220}\240A\330\010\027\320\027*\250!\2504\250q\340\010\023\320\023(\250\001\330\014\020\220\001\330\016\017\330\016\017\330\014\r\330\014\r\210Q\330\014\023\2201\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037@\300\001\300\021\360\006\000\t\024\320\023'\240q\250\004\250A\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\037A\300\021\300!\340\010\014\210O\2301\330\010\017\210q\200\001\360\032\000\005!\320 <\270A\330\010\"\240,\250a\250q\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\014\000\005\006\340\010\030\320\030(\250\001\250\021\330\010\023\220=\320 1\260\021\260!\340\010\013\210<\220r\230\021\330\014\022\220,\230a\230q\340\010\021\320\021/\250q\360\006\000\t\n\330\014\027\220v\230Q\330\014\027\220q\330\014\034\230A\330\014\032\230!\2306\240\033\250A\250S\260\004\260E\270\025\270a\270q\330\014\033\2306\240\021\330\014\034\230F\240!\330\014\027\220v\230Q\330\014\030\230\006\230a\330\014\033\230=\250\006\250k\270\034\300Y\310f\320T_\320_`\330\014\031\230\035\240f\250I\260\\\300\031\310&\320PY\320YZ\330\014\034\230M\250\026\250|\270<\300y\320PV\320Vb\320bc\330\014 \240\r\250V\3203C\300<\310y\320X^\320^n\320no\330\014\036\230m\2506\260\036\270|\3109\320TZ\320Zh\320hi\330\014\032\230-\240v\250Z\260|\3009\310F""\320R\\\320\\]\330\014\036\230f\240A\330\014\034\230F\240!\330\014\"\240&\250\001\330\014$\240F\250!\330\014$\240F\250!\330\014$\240F\250!\330\014\027\220v\230Q\360\010\000\t\r\210E\220\025\220a\220v\230Q\330\014\r\330\020\037\230v\240X\250Q\250b\260\001\330\020\034\230F\240(\250!\2502\250Q\340\014\022\220!\220:\230W\240A\240Q\360\006\000\t\r\210E\220\025\220a\220v\230Q\330\014\r\330\020\037\230v\240]\260!\2602\260Q\330\020\034\230F\240-\250q\260\002\260!\340\014\022\220!\220?\240'\250\021\250!\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\320\000$\240A\360\006\000\005 \230q\360\010\000\005\031\230\001\340\004\031\230\021\330\010\t\210\021\330\n\013\330\n\013\330\n\013\360\010\000\005\020\320\017.\250c\3201L\310A\310Y\320VY\320Y_\320_`\320`a\330\004\007\200w\210c\220\021\330\010\017\210q\340\004\023\220:\230S\240\001\330\004\007\200}\220C\220q\330\010\017\210q\360\006\000\005\022\320\021$\240F\250!\2501\330\004\007\200{\220#\220Q\330\010\017\210q\340\004\005\330\010\023\320\023.\250c\3201L\310A\310Y\320VY\320Y_\320_`\320`k\320kl\330\010\013\2107\220#\220Q\330\014\020\220\005\220U\230!\2301\330\020\027\220w\230a\230z\250\021\250!\340\010\014\210A\210Q\340\004\013\2101\320\000<\270A\360*\000\005\010\200s\210!\2106\220\022\2201\330\010\016\210j\230\001\230\021\360\006\000\005\024\320\023-\250R\250s\260!\2601\330\004\016\320\016\"\240&\250\001\250\021\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\340\010\023\320\023&\240a\240q\360\006\000\t\024\320\023%\240Q\330\014\025\220^\2401\330\014\036\230a\330\014\027\220s\230!\2301\330\014\035\230W\240A\340\010\013\2104\210q\330\014\022\220,\230a\230q\360\006\000\t\024\2209\230A\330\014\034\230A\330\014 \240\001\330\014\r\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210q\360\006\000\t\r\210A\210Q\200A\340\010\017\210t\220>\240\021\200A\340\010\017\210t\2201\220D\230\014\240A\200A\340\010\017\210t\2201\220D\230\016\240a\200A\340\010\017\210t\2206\230""\021\200\001\360\022\000\005!\240\014\250A\250\\\270\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\320\000B\320BW\320WX\360\032\000\005\036\230^\2501\340\004/\250q\340\004+\2501\330\004!\240\033\250B\250m\2702\270Q\360\010\000\005\023\320\022'\240v\250Q\330\010#\2402\240R\240r\250\021\340\004\007\200|\2203\220a\330\010\016\210k\230\021\230!\340\004\005\340\010\023\320\023%\240Q\330\010\023\2209\230A\230R\320\0372\260!\330\010\023\2209\230A\230R\320\0370\260\001\330\010\023\2209\230A\230R\230y\250\006\250a\250q\340\010\013\210;\220i\230q\240\002\240'\250\023\250A\330\014\022\220+\230Q\230a\360\006\000\t\017\210a\210{\230)\2401\240B\240h\250m\320;K\310=\320X[\320[\\\320\\]\360\006\000\t\017\210a\210q\220\013\2303\230a\330\010\021\220\037\240\001\330\010\021\220\034\230Q\360\006\000\t\024\320\023#\2401\330\014\r\330\014\r\210Q\330\014\r\210Q\330\014\r\330\014\027\220q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\030\220w\230k\250\031\260!\2602\260W\270B\270a\340\010\017\210q\360\006\000\t\014\210<\220s\230!\330\014\017\210{\230)\2401\240B\240g\250S\260\001\330\020\024\220A\220[\240\t\250\021\250\"\250A\330\014\020\220\001\220\021\320\000B\320BZ\320Z[\360\032\000\005\006\330\010\023\2208\2302\230Q\330\010\020\220\005\220R\220q\330\010\024\220I\230R\230q\330\010\034\320\034-\250R\250q\330\010\024\220A\320\000B\300)\3101\360\024\000\005\036\230^\2501\360\006\000\005\020\320\017%\240Q\330\010\t\330\010!\240\021\330\010\033\2301\330\010\035\230Q\330\010$\240A\330\010\t\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000B\300!\360\024\000\005(\320';\2701\330\004$\240A\330\004!\240\033\250B\250b\260\002\260!\330\004\030\230\007\230v\240Q\240a\360\010\000\005\010\200w\210c\220\027\230\001\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023%\240Q\330\010\023\2209\230A\230R\320\0372\260!\330\010\023\2209""\230A\230R\320\0370\260\001\330\010\023\2209\230A\230R\230y\250\001\340\010\023\320\023$\240A\240Z\250q\3200@\300\001\300\021\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\026\220k\240\031\250!\2502\250Q\330\010\021\220\026\220r\230\021\330\010\020\220\010\230\001\340\010\014\210A\210Q\200\001\360\026\000\005\006\330\010\024\220B\220b\230\003\2301\230A\330\010\021\220\021\330\010\024\220A\330\010\024\220A\200\001\360\032\000\005,\320+C\3001\320DV\320VW\330\004\013\2101\320\000D\300A\340\004\r\210Q\200\001\360D\001\000\005&\320%5\260Q\330\004\037\230{\250&\260\006\260a\260q\330\004\"\240+\250Q\360\010\000\005&\240Q\330\004\037\230q\340\004\017\320\017$\240A\330\010\t\330\n\013\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004#\320#3\2602\260Q\330\004\007\200{\220&\230\006\230a\230s\240\"\240A\330\010\016\210j\230\001\330\014 \240\001\240\026\240v\250Q\250a\330\014\022\220!\320\0235\260Q\260a\330\014 \240\001\240\021\360\010\000\005\020\320\017$\240A\330\010\t\330\010\t\330\010\t\210\021\330\010\t\330\010\023\2201\330\010\t\210\021\330\010\t\210\026\210q\220\001\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\210;\220a\200\001\360D\001\000\005+\320*@\300\001\330\004%\240[\260\n\270&\300\001\300\021\330\004&\240k\260\035\270f\300A\300Q\360\006\000\005\020\320\017+\2501\330\010\t\330\010\t\330\010\t\210\032\2201\220A\330\010\t\210\021\330\010\t\210\035\220a\220q\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360 \000\005\035\230D\240\007\240q\250\001\330\004$\240L\260\007\260q\270\001\330\004\035\230U\240'\250\021\250!\340\004\020\320\020*\250!\330\n \240\016\250a\340\004\030\320\0302\260!\330\n \320 6\260a\340\004\021\320\021+\2501\330\n \240\017\250q\360\010\000\005\006\340\010\023\320\023$\240A\330\014\036\230a\330\014""\025\320\025&\240j\260\001\260\021\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\200\001\360 \000\005\035\230D\240\007\240q\250\001\330\004$\240L\260\007\260q\270\001\330\004\035\230U\240'\250\021\250!\340\004\020\320\020*\250!\330\n \240\016\250a\340\004\030\320\0302\260!\330\n \320 6\260a\340\004\021\320\021+\2501\330\n \240\017\250q\360\010\000\005\006\330\010\023\320\023,\250A\330\014\025\320\025&\240j\260\001\260\021\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\200\001\360\030\000\005\035\230D\240\007\240q\250\001\330\004$\320$>\270a\330\n \240\016\250a\360\010\000\005\010\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023$\240A\240Y\250f\260F\270!\2701\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210v\220Q\340\n\024\220A\220Q\200\001\360\032\000\005\035\230D\240\007\240q\250\001\330\004$\320$>\270a\330\n \240\016\250a\360\010\000\005\010\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023$\240A\320%7\260x\270y\310\001\310\021\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210v\220Q\340\n\024\220A\220Q\200\001\360\032\000\005\035\230D\240\007\240q\250\001\330\004$\320$>\270a\330\n \240\016\250a\360\010\000\005\010\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023)\250\021\330\014\036\230h\240i\250v\260V\2701\270A\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210v\220Q\340\n\024\220A\220Q\200\001\360\030\000\005\016\320\r!\240\021\240*\250G\260:\270Q\330$.\250g\260Z\270q\200\001\360\032\000\005'\320&G\300q""\320H^\320^_\340\004\007\200v\210R\210r\220\023\220F\230#\230Q\330\010\016\210j\230\001\230\037\250\001\320)A\300\021\300+\310Q\310a\340\004%\320%=\270Q\330\010\036\230j\250\016\260a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\033;\2701\270A\340\004\013\2101\320\000H\310\001\360\024\000\005+\320*@\300\001\330\004\037\230q\360\010\000\005\020\320\017-\250Q\250k\270\035\300a\300{\320RS\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\007\200z\220\023\220A\330\010\017\210q\340\004\030\230\007\230v\240Q\240a\330\004\007\200w\210c\220\027\230\001\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023-\250Q\250k\270\035\300a\300{\320RS\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\021\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q\320\000'\320':\270!\360\010\000\005\035\230I\240W\250A\250Q\340\004\020\320\0208\270\001\330\n\013\330\010\031\230\021\330\010\013\2101\210A\330\010\t\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\230\021\340\004 \320 1\260\021\330\010\t\330\010!\240\021\330\010\034\230A\330\010\t\210\021\360\006\000\007\021\220\001\220\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\010\000\005\035\230I\240W\250A\250Q\340\004\020\320\0208\270\001\330\n\013\330\010\031\230\021\330\010\013\2101\210A\330\010\t\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\230\021\340\004 \320 A\300\021\330\010\t\330\010\t\210\021\360\006\000\007\021\220\001\220\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\320\000I\310\021\360 \000\005(\320'<\270A\330\010!\240\021\330\010\023\2201\330\010\023\2201\330\010\023\2201\330\010\023\2201\340\004\007\200~\220S\230\001\330\010\016\210l\230!\320\033F\300a\300q\330\004\013\2101\200\001\340\004.\320.I\310\021\340\004 \320 >\270a\270q\330\004\007\200w\210c\220\021""\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000K\3101\360\024\000\005(\320';\2701\330\004\037\230q\330\004\030\230\007\230v\240Q\240a\360\006\000\005\010\200w\210c\220\027\230\001\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023+\2501\250J\260m\3001\300K\310q\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\021\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q\320\000K\3101\360\036\000\005!\320 4\260A\330\010!\240\021\330\010\037\230q\330\010\033\2301\330\010\023\2201\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\000K\3101\360\024\000\005+\320*@\300\001\330\004%\240S\250\001\250\021\330\004&\320&6\260b\270\001\330\004\036\230g\240W\250A\330\004\037\230w\240f\250A\250Q\360\006\000\005\010\200~\220S\230\007\230q\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023/\250q\330\014\r\330\014\r\330\014\r\330\014\r\210Q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\021\220\035\230b\240\001\330\010\017\210q\340\010\014\210A\210Q\200\001\360\022\000\006\007\360L\001\000\005+\320*@\300\001\360\006\000\005.\250Q\360\n\000\005\022\320\021!\240\027\250\001\250\032\2601\260A\330\004\021\320\021&\240k\260\032\2706\300\021\300!\330\004\021\320\021!\240\021\330\004\021\320\021\"\240!\330\004\021\220\037\320 2\260!\2601\360\006\000\005\021\220\001\320\021%\240Q\240m\2601\360\006\000\005\032\320\031.\250f\260A\3205P\320PR\320RS\330\004\007\320\007\032\230#\230Q\330\010\016\210k\230\021\230!\340\004\005\340\010\032\320\032,\250A\330\010\032\230)\2401\240B\320&9\270\035\300n\320TU\330\010\032\230)\2401\240B\320&7\260{\300-\310v\320UV\320VW\330\010\032\230)\2401\240B\240i\250q\260\r\270Q\270a\360\006\000\t\024\320\0233\2601\330\014\r\330\014\r\330\014\r\210Q\330\014\r\210Q\330\014\r\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000""\t\030\320\027)\250\031\260!\2602\260Q\330\010\020\220\016\230a\360\006\000\t\r\210A\210Q\200\001\360\032\000\005\036\320\035:\270!\320;M\310Q\330\004\007\200}\220B\220b\230\003\230=\250\003\2501\330\010\016\210j\230\001\230\037\250\001\320)G\300q\310\013\320ST\320TU\340\004'\320';\2701\330\010\032\230(\240+\250Q\330\004\013\2106\220\021\200\001\360\032\000\005!\320 :\270!\320;M\310Z\320Wf\320fg\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\036\000\005\035\230M\250\027\260\001\260\021\330\004)\320)C\3001\330\n \240\016\250a\330\004\035\230U\240'\250\021\250!\330\004%\320%?\270q\330\n \240\017\250q\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\230\021\330\004\007\200t\2101\330\n\024\220A\220Q\330\010\016\210j\230\001\230\021\340\004\005\330\010\023\320\023/\250q\330\014\036\230e\240>\260\021\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210q\340\n\024\220A\220Q\330\n\024\220A\220Q\200\001\360\034\000\005\035\230M\250\027\260\001\260\021\330\004)\320)C\3001\330\n \240\016\250a\360\010\000\005\010\200t\2101\330\010\016\210j\230\001\230\021\340\004\005\330\010\023\320\0230\260\001\330\014\036\230e\240>\260\021\260!\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210q\340\n\024\220A\220Q\200\001\360\036\000\005\035\230M\250\027\260\001\260\021\330\004)\320)C\3001\330\n \240\016\250a\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\230\021\340\004\005\330\010\023\320\0230\260\001\330\014\036\230e\240>\260\033\270A\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210q\340\n\024\220A\220Q\320\004(\250\010\260\001\340\010\014\210N\230!\320\000)\250\021\340\004\r\210Q\320\000;\320;Q\320QR\360\036\000\005\035\230I\240W\250A\250Q\330\004!\320!I\310\021\330\n\013\330\010\031\230\021\330\010\013\2101\210A\330\010\t\360\010\000\005\010\200t\2101\330\010\016\210j\230\001\320\031@\300\001""\300\021\340\004\005\330\010\023\320\023)\250\021\330\014\036\230a\330\014\r\330\014\027\220q\330\014\027\220q\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210q\360\006\000\013\025\220A\220Q\320\000*\250!\340\004\r\210Q\320\000@\300\001\340\004\r\210Q\320\000-\250Q\360\032\000\005!\320 3\2601\260O\300:\310Q\310a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\014\000\005\016\210Q\200\001\340\004'\320'=\270Q\330\004!\240\021\340\004\014\320\014)\250\021\340\004 \320 4\260A\330\010\t\330\010\023\2201\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\330\010\027\220q\330\010\021\220\021\330\010\030\230\004\230A\230V\2404\240q\200\001\340\004\r\210Q\200\001\340\004'\320'=\270Q\330\004 \320 5\260Q\260a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\330\004\n\210+\220Q\200\001\360\022\000\005\016\320\r*\250!\320+=\270Q\320\000(\250\001\340\004\r\210Q\320\000-\250Q\340\004\014\210A\200\001\360\032\000\005!\320 =\270Q\320>N\310h\320VW\320WX\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2108\2201\200\001\360\032\000\005\034\320\033=\270Q\320>P\320PQ\330\004\007\200{\220\"\220B\220c\230\033\240C\240q\330\010\016\210j\230\001\320\031-\250Q\320.J\310!\3109\320TU\320UV\340\004%\320%>\270a\330\010\032\230(\240+\250Q\330\004\013\2106\220\021\200\001\360\032\000\005!\320 =\270Q\320>P\320PZ\320Z[\320[\\\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\032\000\005!\320 =\270Q\320>P\320PZ\320Ze\320ef\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\000=\270Q\340\004\r\210Q\320\000-\250Q\340\004\r\210Q\200\001\360\010\000%&\360>\000\005(\320'=\270Q\330""\004\037\230{\250$\250f\260A\260Q\340\004 \320 :\270!\330\010\t\330\010\t\330\010\t\210\024\210Q\210a\330\010&\240a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\032\000\005\010\200{\220#\220Q\330\010\016\210j\230\001\230\021\340\004 \320 =\270Q\320>N\310h\320Vb\320bc\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\340\004'\320'=\270Q\330\004\037\230q\330\004\037\230q\360\006\000\005!\320 ?\270q\330\010\t\330\010&\240a\330\010\t\210\021\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\031\230\007\230v\240Q\240a\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004!\240\021\340\004\005\330\010\023\320\023.\250a\330\014\r\330\014*\250!\330\014\r\210Q\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\014\210<\220u\230A\340\014\023\220<\230q\320 A\300\021\330\r\031\230\026\230q\330\035\036\330\035\036\330\035\036\330\035\036\340\014\017\210z\230\023\230A\330\020\030\230\014\240G\2501\250A\330\021\033\2303\230a\330\020\030\230\014\240G\2501\250A\330\r\031\230\026\230q\330\035\036\340\014\024\220L\240\007\240q\250\001\360\006\000\r\024\2206\230\022\2301\360\006\000\t\r\210A\210Q\200\001\360\014\000\006\007\360.\000\005+\320*@\300\001\360\006\000\005.\250Q\360\020\000\005\021\220\007\220w\230a\360\006\000\005\022\320\021!\240\021\330\004\021\320\021&\240c\250\021\250!\330\004\021\320\021!\240\021\330\004\021\320\021\"\240!\330\004\021\220\037\320 2\260!\2601\360\006\000\005\021\220\001\320\021%\240Q\240m\2601\360\010\000\005\032\230\023\230A\230\\\250\022\2501\330\004\024\220G\2306\240\021\240!\330\004\007\200~\220S\230\001\330\010\016\210k\230\021\230!\360\006\000\005\032\320\031.\250f\260A\3205P\320PR\320RS\330\004\007\320\007\032\230#\230Q\330\010\014\210A\210Q\330\010\016\210k\230\021\230!\340\004""\005\330\010\032\320\032,\250A\330\010\032\230)\2401\240B\320&9\270\035\300n\320TU\330\010\032\230)\2401\240B\320&7\260q\330\010\032\230)\2401\240B\240i\250q\360\006\000\t\024\320\0233\2601\330\014\r\330\014\r\330\014\r\210Q\330\014\r\210Q\330\014\r\330\014\r\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\030\320\027)\250\031\260!\2602\260Q\330\010\021\220\035\230b\240\001\340\010\020\220\010\230\001\360\006\000\t\r\210A\210Q\330\010\014\210A\210Q\320\000\032\230(\240!\360\014\000\004\013\210#\210Q\210f\220C\220s\230!\330\003\014\210C\210q\220\004\220A\220T\230\023\230D\240\003\2403\240a\240t\2501\250D\260\003\2604\260q\330\014\017\210q\220\004\220A\220T\230\023\230D\240\002\240#\240Q\240d\250!\2501\200\001\360\024\000\005(\320':\270!\360\006\000\005!\320 =\270Q\270k\310\021\310!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\005\330\010\020\220\004\220A\330\010\023\2204\220q\330\010\030\230\004\230A\330\010\021\220\024\220Q\330\010\026\220d\230!\200\001\360\022\000\005!\240\r\250Q\250l\270!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\022\000\005!\240\r\250Q\250o\270Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\320\000U\320UV\330)F\300a\360\030\000\005#\240/\260\021\260!\330\004\035\320\035;\2701\270F\300+\320Md\320de\360\010\000\005\010\200t\2103\210a\330\n\024\220A\220Q\330\010\016\210j\230\001\320\031;\2701\270A\360\006\000\005\021\220\001\220\037\240\001\240\021\340\004 \320 :\270!\330\010\t\330\010\t\330\010\t\210\021\330\010\t\330\n\013\330\010\t\210\021\360\006\000\007\021\220\001\220\021\330\006\020\220\001\220\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\030\000\005!\320 :\270!\320;U\320UV\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200""\001\360\024\000\005\016\210U\220#\220X\230R\230q\330\004\n\210&\220\002\220!\330\004\013\2106\220\023\220C\220r\230\021\330\004\014\210H\220E\230\021\200\001\360\026\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220E\230\022\2306\240\031\250\"\250A\320\000)\250\021\360\026\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220E\230\022\2306\240\031\250\"\250A\200\001\360\024\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220H\230B\230f\240A\200\001\360\026\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220K\230r\240\026\240v\250R\250q\200\001\360\030\000\005\016\320\r\"\240!\240:\250W\260J\270a\330%/\250w\260j\300\001\200\001\360\026\000\005$\240?\260!\260:\270W\300J\310i\320Wb\320bc\330\004\014\210C\210x\220s\230!\200\001\360\"\000\005\014\210:\220Z\230q\330\004\013\2109\220J\230a\330\004\013\2109\220J\230a\330\004\013\210<\220q\340\004'\320'E\300Q\330\010\027\220q\330\010\033\2301\330\010\t\210\021\360\006\000\005\010\200~\220S\230\001\330\010\016\210l\230!\320\033O\310q\320PQ\330\004\013\2101\200\001\360\014\000\005\016\320\r)\250\021\200\001\360\022\000\005\016\320\r&\240a\240{\260!\200\001\340\004,\320,>\270a\330\006\"\240!\2401\200\001\340\004,\320,>\270a\330\006#\2401\240A\320\000\026\220a\360\030\000\005\020\210{\230!\2301\230A\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\320\000\026\220a\360\024\000\005!\240\013\2501\250C\250q\260\001\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\200\001\360\032\000\005\"\240\031\250'\260\021\260!\330\004$\320$>\270a\330\n \320 3\2601\360\010\000\005\010\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023(\250\001\330\014\036\230h\240i\250q\260\001\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210v\220Q\340\n\024\220A\220Q\200\001\360\032\000\005\"\240\031\250'\260\021\260!\330\004$\320$>\270a\330\n \320 3\2601""\360\010\000\005\010\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023'\240q\330\014\036\230h\240i\250v\260V\2701\270A\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\330\010\017\210v\220Q\340\n\024\220A\220Q\320\000.\250a\360\032\000\005!\320 4\260A\260\\\300\032\3101\310A\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\004&\240a\360\024\000\t\014\2104\320\017\"\240#\240Q\330\014\023\2201\360\006\000\t\021\220\004\320\024&\320&@\300\001\330\010\027\220t\320\033-\250V\2607\270!\340\010\t\330\014\025\220U\230!\330\014\024\220E\230\035\240a\240~\260Q\330\014\025\220U\230.\250\001\250\036\260q\330\014\032\230%\230q\320\004&\240a\340\010\013\2104\210q\330\014\022\220,\230a\230r\240\021\240$\240j\260\001\320\000.\250a\360\032\000\005!\320 5\260Q\260l\300*\310A\310Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2104\210q\220\001\320\000 \320 >\270a\360\032\000\005\010\320\007\031\230\023\230A\330\010\034\320\034B\300!\360\014\000\007*\250\021\250!\2501\360\006\000\005\013\210+\320\025&\240d\250!\250;\260a\360\006\000\005\017\320\016\037\230t\2401\240K\250q\330\004\n\320\n\033\2301\230C\230q\240\n\250!\330\004\010\210\005\210U\220!\2206\230\021\330\010\013\210:\220Q\220g\230Q\230d\240!\330\014\022\220(\230!\2302\230_\320,@\300\007\300q\310\002\310$\310a\310\177\320^_\330\014\022\220(\230!\2302\230\\\320):\270'\300\021\300\"\300D\310\001\310\034\320UV\360\006\000\005\024\320\023$\240D\250\001\320)9\270\021\330\004\n\320\n \240\001\240\023\240A\240_\260A\330\004\010\210\005\210U\220!\2206\230\021\330\010\013\210:\220Q\220l\240!\2404\240q\330\014\022\220-\230q\240\002\240/\3201E\300\\\320QR\320RT\320TX\320XY\320Yh\320hi\330\014\022\220-\230q\240\002\240,\320.?\270|\3101\310B\310d\320RS\320S_\320_`\360\006\000\005\023\320\022#\2404\240q\250\016\260d\270!\2705\300\001\300\021\330\004\010\210\005\210U\220!\2201\330\010\016""\210k\230\021\230%\230z\250\033\260A\260V\2702\270R\270s\300!\320CU\320U_\320_`\360\006\000\005\013\210/\230\032\320#4\260D\270\001\270\037\310\001\330\004\n\320\n\032\230*\320$5\260T\270\021\320:J\310!\330\004\n\210+\220Z\320\0370\260\004\260A\260[\300\001\330\004\n\210,\220j\320 1\260\024\260Q\260l\300!\360\006\000\005\023\320\022#\2404\240q\250\017\260}\300C\300y\320PQ\330\004\025\220[\240\004\240A\240]\260!\330\004\n\210+\220]\320\"8\270\001\330\004\n\210+\220Y\230k\250\033\260D\270\001\270\031\300!\340\004\017\320\017 \240\004\240A\240]\260-\270s\300)\3101\330\004\031\230\030\240\024\240Q\240m\2601\330\004\n\210)\220=\320 6\260a\330\004\n\210)\2209\230K\240x\250t\2601\260I\270Q\360\006\000\005\013\320\n\034\230J\320&7\260t\2701\320<N\310a\330\004\n\320\n\032\230*\320$5\260T\270\021\320:J\310!\330\004\n\320\n \240\n\320*;\2704\270q\320@V\320VW\330\004\n\320\n\"\240*\320,=\270T\300\021\320BZ\320Z[\330\004\n\320\n\"\240*\320,=\270T\300\021\320BZ\320Z[\360\010\000\005\013\320\n\"\240!\330\004\n\210+\220Q\360\006\000\005%\240M\260\021\330\n\013\330\010\023\2201\220A\330\010\t\360\006\000\005'\240a\340\004\007\320\007\033\2307\240!\330\010\031\320\031,\250G\2601\260A\330\010\030\320\0302\260!\330\016$\320$6\260a\360\014\000\005\006\330\010\023\320\023,\250A\250]\270+\300Q\300a\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\330\010\013\2101\330\016\030\230\001\230\021\200\001\340\004,\320,>\270a\330\004 \320 B\300!\3001\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\022\000\005\016\320\r.\250a\320/E\300Q\320\000>\270a\340\004\r\210Q\200\001\360\030\000\005!\320 >\270a\320?Q\320QR\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000>\270a\340\004'\320'=\270Q\330\004\032\230'\240\021\330\004\037\230s\240!\2401\340\004 \320 :\270!\330\010\t\330\010\t\330""\010\025\220Q\330\010&\240a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\004&\240a\360\020\000\013\036\230S\320 8\270\t\300\021\320\000&\240a\360\032\000\005!\240\016\250a\250|\270:\300Q\300a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2104\210q\220\001\200\001\340\006\026\220a\220q\200\001\340\004'\320':\270!\360\006\000\005!\320 :\270!\270;\300a\300q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\030\000\005\016\320\r\036\230a\230z\250\027\260\n\270!\330!+\2505\260\n\270!\320\000e\360\000\000f\001A\002\360\000\000A\002B\002\360(\000\005 \230q\330\004\034\230A\360\006\000\005\010\200q\330\010\027\220s\230!\2301\330\010\025\220Q\360\006\000\005\037\320\036?\270s\300-\310r\320QT\320TV\320VW\330\004\r\320\r(\250\006\250a\250q\330\004\007\200t\2101\330\010\016\210k\230\021\230!\340\004\005\330\010\016\210l\230!\330\010\016\210j\230\001\330\010\016\210m\2301\360\006\000\t\014\2101\330\014\020\220\004\220J\230j\250\t\260\021\260!\330\020\026\220j\240\001\240\022\2407\320*C\3001\330\020\026\220j\240\001\240\022\240:\320-I\310\021\340\010\023\320\023(\250\001\330\014%\240Q\330\014(\250\001\330\014#\2401\330\014\r\210Q\330\014\027\220q\330\014\r\340\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210v\220Q\360\006\000\t\r\210A\210Q\320\000g\320gh\360\034\000\005#\240!\340\004\031\230\021\230!\2309\320$7\260w\270a\340\004\017\320\017-\250Q\250k\270\021\270)\3001\300A\330\004\007\200w\210c\220\021\330\010\017\210q\340\004\013\2104\210q\220\001\200\001\360\030\000\005\027\220h\230f\240A\240Q\330\004\030\230\010\240\006\240a\240q\360\006\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\032\230!\2303\230e\240;\250h\260a\260s\270#\270R\270q\200\001\360\030\000\005\027\220i\230v\240Q\240a\360\006\000\n\013\330\010""\014\210E\220\025\220a\220q\330\014\027\220q\230\003\2305\240\t\250\021\250!\330\014\027\220q\230\003\2305\240\t\250\021\250!\200\001\360\030\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004\037\230}\250A\330\004\033\2307\240\"\240A\360\010\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\023\2204\220s\230+\240R\240r\250\033\260A\330\014\020\220\005\220U\230!\2301\330\020\032\230!\230<\240r\250\023\250F\260!\200\001\360\030\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004\037\230}\250A\360\010\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\023\220;\230b\240\002\240+\250Q\330\014\020\220\005\220U\230!\2301\330\020\032\230!\2303\230f\240A\200\001\360\026\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004!\240\021\360\010\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\031\230\032\2401\240C\240q\330\020\037\230w\240b\250\001\340\004\013\2104\210q\220\014\230C\230w\240b\250\001\200\001\360\026\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004\032\230!\360\010\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\032\230$\230a\230z\250\021\250#\250Q\330\020\023\2208\2302\230Q\330\024\033\2301\340\004\013\2101\200\001\360\030\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\360\010\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\030\230\006\230j\250\001\250\023\250C\250r\260\021\330\020\030\230\001\230\023\230E\240\032\2501\250A\200\001\360\030\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004!\240\033\250L\270\001\270\021\360\006\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\032\230!\2303\230f\240A\200\001\340:;\360\032\000\005\027\220j\240\006\240a\240q\330\004\030\230\n\240&\250\001\250\021\330\004\035\230Q\360\n\000\n\013""\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\023\2204\220q\230\n\240!\2403\240d\250\"\250A\330\024\036\230d\240!\240:\250Q\250c\260\021\360\006\000\t\014\2108\2202\220Q\330\014\023\220<\230r\240\021\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\025\230a\230q\330\024\036\230a\230s\240&\250\001\200\001\360&\000\005\014\210;\220k\240\030\250\022\2501\330\004\013\2108\220;\230e\2402\240Q\330\004\013\210<\220{\240)\2502\250Q\330\004\013\320\013\036\230k\320):\270\"\270A\330\004\013\210<\220|\2401\340\004 \320 ;\2701\330\010\027\220q\330\010\033\2301\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\200\001\360\030\000\005\027\220k\240\026\240q\250\001\360\006\000\n\013\330\010\014\210E\220\025\220a\220q\330\014\025\220Q\220f\230K\240q\250\003\2503\250b\260\013\2701\270C\270t\3002\300Q\320\000.\250m\2701\360\034\000\005!\320 7\260q\330\010\034\230A\330\010\017\210q\330\010\017\210q\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\320\000\037\230q\340\004\r\320\r!\240\021\200\001\360\022\000\005\016\320\r/\250q\3200B\300!\200\001\360\030\000\005\014\320\013\037\230q\240\001\320\000'\240q\340\004\"\320\"4\260A\340\004 \320 2\260!\2607\270!\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360\014\000\005\021\220\001\220\036\230q\240\001\340\004 \320 4\260A\330\010\t\210\021\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\210\021\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2106\220\021\200\001\360\034\000\005$\240<\250q\260\n\270'\300\032\3109\320T^\320^_\3305?\320?O\310{\320Zj\320ju\320uv\330\004\014\210C\210x\220s\230!\200\001\360\016\000\005 \230q\360\n\000\005\032\230\021\230!\2309\320$7\260w\270a\360\006\000\005\020\320\017.\250a\250{\270!\2709\300C\300w\310c""\320QR\320RS\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\007\200z\220\023\220A\330\010\017\210q\360\006\000\005\016\210W\220F\230!\2301\330\004\007\200w\210c\220\027\230\001\330\010\016\210k\230\021\230!\340\004\005\330\010\023\320\023.\250a\250{\270!\2709\300C\300w\310c\320QR\320R]\320]^\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\022\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q\200\001\360\016\000\005 \230q\360\010\000\005\032\230\021\230!\2309\320$7\260w\270a\360\006\000\005\020\320\017*\250!\250;\260a\260y\300\003\3007\310#\310Q\310k\320YZ\320Z[\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\360\006\000\005\033\230/\250\021\250!\330\004\013\210:\220W\230A\230\\\320)9\270\021\200\001\360 \000\005\020\320\017'\240q\330\010\024\220A\330\010\023\2201\330\010\t\330\010\023\2201\330\010\t\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\022\000\005!\240\017\250q\260\014\270A\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360,\000\005\026\320\025/\250q\330\n \240\r\250W\260A\260\\\300\021\340\004\007\200t\2101\330\010\016\210j\230\001\230\021\340\004\005\330\010\023\320\023/\250q\330\014\036\230e\240>\260\021\260!\330\010\013\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\360\006\000\t\021\220\t\320\031/\250q\260\014\270A\330\010\013\2101\330\014\025\220U\230'\240\021\240!\360\006\000\r\030\320\027)\250\021\250!\330\014\031\320\031;\2701\270J\320F^\320^`\320`a\330\014\025\220W\230F\240!\2401\330\014\017\210t\2201\330\022\034\230A\230Q\330\020\026\220k\240\021\240!\330\014\r\330\020\025\320\025(\250\001\250\032\2608\270<\300q\330\024\035\230V\2407\250!\2501\340\026 \240\001\240\021\330\024\032\230,\240a\240q\340\020\024\220A\220Q\340\n\024\220A\220Q\330\010\017\210q\340\n\024\220A\220Q\200\001\360\"\000\005#\240/\260\021""\260!\360\006\000\005\006\330\010\023\320\023'\240q\330\014\036\230a\330\014\r\330\014\030\230\001\330\014\032\230!\330\014\032\230!\330\014\r\210Q\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\320\000'\240q\360\032\000\005!\240\016\250a\250|\270:\300Q\300a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2104\210q\220\001\200\001\360\034\000\005!\320 ?\270q\330\010\032\230!\330\010\026\220a\330\010\026\220a\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\340\004\013\2101\200\001\360$\000\005#\240/\260\021\260!\360\006\000\005\006\330\010\023\320\023'\240q\330\014\036\230a\330\014\r\330\014\037\230q\330\014\030\230\001\330\014\032\230!\330\014\032\230!\330\014\r\210Q\360\006\000\t\014\2107\220#\220Q\330\014\022\220,\230a\320\0374\260A\260X\270Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021\200\001\360\022\000\005!\240\017\250q\260\017\270q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\024\000\005!\240\017\250q\260\001\260\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2106\220\021\200\001\360\020\000\005+\320*@\300\001\330\004\037\230s\240!\2401\330\004\030\230\007\230w\240a\340\004 \320 :\270!\270;\300m\320S^\320^_\330\004\007\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\200\001\360\034\000\005\010\200t\2103\210a\330\010\016\210j\230\001\230\021\340\004 \320 @\300\001\330\010\027\220q\330\010\033\2301\330\010\024\220A\360\006\000\005\010\200w\210c\220\021\330\010\016\210l\230!\320\0330\260\001\260\030\270\021\330\004\013\2101\320\000\027\220x\230q\360\014\000\005\006\330\n\r\210R\210r\220\023\220D\230\002\230!\330\010\n\210#\210R\210r\220\023\220D\230\002\230!\330\010\n\210#\210R\210r\220\023\220C\220r\230\021\330\010\n""\210#\210R\210r\220\022\2201\200\001\360 \000\014\r\340\004\007\200z\220\027\230\003\2302\230Q\330\010\025\220Z\230w\240a\240r\250\021\340\004\007\200z\220\026\220s\230!\330\010\025\220Z\230x\240r\250\023\250A\340\004\013\320\013 \240\001\240\021\200\001\360 \000\014\r\340\004\007\200z\220\027\230\003\2302\230Q\330\010\025\220Z\230w\240a\240r\250\021\340\004\007\200z\220\026\220s\230!\330\010\025\220Z\230x\240r\250\023\250A\340\004\013\320\013!\240\021\240!\320\000 \240\001\360 \000\014\r\340\004\007\200z\220\027\230\003\2302\230Q\330\010\025\220Z\230w\240a\240r\250\021\340\004\007\200z\220\026\220s\230!\330\010\025\220Z\230x\240r\250\023\250A\340\004\r\210Z\220u\230A\330\004\033\2301\230H\240A\330\004\013\2101\200\001\360 \000\014\r\340\004\007\200z\220\027\230\003\2302\230Q\330\010\025\220Z\230w\240a\240r\250\021\340\004\007\200z\220\026\220s\230!\330\010\025\220Z\230x\240r\250\023\250A\340\004\r\210Z\220u\230A\330\004\026\220a\220x\230q\330\004\013\2101O";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 1251; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 157) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 1251; i < 1520; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 1520; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 1251;
      for (Py_ssize_t i=0; i<269; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab;
    double const c_constants[] = {0.0,0.1,4.0,44100.0};
    for (int i = 0; i < 4; i++) {
      numbertab[i] = PyFloat_FromDouble(c_constants[i]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 4;
    int8_t const cint_constants_1[] = {0,-1,1,2,4,8,16,24,127};
    int16_t const cint_constants_2[] = {255,-10860,-10861,-10862,-10863,-10864};
    int32_t const cint_constants_4[] = {44100L,136983863L};
    for (int i = 0; i < 17; i++) {
      numbertab[i] = PyLong_FromLong((i < 9 ? cint_constants_1[i - 0] : (i < 15 ? cint_constants_2[i - 9] : cint_constants_4[i - 15])));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<21; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 4;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 5;
    unsigned int flags : 10;
    unsigned int first_line : 13;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 197};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_code};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_fourchar_to_int, __pyx_mstate->__pyx_kp_b_iso88591_QfCs_Cq_AT_D_3at1D_4q_q_AT_D_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_int_to_fourchar, __pyx_mstate->__pyx_kp_b_iso88591_xq_Rr_D_Rr_D_Rr_Cr_Rr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 220};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_object_id};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_object_show, __pyx_mstate->__pyx_kp_b_iso88591_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_unload, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 229};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_in_device_id};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_destroy_aggregate, __pyx_mstate->__pyx_kp_b_iso88591_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 235};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_object_id, __pyx_mstate->__pyx_n_u_property_selector, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_object_get_property_data, __pyx_mstate->__pyx_kp_b_iso88591_q_9_7wa_a_9CwcQRRS_wc_l_0_z_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 274};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_object_id, __pyx_mstate->__pyx_n_u_property_selector, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_object_set_property_data, __pyx_mstate->__pyx_kp_b_iso88591_9_7wa_ay_7_SPQQXXeellm_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_object_id, __pyx_mstate->__pyx_n_u_property_selector, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_is_settable};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_object_is_property_settabl, __pyx_mstate->__pyx_kp_b_iso88591_ggh_9_7wa_Qk_1A_wc_q_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 322};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_object_id, __pyx_mstate->__pyx_n_u_property_selector, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_string_ref, __pyx_mstate->__pyx_n_u_result_str};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_object_get_property_string, __pyx_mstate->__pyx_kp_b_iso88591_q_9_7wa_ay_7_QkYZZ_wc_l_0_WA_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 345};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_device_ids, __pyx_mstate->__pyx_n_u_device_count, __pyx_mstate->__pyx_n_u_devices, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_get_devices, __pyx_mstate->__pyx_kp_b_iso88591_A_q_c1LAYVYY___a_wc_q_S_Cq_q_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 386};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_device_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_get_default_outpu, __pyx_mstate->__pyx_kp_b_iso88591_2_q_a_H_RUU_gghhi_wc_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 407};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_address, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_device_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_get_default_input, __pyx_mstate->__pyx_kp_b_iso88591_1_q_a_H_RUU_gghhi_wc_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 429};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_permissions, __pyx_mstate->__pyx_n_u_file_type_hint, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_url_ref, __pyx_mstate->__pyx_n_u_path_bytes, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_open_url, __pyx_mstate->__pyx_kp_b_iso88591_IWAQ_8_1A_t1_j_1_A_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 460};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_file_id, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_close, __pyx_mstate->__pyx_kp_b_iso88591_5Q_q_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 469};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_file_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_get_property, __pyx_mstate->__pyx_kp_b_iso88591_5Q_q_a_9_wc_l_0_vQa_t1_k_A_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 509};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_file_id, __pyx_mstate->__pyx_n_u_start_packet, __pyx_mstate->__pyx_n_u_num_packets, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_num_bytes, __pyx_mstate->__pyx_n_u_packet_count, __pyx_mstate->__pyx_n_u_max_packet_size, __pyx_mstate->__pyx_n_u_prop_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_read_packets, __pyx_mstate->__pyx_kp_b_iso88591_5Q_q_Q_Q_q_5Q_wc_l_1_1_vQa_t1_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 556};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_file_id, __pyx_mstate->__pyx_n_u_start_packet, __pyx_mstate->__pyx_n_u_num_packets, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_num_bytes, __pyx_mstate->__pyx_n_u_packet_count, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_max_packet_size, __pyx_mstate->__pyx_n_u_prop_size, __pyx_mstate->__pyx_n_u_required_size};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_read_packets_into, __pyx_mstate->__pyx_kp_b_iso88591_D_5Q_aq_Q_Q_q_A_wc_l_0_32Q_as_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 648};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_type_hint, __pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_open, __pyx_mstate->__pyx_kp_b_iso88591_1_4A_A_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 666};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_close, __pyx_mstate->__pyx_kp_b_iso88591_Q_5Qa_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 675};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_data_ptr, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_parse_bytes, __pyx_mstate->__pyx_kp_b_iso88591_a_Q_s_1_Q_a_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 694};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_parse_buffer, __pyx_mstate->__pyx_kp_b_iso88591_Q_fAQ_Qa_a_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 745};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_actual_size, __pyx_mstate->__pyx_n_u_asbd};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_get_property, __pyx_mstate->__pyx_kp_b_iso88591_Q_q_q_q_a_wc_l_0_vQa_t1_k_a_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 806};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_packet_offset, __pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_byte_offset, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_seek, __pyx_mstate->__pyx_kp_b_iso88591_Q_4A_1_wc_l_0_q_AV4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 834};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source_format, __pyx_mstate->__pyx_n_u_dest_format, __pyx_mstate->__pyx_n_u_src_format, __pyx_mstate->__pyx_n_u_dst_format, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_new, __pyx_mstate->__pyx_kp_b_iso88591_1_aq_2_1L_Qa_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 859};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_dispose, __pyx_mstate->__pyx_kp_b_iso88591_6aq_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 867};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_input_data_size, __pyx_mstate->__pyx_n_u_output_data_size, __pyx_mstate->__pyx_n_u_input_buffer, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_convert_buffer, __pyx_mstate->__pyx_kp_b_iso88591_K1_S_6b_gWA_wfAQ_S_q_k_q_Q_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 905};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_input_data_size, __pyx_mstate->__pyx_n_u_output_data_size, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_convert_buffer_i, __pyx_mstate->__pyx_kp_b_iso88591_D_k_fAQ_1_1A_aq_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 958};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_get_property, __pyx_mstate->__pyx_kp_b_iso88591_H_q_Qk_a_RS_wc_l_0_z_A_q_vQa_wc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 995};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_set_property, __pyx_mstate->__pyx_kp_b_iso88591_s_1_wa_mS___wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1012};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_reset, __pyx_mstate->__pyx_kp_b_iso88591_4AQ_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1093};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_input_packet_count, __pyx_mstate->__pyx_n_u_output_packet_count, __pyx_mstate->__pyx_n_u_source_format_dict, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_callback_data, __pyx_mstate->__pyx_n_u_output_buffer_list, __pyx_mstate->__pyx_n_u_output_data_packet_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_output_buffer_size, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_input_ptr, __pyx_mstate->__pyx_n_u_actual_bytes};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_fill_complex_buf, __pyx_mstate->__pyx_kp_b_iso88591_Q_wa_c_2_1_Qm1_A_1_G6_S_k_fA5PP, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1188};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_converter_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_input_packet_count, __pyx_mstate->__pyx_n_u_output_packet_count, __pyx_mstate->__pyx_n_u_source_format_dict, __pyx_mstate->__pyx_n_u_converter, __pyx_mstate->__pyx_n_u_callback_data, __pyx_mstate->__pyx_n_u_output_buffer_list, __pyx_mstate->__pyx_n_u_output_data_packet_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_actual_bytes};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_fill_complex_buf_2, __pyx_mstate->__pyx_kp_b_iso88591_L_Q_1A_k_6_2_1_Qm1_fA5PPRRS_Q_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1286};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_min, __pyx_mstate->__pyx_kp_b_iso88591_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1290};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_min_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1294};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_max, __pyx_mstate->__pyx_kp_b_iso88591_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1298};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_max_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1302};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_sam, __pyx_mstate->__pyx_kp_b_iso88591_DA_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1306};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_property_cod, __pyx_mstate->__pyx_kp_b_iso88591_4A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1310};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_quality_max, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1314};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_quality_high, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1318};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_quality_medi, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1322};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_quality_low, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1326};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_converter_quality_min, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1335};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_cf_path, __pyx_mstate->__pyx_n_u_url, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_open_url, __pyx_mstate->__pyx_kp_b_iso88591_31_avYgUVVbbc_1F_Mdde_t3a_AQ_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1363};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_file_type, __pyx_mstate->__pyx_n_u_source_format, __pyx_mstate->__pyx_n_u_codec_manufacturer, __pyx_mstate->__pyx_n_u_cf_path, __pyx_mstate->__pyx_n_u_url, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_create_with, __pyx_mstate->__pyx_kp_b_iso88591_UUV_Fa_1F_Mdde_t3a_AQ_j_1A_wc_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1406};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_dispose, __pyx_mstate->__pyx_kp_b_iso88591_1_4AQ_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1414};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_frames_to_read, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_actual_size, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_read, __pyx_mstate->__pyx_kp_b_iso88591_B_1_A_Bb_vQa_wc_k_Q_9AR_2_9AR_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1451};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_num_channels, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_frames_to_read, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_required_size, __pyx_mstate->__pyx_n_u_actual_size};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_read_into, __pyx_mstate->__pyx_kp_b_iso88591_1_A_F_b_Rq_2Q_j_5Qa_q_y_a_y_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1514};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_write, __pyx_mstate->__pyx_kp_b_iso88591_1_A_wa_AQ_y_a_y_A_y_9A_2_XQa_wc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1538};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_get_property, __pyx_mstate->__pyx_kp_b_iso88591_K1_1_q_vQa_wc_k_1Jm1Kq_7_Q_a_4A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1567};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ext_file_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_ext_file, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_set_property, __pyx_mstate->__pyx_kp_b_iso88591_1_s_1_wa_8_P_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1585};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property, __pyx_mstate->__pyx_kp_b_iso88591_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1589};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1593};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_3, __pyx_mstate->__pyx_kp_b_iso88591_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1597};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_4, __pyx_mstate->__pyx_kp_b_iso88591_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1601};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_5, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1605};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_6, __pyx_mstate->__pyx_kp_b_iso88591_5Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1609};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_extended_audio_file_property_7, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1622};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_format, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_new_output, __pyx_mstate->__pyx_kp_b_iso88591_q_4A_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1646};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_queue_id, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_allocate_buffer, __pyx_mstate->__pyx_kp_b_iso88591_4A_9_1_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1663};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_queue_id, __pyx_mstate->__pyx_n_u_buffer_id, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_enqueue_buffer, __pyx_mstate->__pyx_kp_b_iso88591_4A_A_8_1_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1676};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_queue_id, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_start, __pyx_mstate->__pyx_kp_b_iso88591_4A_0_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1688};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_queue_id, __pyx_mstate->__pyx_n_u_immediate, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_4A_q_q_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1700};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_queue_id, __pyx_mstate->__pyx_n_u_immediate, __pyx_mstate->__pyx_n_u_queue, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_dispose, __pyx_mstate->__pyx_kp_b_iso88591_q_4A_2_7_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1739};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_format_linear_pcm, __pyx_mstate->__pyx_kp_b_iso88591_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1747};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_linear_pcm_format_flag_is_si, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1751};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_linear_pcm_format_flag_is_pa, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1755};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_wave_type, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1759};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_read_permission, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1763};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_property_data_for, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1767};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_property_maximum, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1771};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_property_audio_da, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1775};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_property_estimate, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1780};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_name, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1784};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_manufa, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1788};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_device, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1792};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_model, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1796};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_transp, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1800};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_device_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1804};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_nomina, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1808};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_availa, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1812};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_is_hid, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1816};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_prefer, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1820};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_stream, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1824};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_volume, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1828};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_device_property_mute, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1832};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_hardware_property_defa, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1836};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_hardware_property_defa_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1841};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_scope, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1845};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_scope_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1849};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_scope_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1853};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_object_property_elemen, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1859};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_description_dict, __pyx_mstate->__pyx_n_u_previous_component_id, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_previous};
    __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_find_next, __pyx_mstate->__pyx_kp_b_iso88591_0_a_S_a_Qha_D_A_1_Q6Fa_ay_d_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1889};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_component_id, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_instance, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_instance_new, __pyx_mstate->__pyx_kp_b_iso88591_aq_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1901};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_instance_id, __pyx_mstate->__pyx_n_u_instance, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_instance_dispose, __pyx_mstate->__pyx_kp_b_iso88591_I_aq_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1912};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_component_id, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_name_ref, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_copy_name, __pyx_mstate->__pyx_kp_b_iso88591_1_7q_1A_wc_3is_q_O1A_8_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1934};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_component_id, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_get_description, __pyx_mstate->__pyx_kp_b_iso88591_Qk_wc_l_0_A_4q_A_Q_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1961};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_initialize, __pyx_mstate->__pyx_kp_b_iso88591_1_4AQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1972};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_uninitialize, __pyx_mstate->__pyx_kp_b_iso88591_1_6aq_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1983};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_set_property, __pyx_mstate->__pyx_kp_b_iso88591_1_z_A_A_a_6a_4Cq_j_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2005};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer};
    __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_property, __pyx_mstate->__pyx_kp_b_iso88591_1_q_q_A_A_a_wc_l_0_vQa_t1_k_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2044};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_output_unit_start, __pyx_mstate->__pyx_kp_b_iso88591_1_5Qa_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2055};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_output_unit_stop, __pyx_mstate->__pyx_kp_b_iso88591_1_4AQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2068};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_component_type, __pyx_mstate->__pyx_n_u_component_subtype, __pyx_mstate->__pyx_n_u_manufacturer, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_components};
    __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_find_all_components, __pyx_mstate->__pyx_kp_b_iso88591_88PPQ_q_1_PPQ_O1_BBYYZ_1BBTTU_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2100};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_component_id, __pyx_mstate->__pyx_n_u_component, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_name_ref, __pyx_mstate->__pyx_n_u_version, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_component_info, __pyx_mstate->__pyx_kp_b_iso88591_1_Q_A_wc_l_0_a_1_wc_l_0_1_y_1_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2148};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_param_list, __pyx_mstate->__pyx_n_u_num_params, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_parameter_list, __pyx_mstate->__pyx_kp_b_iso88591_6iq_1_q_q_q_q_1_Q_wc_3j_1_q_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2210};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_param_id, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_param_info, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_unit_name};
    __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_parameter_info, __pyx_mstate->__pyx_kp_b_iso88591_1_q_A_1_Q_wc_l_VVWWX_1_z_s_FXXY, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2274};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_param_id, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_parameter, __pyx_mstate->__pyx_kp_b_iso88591_9A_1_A_Q_1_Q_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2304};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_param_id, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_scope, __pyx_mstate->__pyx_n_u_element, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_set_parameter, __pyx_mstate->__pyx_kp_b_iso88591_B_1_1_Q_1_Q_A_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2332};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_presets_array, __pyx_mstate->__pyx_n_u_num_presets, __pyx_mstate->__pyx_n_u_preset, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_preset_number, __pyx_mstate->__pyx_n_u_preset_name, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_factory_presets, __pyx_mstate->__pyx_kp_b_iso88591_1_q_q_q_q_wc_3j_1_q_A_wc_q_S_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2420};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_preset_number, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_preset, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_set_current_preset, __pyx_mstate->__pyx_kp_b_iso88591_1_A_wc_l_VVWWX_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2451};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_sample_rate, __pyx_mstate->__pyx_n_u_num_channels, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_output_data};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_render, __pyx_mstate->__pyx_kp_b_iso88591_BBWWX_1_q_1_Bm2Q_vQ_2Rr_3a_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2522};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_unit_id, __pyx_mstate->__pyx_n_u_input_data, __pyx_mstate->__pyx_n_u_output_buffer, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_num_channels, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_buffer_size};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_render_into, __pyx_mstate->__pyx_kp_b_iso88591_1_q_Bm2Q_F_3b_j_az_q_31A_vQc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2609};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_type_output, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2613};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_component_type_music_d, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2617};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_subtype_default_o, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2621};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_manufacturer_appl, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2625};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_property_stream_f, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2629};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_property_set_rend, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2633};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_scope_input, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2637};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_scope_output, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2641};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_unit_scope_global, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2645};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_linear_pcm_format_flag_is_no, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2777};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_path_bytes, __pyx_mstate->__pyx_n_u_url_ref, __pyx_mstate->__pyx_n_u_audio_file, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_file_format, __pyx_mstate->__pyx_n_u_client_format, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_file_length_frames, __pyx_mstate->__pyx_n_u_bytes_per_buffer, __pyx_mstate->__pyx_n_u_buffer_list, __pyx_mstate->__pyx_n_u_read_frames, __pyx_mstate->__pyx_n_u_frames_to_read, __pyx_mstate->__pyx_n_u_temp_buffer_list};
    __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_load_file, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_A_Q_q_83a_A_aq_q_AQ_7_Q_a_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_output_desc, __pyx_mstate->__pyx_n_u_comp, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_stream_format, __pyx_mstate->__pyx_n_u_callback_struct};
    __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_setup_output, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_Q_q_5_1_aq_QfAT_7_Q_a_Faq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2983};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_aq_L_1_L_9_a_7_Q_Kq_a_AQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2998};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_play, __pyx_mstate->__pyx_kp_b_iso88591_A_t6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3002};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_1_L_1_8_Q_7_Q_a_1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3015};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_loop};
    __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_set_looping, __pyx_mstate->__pyx_kp_b_iso88591_A_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3019};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_reset_playback, __pyx_mstate->__pyx_kp_b_iso88591_A_L_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3023};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_is_playing, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3027};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_progress, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_1_wd_oRwd_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3038};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_quantum, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_current_time};
    __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_link_timing, __pyx_mstate->__pyx_kp_b_iso88591_a_4_Q_1_t_V7_U_E_a_Q_U_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[134] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3186};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_duration, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer_size, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_total_bytes};
    __pyx_mstate_global->__pyx_codeobj_tab[135] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_setup_input, __pyx_mstate->__pyx_kp_b_iso88591_A_N_0_IRt_YZ_N_1_N_q_4_QQSSWWeeo, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3248};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[136] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_aq_N_q_N_1_4AT_q_7_Q_m1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3263};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[137] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_1_N_q_O1D_a_7_Q_a_Qa_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3276};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[138] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_is_recording, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3280};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[139] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_progress, __pyx_mstate->__pyx_kp_b_iso88591_A_4_1_A_1_wd_r_NRS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3286};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[140] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_recorded_frames, __pyx_mstate->__pyx_kp_b_iso88591_A_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[141] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_recorded_duration, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Q_1_wd_r_NRS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3296};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seconds};
    __pyx_mstate_global->__pyx_codeobj_tab[142] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_run_loop, __pyx_mstate->__pyx_kp_b_iso88591_a_S_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3306};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_path_bytes, __pyx_mstate->__pyx_n_u_url_ref, __pyx_mstate->__pyx_n_u_ext_audio_file, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_num_frames, __pyx_mstate->__pyx_n_u_file_format, __pyx_mstate->__pyx_n_u_buffer_list};
    __pyx_mstate_global->__pyx_codeobj_tab[143] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_save_to_file, __pyx_mstate->__pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_aq_A_Q_q_83a_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3386};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_bytes};
    __pyx_mstate_global->__pyx_codeobj_tab[144] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_data, __pyx_mstate->__pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_1_DP_hhjjk_t_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3409};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_total_samples, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_sample};
    __pyx_mstate_global->__pyx_codeobj_tab[145] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_has_audio_content, __pyx_mstate->__pyx_kp_b_iso88591_A_4_XS_S_N_QTTU_1_t_n_E_as_T_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[146] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[147] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3443};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[148] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_r, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3447};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[149] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_f, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3451};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[150] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_d, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3455};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[151] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_f_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3459};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_m, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3463};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_a, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[153])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3467};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[154] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_a_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[154])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3471};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[155] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_m_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[155])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3475};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[156] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_d_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[156])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3479};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[157] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_c, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[157])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3483};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[158] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_p, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[158])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3487};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[159] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_f_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[159])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3491};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[160] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_p_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[160])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3495};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[161] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_b, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[161])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3499};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[162] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_p_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[162])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3503};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[163] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_p_4, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[163])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3507};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[164] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_a_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[164])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3511};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[165] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_b_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[165])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3515};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[166] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_i, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[166])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3520};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[167] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_f_4, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3524};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_property_f_5, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3528};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_parse_flag, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3532};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_seek_flag, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3537};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_unsu, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3541};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[172] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_unsu_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3545};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[173] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_unsu_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[173])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3549};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[174] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_bad, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[174])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3553};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[175] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_not, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[175])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3557};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[176] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_inva, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[176])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3561};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[177] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_inva_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[177])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3565};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[178] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_valu, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[178])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3569};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[179] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_data, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[179])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3573};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[180] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_ille, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[180])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3577};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[181] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_unsp, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3581};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_file_stream_error_disc, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3587};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_url_ref, __pyx_mstate->__pyx_n_u_path_bytes, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_create_system_sou, __pyx_mstate->__pyx_kp_b_iso88591_IWAQ_8_1A_t1_j_A_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3616};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_system_sound_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_dispose_system_so, __pyx_mstate->__pyx_kp_b_iso88591_a_B_1_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3627};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_system_sound_id};
    __pyx_mstate_global->__pyx_codeobj_tab[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_play_system_sound, __pyx_mstate->__pyx_kp_b_iso88591_a_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3633};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_system_sound_id};
    __pyx_mstate_global->__pyx_codeobj_tab[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_play_alert_sound, __pyx_mstate->__pyx_kp_b_iso88591_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3639};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_specifier_value, __pyx_mstate->__pyx_n_u_prop_id, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_writable, __pyx_mstate->__pyx_n_u_specifier, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_actual_size};
    __pyx_mstate_global->__pyx_codeobj_tab[187] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_get_property, __pyx_mstate->__pyx_kp_b_iso88591_1_J_q_q_Q_S_q_c_wc_l_0_vQa_t1_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3686};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_property_id, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_specifier_value, __pyx_mstate->__pyx_n_u_prop_id, __pyx_mstate->__pyx_n_u_specifier, __pyx_mstate->__pyx_n_u_uint_data, __pyx_mstate->__pyx_n_u_byte_data, __pyx_mstate->__pyx_n_u_data_ptr, __pyx_mstate->__pyx_n_u_data_size, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[188] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_set_property, __pyx_mstate->__pyx_kp_b_iso88591_7q_J_z_Kq_A_1F_A_Cq_iq_9_S_q_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3722};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_no_error, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3726};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_unsupported_p, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3730};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_bad_property, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3734};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_bad_specifier, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3738};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[193] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_system_sound, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3742};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[194] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_system_sound_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3746};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[195] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_system_sound_3, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3750};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_system_sound_id_user_preferr, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3754};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[197] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_system_sound_id_flash_screen, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3758};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[198] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_system_sound_id_vibrate, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3762};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[199] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_user_preferred_alert, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3766};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[200] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_property_is_u, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3770};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_audio_services_property_comp, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3775};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_test_error, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_data1, __pyx_mstate->__pyx_n_u_data2, __pyx_mstate->__pyx_n_u_offset_sample_frame, __pyx_mstate->__pyx_n_u_status_result};
    __pyx_mstate_global->__pyx_codeobj_tab[203] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_midi_event, __pyx_mstate->__pyx_kp_b_iso88591_I_A_1_1_1_1_S_l_Faq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[203])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3809};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_data_ptr, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[204] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_sysex, __pyx_mstate->__pyx_kp_b_iso88591_5WA_Cq_1_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3834};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_instrument_id, __pyx_mstate->__pyx_n_u_group_id, __pyx_mstate->__pyx_n_u_pitch, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_offset_sample_frame, __pyx_mstate->__pyx_n_u_controls, __pyx_mstate->__pyx_n_u_note_instance_id, __pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_arg_count, __pyx_mstate->__pyx_n_u_num_controls, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_params_size, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_param_id, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[205] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_start_note, __pyx_mstate->__pyx_kp_b_iso88591_e_f_A_A_B_q_A_q_s_1_Q_s_rQTTVVW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3895};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_group_id, __pyx_mstate->__pyx_n_u_note_instance_id, __pyx_mstate->__pyx_n_u_offset_sample_frame, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[206] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_stop_note, __pyx_mstate->__pyx_kp_b_iso88591_K1_4A_q_1_1_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3922};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pitch, __pyx_mstate->__pyx_n_u_velocity};
    __pyx_mstate_global->__pyx_codeobj_tab[207] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_music_device_std_note_par, __pyx_mstate->__pyx_kp_b_iso88591_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3938};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pitch, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_controls};
    __pyx_mstate_global->__pyx_codeobj_tab[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_music_device_note_params, __pyx_mstate->__pyx_kp_b_iso88591_Bb_1A_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3958};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[209] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_note_event_use_group_i, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3962};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[210] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_note_event_unused, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3966};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[211] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_range, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[211])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3970};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[212] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_midi_event_sele, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[212])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3974};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[213] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_sysex_select, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[213])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3978};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[214] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_start_note_sele, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[214])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3982};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[215] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_stop_note_selec, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[215])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3986};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[216] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_device_midi_event_list, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3992};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[217] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_note_on, __pyx_mstate->__pyx_kp_b_iso88591_U_XRq_HE_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4006};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[218] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_note_off, __pyx_mstate->__pyx_kp_b_iso88591_U_XRq_HE_6_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4020};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_controller, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[219] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_control_change, __pyx_mstate->__pyx_kp_b_iso88591_U_XRq_HKr_vRq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4034};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_program, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[220] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_program_change, __pyx_mstate->__pyx_kp_b_iso88591_U_XRq_HHBfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4047};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_lsb, __pyx_mstate->__pyx_n_u_msb};
    __pyx_mstate_global->__pyx_codeobj_tab[221] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_pitch_bend, __pyx_mstate->__pyx_kp_b_iso88591_U_XRq_6_Cr_HE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4067};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[222] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_new_music_player, __pyx_mstate->__pyx_kp_b_iso88591_q_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4083};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[223] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_dispose_music_player, __pyx_mstate->__pyx_kp_b_iso88591_314DA_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4101};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_seq, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[224] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_set_sequence, __pyx_mstate->__pyx_kp_b_iso88591_2_is_QR_7q8H_PQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4121};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[225] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_get_sequence, __pyx_mstate->__pyx_kp_b_iso88591_7q8H_PQQR_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4140};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[226] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_set_time, __pyx_mstate->__pyx_kp_b_iso88591_314DHL___wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4159};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[227] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_get_time, __pyx_mstate->__pyx_kp_b_iso88591_314DHAQ_wc_l_0_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4178};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[228] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_preroll, __pyx_mstate->__pyx_kp_b_iso88591_314DA_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4196};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[229] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_start, __pyx_mstate->__pyx_kp_b_iso88591_1_2B_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4214};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[230] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_stop, __pyx_mstate->__pyx_kp_b_iso88591_0_1A_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4232};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_is_playing, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[231] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_is_playing, __pyx_mstate->__pyx_kp_b_iso88591_5Q6Fhaq_wc_l_0_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4251};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_scale_rate, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[232] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_set_play_rate_scala, __pyx_mstate->__pyx_kp_b_iso88591_Q_j_Q_NhVbbc_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_scale_rate, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[233] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_get_play_rate_scala, __pyx_mstate->__pyx_kp_b_iso88591_Q_NhVWWX_wc_l_0_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4294};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[234] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_new_music_sequence, __pyx_mstate->__pyx_kp_b_iso88591_1_1_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4310};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_dispose_music_sequence, __pyx_mstate->__pyx_kp_b_iso88591_5Q6H_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4328};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_new_track, __pyx_mstate->__pyx_kp_b_iso88591_6a7I_STTU_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4347};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_dispose_track, __pyx_mstate->__pyx_kp_b_iso88591_MZWffg_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4366};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_track_count, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[238] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_get_track_count, __pyx_mstate->__pyx_kp_b_iso88591_1_NjXYYZ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[238])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4385};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_track_index, __pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_get_ind_track, __pyx_mstate->__pyx_kp_b_iso88591_9_LJVaannoop_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4405};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_get_tempo_track, __pyx_mstate->__pyx_kp_b_iso88591_1_NjXYYZ_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4424};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_sequence_type, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[241] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_set_sequence_type, __pyx_mstate->__pyx_kp_b_iso88591_Q_PPZZeef_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4443};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_sequence_type, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_get_sequence_type, __pyx_mstate->__pyx_kp_b_iso88591_Q_PPZZ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4462};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_file_path, __pyx_mstate->__pyx_n_u_file_type_hint, __pyx_mstate->__pyx_n_u_flags, __pyx_mstate->__pyx_n_u_path_bytes, __pyx_mstate->__pyx_n_u_url_ref, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_file_load, __pyx_mstate->__pyx_kp_b_iso88591_QQR_IWAQ_I_1A_t1_j_a_q_q_7_Q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4506};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_release_velocity, __pyx_mstate->__pyx_n_u_duration, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[244] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_track_new_midi_note_event, __pyx_mstate->__pyx_kp_b_iso88591_k_1_8_e2Q_2Q_k_A_1_1_q_1_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4541};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_data1, __pyx_mstate->__pyx_n_u_data2, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_status_result};
    __pyx_mstate_global->__pyx_codeobj_tab[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_track_new_midi_channel_eve, __pyx_mstate->__pyx_kp_b_iso88591_Zq_9Ja_9Ja_q_EQ_q_1_S_l_OqPQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4573};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_track, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_bpm, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[246] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_track_new_extended_tempo_e, __pyx_mstate->__pyx_kp_b_iso88591_t3a_j_q_1_A_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4602};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_null, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4606};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[248] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_extended_no, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4610};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_extended_te, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4614};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[250] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_user, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4618};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_meta, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[251])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4622};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[252] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_midi_note_m, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4626};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_midi_channe, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[253])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4630};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[254] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_midi_raw_da, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4634};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_parameter, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4638};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_event_type_au_preset, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4642};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_type_beats, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4646};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[258] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_type_seconds, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4650};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[259] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_type_samples, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4654};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[260] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_file_any_type, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4658};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[261] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_file_midi_typ, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[261])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4662};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[262] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_music_sequence_file_imelody, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[262])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4666};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[263] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_loop, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[263])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4670};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[264] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_offs, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[264])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4674};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[265] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_mute, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[265])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4678};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[266] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_solo, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[266])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4682};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[267] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_auto, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[267])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4686};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[268] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_trac, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[268])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4690};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[269] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_sequence_track_property_time, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[269])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4696};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_release_velocity, __pyx_mstate->__pyx_n_u_duration};
    __pyx_mstate_global->__pyx_codeobj_tab[270] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_midi_note_message, __pyx_mstate->__pyx_kp_b_iso88591_BBZZ_82Q_Rq_IRq_Rq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[270])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4717};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_data1, __pyx_mstate->__pyx_n_u_data2};
    __pyx_mstate_global->__pyx_codeobj_tab[271] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_midi_channel_message, __pyx_mstate->__pyx_kp_b_iso88591_7q_1_r_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[271])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4739};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name_bytes, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[272] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_client_create, __pyx_mstate->__pyx_kp_b_iso88591_D_q_a_a_t1_k_AYfF_1_7_Q_a_4AXQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[272])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4768};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[273] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_client_dispose, __pyx_mstate->__pyx_kp_b_iso88591_2_3EQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[273])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4787};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_port_name, __pyx_mstate->__pyx_n_u_port_name_bytes, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[274] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_input_port_create, __pyx_mstate->__pyx_kp_b_iso88591_a_31_t1_k_q_hivV1A_7_Q_a_4AXQ_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[274])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4818};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_port_name, __pyx_mstate->__pyx_n_u_port_name_bytes, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[275] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_output_port_create, __pyx_mstate->__pyx_kp_b_iso88591_a_31_t1_k_hiq_7_Q_a_4AXQ_vQ_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[275])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4849};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[276] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_port_dispose, __pyx_mstate->__pyx_kp_b_iso88591_0_1A_wc_l_0_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[276])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4866};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[277] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_port_connect_source, __pyx_mstate->__pyx_kp_b_iso88591_6a_2_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[277])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4885};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[278] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_port_disconnect_source, __pyx_mstate->__pyx_kp_b_iso88591_9_2_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[278])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4906};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[279] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_number_of_devices, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[279])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device_index, __pyx_mstate->__pyx_n_u_num_devices, __pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[280] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_device, __pyx_mstate->__pyx_kp_b_iso88591_4A_Bb_1_j_Gq_STTU_1Kq_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[280])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4933};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[281] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_get_number_of_entiti, __pyx_mstate->__pyx_kp_b_iso88591_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[281])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4944};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_entity_index, __pyx_mstate->__pyx_n_u_num_entities, __pyx_mstate->__pyx_n_u_entity};
    __pyx_mstate_global->__pyx_codeobj_tab[282] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_get_entity, __pyx_mstate->__pyx_kp_b_iso88591_A_Oq_Bb_1_j_Gq_TUUV_9_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[282])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4965};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __pyx_mstate_global->__pyx_codeobj_tab[283] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_number_of_source, __pyx_mstate->__pyx_kp_b_iso88591_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[283])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4976};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_source_index, __pyx_mstate->__pyx_n_u_num_sources, __pyx_mstate->__pyx_n_u_source};
    __pyx_mstate_global->__pyx_codeobj_tab[284] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_source, __pyx_mstate->__pyx_kp_b_iso88591_MQ_Bb_1_j_Gq_STTU_1_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[284])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4997};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __pyx_mstate_global->__pyx_codeobj_tab[285] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_number_of_destin, __pyx_mstate->__pyx_kp_b_iso88591_q0B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[285])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5008};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_dest_index, __pyx_mstate->__pyx_n_u_num_dests, __pyx_mstate->__pyx_n_u_dest};
    __pyx_mstate_global->__pyx_codeobj_tab[286] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_destination, __pyx_mstate->__pyx_kp_b_iso88591_Q_PPQ_Bc_Cq_j_Q_J_9TUUV_a_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[286])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5029};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[287] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_number_of_sources, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[287])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5037};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_source_index, __pyx_mstate->__pyx_n_u_num_sources, __pyx_mstate->__pyx_n_u_source};
    __pyx_mstate_global->__pyx_codeobj_tab[288] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_source, __pyx_mstate->__pyx_kp_b_iso88591_4A_Bb_1_j_Gq_STTU_Qk_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[288])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5056};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[289] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_number_of_destinations, __pyx_mstate->__pyx_kp_b_iso88591__10, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[289])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5064};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dest_index, __pyx_mstate->__pyx_n_u_num_dests, __pyx_mstate->__pyx_n_u_dest};
    __pyx_mstate_global->__pyx_codeobj_tab[290] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_destination, __pyx_mstate->__pyx_kp_b_iso88591_7q_Bc_Cq_j_Q_J_9TUUV_8_A_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[290])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5085};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name_bytes, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[291] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_source_create, __pyx_mstate->__pyx_kp_b_iso88591_D_q_a_a_t1_k_A_7xy_7_Q_a_4AXQ_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[291])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5115};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name_bytes, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_dest, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[292] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_destination_create, __pyx_mstate->__pyx_kp_b_iso88591_D_q_a_a_t1_k_hivV1A_7_Q_a_4AXQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[292])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5146};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[293] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_endpoint_dispose, __pyx_mstate->__pyx_kp_b_iso88591_4A5I_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[293])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5165};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_property_name, __pyx_mstate->__pyx_n_u_cf_prop_name, __pyx_mstate->__pyx_n_u_cf_value, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_c_str, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_max_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[294] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_string_property, __pyx_mstate->__pyx_kp_b_iso88591_q_WA_t1_j_q_e_7_Q_a_4AXQ_q_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[294])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_property_name, __pyx_mstate->__pyx_n_u_prop_bytes, __pyx_mstate->__pyx_n_u_cf_prop_name, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[295] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_integer_property, __pyx_mstate->__pyx_kp_b_iso88591_M_C1_a_t1_j_0_e_7_Q_a_4AXQ_q_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[295])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5257};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_property_name, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_prop_bytes, __pyx_mstate->__pyx_n_u_cf_prop_name, __pyx_mstate->__pyx_n_u_value_bytes, __pyx_mstate->__pyx_n_u_cf_value, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[296] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_set_string_property, __pyx_mstate->__pyx_kp_b_iso88591_M_C1_a_U_q_q_t1_j_t1_AQ_j_q_e_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[296])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5296};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_property_name, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_prop_bytes, __pyx_mstate->__pyx_n_u_cf_prop_name, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[297] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_set_integer_property, __pyx_mstate->__pyx_kp_b_iso88591_M_C1_a_t1_j_0_e_A_7_Q_a_4AXQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[297])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5330};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_cf_value, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_c_str, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_max_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[298] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_name, __pyx_mstate->__pyx_kp_b_iso88591_1_5Qa_wc_l_0_q_A_1_U_1JF_a_WF_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[298])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5378};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[299] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_get_name, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[299])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5392};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint};
    __pyx_mstate_global->__pyx_codeobj_tab[300] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_endpoint_get_name, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[300])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5406};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __pyx_mstate_global->__pyx_codeobj_tab[301] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_name, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[301])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5420};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_cf_value, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_c_str, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_max_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[302] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_manufacturer, __pyx_mstate->__pyx_kp_b_iso88591_1_Qa_wc_l_0_q_A_1_U_1JF_a_WF_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[302])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5468};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_cf_value, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_c_str, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_max_size, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[303] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_model, __pyx_mstate->__pyx_kp_b_iso88591_1_6aq_wc_l_0_q_A_1_U_1JF_a_WF_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[303])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5518};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_destination, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_pktlist_size, __pyx_mstate->__pyx_n_u_pktlist, __pyx_mstate->__pyx_n_u_packet, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[304] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_send_data, __pyx_mstate->__pyx_kp_b_iso88591_A_s_6_1_j_Rs_1_t1_k_aq_Q_1_a_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[304])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5577};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[305] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_invalid_client, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[305])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5581};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[306] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_invalid_port, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[306])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5585};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[307] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_wrong_endpoint_ty, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[307])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5589};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[308] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_no_connection, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[308])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5593};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[309] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_unknown_endpoint, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[309])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5597};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[310] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_unknown_property, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[310])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5601};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[311] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_wrong_property_ty, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[311])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5605};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[312] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_no_current_setup, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[312])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5609};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[313] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_message_send_err, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[313])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5613};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[314] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_server_start_err, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[314])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5617};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[315] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_setup_format_err, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[315])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5621};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[316] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_wrong_thread, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[316])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5625};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[317] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_object_not_found, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[317])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5629};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[318] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_id_not_unique, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[318])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5633};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[319] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_not_permitted, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[319])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5637};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[320] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_error_unknown_error, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[320])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5641};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[321] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_other, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[321])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5645};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[322] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_device, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[322])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5649};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[323] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_entity, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[323])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5653};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[324] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_source, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[324])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5657};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[325] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_destination, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[325])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5661};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[326] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_external_de, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[326])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5665};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[327] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_external_en, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[327])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5669};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[328] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_external_so, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[328])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5673};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[329] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_object_type_external_de_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[329])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5677};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[330] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_protocol_1_0, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[330])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5681};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[331] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_protocol_2_0, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[331])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5687};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[332] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_name, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[332])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5691};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[333] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_manufacturer, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[333])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5695};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[334] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_model, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[334])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5699};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[335] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_unique_id, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[335])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5703};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[336] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_device_id, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[336])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5707};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[337] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_receive_channe, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[337])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5711};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[338] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_transmit_chann, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[338])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5715};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[339] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_offline, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[339])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5719};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[340] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_private, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[340])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5723};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[341] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_driver_owner, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[341])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5727};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[342] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_property_display_name, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[342])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5734};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_word};
    __pyx_mstate_global->__pyx_codeobj_tab[343] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_message_type_for_up_word, __pyx_mstate->__pyx_kp_b_iso88591_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[343])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5747};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_data1, __pyx_mstate->__pyx_n_u_data2};
    __pyx_mstate_global->__pyx_codeobj_tab[344] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_channel_voice_message, __pyx_mstate->__pyx_kp_b_iso88591_7_A_5Yj_zYZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[344])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5763};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note_number, __pyx_mstate->__pyx_n_u_velocity};
    __pyx_mstate_global->__pyx_codeobj_tab[345] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_note_off, __pyx_mstate->__pyx_kp_b_iso88591_AZwj_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[345])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5778};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note_number, __pyx_mstate->__pyx_n_u_velocity};
    __pyx_mstate_global->__pyx_codeobj_tab[346] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_note_on, __pyx_mstate->__pyx_kp_b_iso88591_1JgZq_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[346])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5793};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_data};
    __pyx_mstate_global->__pyx_codeobj_tab[347] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_control_change, __pyx_mstate->__pyx_kp_b_iso88591_WJa_wj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[347])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5808};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_lsb, __pyx_mstate->__pyx_n_u_msb};
    __pyx_mstate_global->__pyx_codeobj_tab[348] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_pitch_bend, __pyx_mstate->__pyx_kp_b_iso88591_az_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[348])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5823};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_byte1, __pyx_mstate->__pyx_n_u_byte2};
    __pyx_mstate_global->__pyx_codeobj_tab[349] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_system_common, __pyx_mstate->__pyx_kp_b_iso88591_G_Q_gZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[349])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5838};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_bytes_used, __pyx_mstate->__pyx_n_u_byte1, __pyx_mstate->__pyx_n_u_byte2, __pyx_mstate->__pyx_n_u_byte3, __pyx_mstate->__pyx_n_u_byte4, __pyx_mstate->__pyx_n_u_byte5, __pyx_mstate->__pyx_n_u_byte6, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[350] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_sysex, __pyx_mstate->__pyx_kp_b_iso88591_7_HT__6_zQXXbbc6_zQXXbbc_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[350])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5857};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[351] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_channel_voice_message, __pyx_mstate->__pyx_kp_b_iso88591_AZwjXYBLIU_ggrrs_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[351])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5874};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note_number, __pyx_mstate->__pyx_n_u_attribute_type, __pyx_mstate->__pyx_n_u_attribute_data, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[352] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_note_on, __pyx_mstate->__pyx_kp_b_iso88591_q_9T__5_O_Zjjuuv_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[352])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5892};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_note_number, __pyx_mstate->__pyx_n_u_attribute_type, __pyx_mstate->__pyx_n_u_attribute_data, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[353] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_note_off, __pyx_mstate->__pyx_kp_b_iso88591_7_IU___6_PP_kkvvw_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[353])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5910};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[354] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_control_change, __pyx_mstate->__pyx_kp_b_iso88591_6az_RS_Fg_XY_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[354])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5926};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_bank_is_valid, __pyx_mstate->__pyx_n_u_program, __pyx_mstate->__pyx_n_u_bank_msb, __pyx_mstate->__pyx_n_u_bank_lsb, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[355] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_program_change, __pyx_mstate->__pyx_kp_b_iso88591_6az_R_FizYccmmn_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[355])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5944};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_group, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_msg};
    __pyx_mstate_global->__pyx_codeobj_tab[356] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_pitch_bend, __pyx_mstate->__pyx_kp_b_iso88591_WJiWbbc_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[356])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5960};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[357] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_utility, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[357])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5964};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[358] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_system, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[358])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5968};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[359] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_channel_vo, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[359])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5972};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[360] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_sysex, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[360])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5976};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[361] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_channel_vo_2, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[361])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5980};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[362] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_message_type_data128, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[362])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5986};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[363] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_note_off, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[363])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5990};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[364] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_note_on, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[364])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5994};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[365] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_poly_pressure, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[365])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5998};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[366] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_control_chang, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[366])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6002};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[367] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_program_chang, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[367])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6006};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[368] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_channel_press, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[368])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6010};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[369] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_cv_status_pitch_bend, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[369])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6017};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_protocol, __pyx_mstate->__pyx_n_u_embedded, __pyx_mstate->__pyx_n_u_num_source_endpoints, __pyx_mstate->__pyx_n_u_num_destination_endpoints, __pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[370] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_new_entity, __pyx_mstate->__pyx_kp_b_iso88591_q_a_q_Q_7_Q_a_4AXQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[370])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6058};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_embedded, __pyx_mstate->__pyx_n_u_num_source_endpoints, __pyx_mstate->__pyx_n_u_num_destination_endpoints, __pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[371] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_add_entity, __pyx_mstate->__pyx_kp_b_iso88591_q_a_Q_7_Q_a_4AXQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[371])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6097};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[372] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_remove_entity, __pyx_mstate->__pyx_kp_b_iso88591_7q_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[372])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6120};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity, __pyx_mstate->__pyx_n_u_num_source_endpoints, __pyx_mstate->__pyx_n_u_num_destination_endpoints, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[373] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_add_or_remove_endpoi, __pyx_mstate->__pyx_kp_b_iso88591_q_a_a_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[373])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6145};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[374] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_setup_add_device, __pyx_mstate->__pyx_kp_b_iso88591_314Fa_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[374])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6164};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[375] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_setup_remove_device, __pyx_mstate->__pyx_kp_b_iso88591_6a7I_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[375])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6183};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[376] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_setup_add_external_device, __pyx_mstate->__pyx_kp_b_iso88591_1_Na_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[376])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6202};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[377] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_setup_remove_external_devic, __pyx_mstate->__pyx_kp_b_iso88591_a_QQR_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[377])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6221};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_manufacturer, __pyx_mstate->__pyx_n_u_model, __pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_cf_manufacturer, __pyx_mstate->__pyx_n_u_cf_model, __pyx_mstate->__pyx_n_u_name_bytes, __pyx_mstate->__pyx_n_u_manufacturer_bytes, __pyx_mstate->__pyx_n_u_model_bytes, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[378] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_external_device_create, __pyx_mstate->__pyx_kp_b_iso88591_D_q_L_q_U_a_2_6a_1_q_A_j_7_Q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[378])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_manufacturer, __pyx_mstate->__pyx_n_u_model, __pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_cf_name, __pyx_mstate->__pyx_n_u_cf_manufacturer, __pyx_mstate->__pyx_n_u_cf_model, __pyx_mstate->__pyx_n_u_name_bytes, __pyx_mstate->__pyx_n_u_manufacturer_bytes, __pyx_mstate->__pyx_n_u_model_bytes, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[379] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_create, __pyx_mstate->__pyx_kp_b_iso88591_D_q_L_q_U_a_2_6a_1_q_A_a_j_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[379])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6324};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[380] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_dispose, __pyx_mstate->__pyx_kp_b_iso88591_2_3EQ_wc_l_0_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[380])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6343};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list};
    __pyx_mstate_global->__pyx_codeobj_tab[381] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_list_get_number_of_d, __pyx_mstate->__pyx_kp_b_iso88591_a_EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[381])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6354};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_num_devices, __pyx_mstate->__pyx_n_u_device};
    __pyx_mstate_global->__pyx_codeobj_tab[382] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_list_get_device, __pyx_mstate->__pyx_kp_b_iso88591_GqH___vRr_F_Q_j_A_Qa_Q_j_a_wc_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[382])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6381};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list, __pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[383] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_list_add_device, __pyx_mstate->__pyx_kp_b_iso88591_8_j_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[383])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6403};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[384] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_list_dispose, __pyx_mstate->__pyx_kp_b_iso88591_6a7MQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[384])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6422};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_ref1, __pyx_mstate->__pyx_n_u_ref2, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[385] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_endpoint_set_ref_cons, __pyx_mstate->__pyx_kp_b_iso88591_m1_7q_A_q_q_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[385])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6447};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_ref1, __pyx_mstate->__pyx_n_u_ref2, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[386] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_endpoint_get_ref_cons, __pyx_mstate->__pyx_kp_b_iso88591_7q_JavQa_wc_l_0_F_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[386])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6470};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_runloop};
    __pyx_mstate_global->__pyx_codeobj_tab[387] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_driver_io_runloop, __pyx_mstate->__pyx_kp_b_iso88591_A_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[387])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6482};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_dev_list};
    __pyx_mstate_global->__pyx_codeobj_tab[388] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_driver_device_list, __pyx_mstate->__pyx_kp_b_iso88591_C1DVVW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[388])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6498};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_enabled, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[389] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_driver_enable_monitoring, __pyx_mstate->__pyx_kp_b_iso88591_1_a_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[389])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[390] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_params_init, __pyx_mstate->__pyx_kp_b_iso88591_1_6_1_av_D_U_1_vQ_a_6_F_F_P_YfI, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[390])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6567};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_persistent_owner_id, __pyx_mstate->__pyx_n_u_connection_params, __pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_note_transform, __pyx_mstate->__pyx_n_u_velocity_transform, __pyx_mstate->__pyx_n_u_sources, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_destinations, __pyx_mstate->__pyx_n_u_channel_map, __pyx_mstate->__pyx_n_u_note_number, __pyx_mstate->__pyx_n_u_velocity, __pyx_mstate->__pyx_n_u_cf_params, __pyx_mstate->__pyx_n_u_cf_owner_id, __pyx_mstate->__pyx_n_u_owner_id_bytes, __pyx_mstate->__pyx_n_u_connection, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[391] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_create, __pyx_mstate->__pyx_kp_b_iso88591_a_A_B_1_d_a_t1Kq_1Cq_U_6_QgQd_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[391])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6674};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_connection, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[392] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_dispose, __pyx_mstate->__pyx_kp_b_iso88591_UUV_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[392])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6693};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_connection, __pyx_mstate->__pyx_n_u_cf_params, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_data_length, __pyx_mstate->__pyx_n_u_data_ptr, __pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_source, __pyx_mstate->__pyx_n_u_dest, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[393] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_get_params, __pyx_mstate->__pyx_kp_b_iso88591_A_aq_wc_l_0_1_r_aq_q_vQ_q_A_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[393])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6774};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_connection, __pyx_mstate->__pyx_n_u_connection_params, __pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_sources, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_destinations, __pyx_mstate->__pyx_n_u_cf_params, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[394] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_set_params, __pyx_mstate->__pyx_kp_b_iso88591_1_d_a_t1Kq_1Cq_U_6_QgQd_2__q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[394])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6838};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_persistent_owner_id, __pyx_mstate->__pyx_n_u_owner_id_bytes, __pyx_mstate->__pyx_n_u_cf_owner_id, __pyx_mstate->__pyx_n_u_cf_connection_list, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_data_length, __pyx_mstate->__pyx_n_u_data_ptr, __pyx_mstate->__pyx_n_u_num_connections, __pyx_mstate->__pyx_n_u_connections, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[395] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_find, __pyx_mstate->__pyx_kp_b_iso88591_37_1_B_2_7_Q_a_4AXQ_1_c_1_E_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[395])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6890};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[396] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_none, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[396])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6894};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[397] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_filter_out, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[397])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6898};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[398] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_map_control, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[398])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6902};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[399] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_add, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[399])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6906};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[400] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_scale, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[400])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6910};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[401] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_min_value, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[401])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6914};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[402] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_max_value, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[402])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6918};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[403] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_transform_map_value, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[403])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6922};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[404] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_7bit, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[404])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6926};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[405] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_14bit, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[405])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6930};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[406] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_7bit_rpn, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[406])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6934};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[407] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_14bit_rpn, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[407])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6938};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[408] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_7bit_nrpn, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[408])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6942};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[409] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_control_type_14bit_nrpn, __pyx_mstate->__pyx_kp_b_iso88591_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[409])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6946};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[410] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_midi_thru_connection_max_end, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[410])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6984};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[411] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_dispose, __pyx_mstate->__pyx_kp_b_iso88591_4t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[411])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 6994};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[412] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ensure_not_disposed, __pyx_mstate->__pyx_kp_b_iso88591_a_4q_ar_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[412])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7004};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_object_id};
    __pyx_mstate_global->__pyx_codeobj_tab[413] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_set_object_id, __pyx_mstate->__pyx_kp_b_iso88591_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[413])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[414] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[414])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[415] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[415])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7013};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[416] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_new, __pyx_mstate->__pyx_kp_b_iso88591_a_1A_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[416])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7032};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[417] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_dispose, __pyx_mstate->__pyx_kp_b_iso88591_q_A_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[417])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7046};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[418] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_open, __pyx_mstate->__pyx_kp_b_iso88591_A_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[418])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7060};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[419] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_close, __pyx_mstate->__pyx_kp_b_iso88591_Ql_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[419])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7074};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[420] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_initialize, __pyx_mstate->__pyx_kp_b_iso88591_2_q_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[420])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7088};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[421] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_uninitialize, __pyx_mstate->__pyx_kp_b_iso88591_4A_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[421])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7102};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[422] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_start, __pyx_mstate->__pyx_kp_b_iso88591_Ql_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[422])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7116};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[423] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[423])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7130};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_is_open, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[424] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_open, __pyx_mstate->__pyx_kp_b_iso88591_q_a_Qa_wc_l_0_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[424])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7149};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_is_initialized, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[425] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_initialized, __pyx_mstate->__pyx_kp_b_iso88591_a_5Ql_AQ_wc_l_0_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[425])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7168};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_is_running, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[426] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_running, __pyx_mstate->__pyx_kp_b_iso88591_1_j_wc_l_0_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[426])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7187};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_description, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_node, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[427] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_add_node, __pyx_mstate->__pyx_kp_b_iso88591_AQ_Kq_AQ_T_1_k_QnA_a_QfAQ_wc_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[427])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7219};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_node_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[428] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_remove_node, __pyx_mstate->__pyx_kp_b_iso88591_2_z_TU_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[428])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7234};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[429] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_get_node_count, __pyx_mstate->__pyx_kp_b_iso88591_a_4A_1A_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[429])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7253};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_node, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[430] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_get_ind_node, __pyx_mstate->__pyx_kp_b_iso88591_7q_2_z_PQQR_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[430])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_node_id, __pyx_mstate->__pyx_n_u_desc, __pyx_mstate->__pyx_n_u_audio_unit, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_desc_dict};
    __pyx_mstate_global->__pyx_codeobj_tab[431] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_node_info, __pyx_mstate->__pyx_kp_b_iso88591_6a_q_Jk_6QRRS_wc_l_0_A_4q_A_Q_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[431])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7305};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_source_node, __pyx_mstate->__pyx_n_u_source_output, __pyx_mstate->__pyx_n_u_dest_node, __pyx_mstate->__pyx_n_u_dest_input, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[432] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_connect_node_input, __pyx_mstate->__pyx_kp_b_iso88591_q_A_1_1_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[432])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7332};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_dest_node, __pyx_mstate->__pyx_n_u_dest_input, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[433] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_disconnect_node_input, __pyx_mstate->__pyx_kp_b_iso88591_A_1_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[433])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7354};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[434] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_clear_connections, __pyx_mstate->__pyx_kp_b_iso88591_8_Q_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[434])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7368};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_is_updated, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[435] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_update, __pyx_mstate->__pyx_kp_b_iso88591_a_a_Qa_wc_l_0_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[435])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7387};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_cpu_load, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[436] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_get_cpu_load, __pyx_mstate->__pyx_kp_b_iso88591_A_2_z_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[436])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7406};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_max_load, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[437] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_get_max_cpu_load, __pyx_mstate->__pyx_kp_b_iso88591_0_5Ql_AQ_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[437])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7426};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[438] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_au_graph_err_node_not_found, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[438])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7430};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[439] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_au_graph_err_invalid_connect, __pyx_mstate->__pyx_kp_b_iso88591_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[439])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7434};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[440] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_au_graph_err_output_node_err, __pyx_mstate->__pyx_kp_b_iso88591_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[440])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7438};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[441] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_au_graph_err_cannot_do_in_cu, __pyx_mstate->__pyx_kp_b_iso88591_7q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[441])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7442};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[442] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_au_graph_err_invalid_audio_u, __pyx_mstate->__pyx_kp_b_iso88591_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[442])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7451};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_ref, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[443] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_new, __pyx_mstate->__pyx_kp_b_iso88591_a_1Cq_wc_l_0_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[443])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7467};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[444] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_dispose, __pyx_mstate->__pyx_kp_b_iso88591_q_q_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[444])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_time_format, __pyx_mstate->__pyx_n_u_clock_time, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[445] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_get_current_time, __pyx_mstate->__pyx_kp_b_iso88591_A_6a_q_a_wc_l_0_j_z_a_a_E_85_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[445])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7531};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[446] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_start, __pyx_mstate->__pyx_kp_b_iso88591_QoQ_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[446])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7545};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[447] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_stop, __pyx_mstate->__pyx_kp_b_iso88591_A_A_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[447])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7559};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_rate, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[448] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_set_play_rate, __pyx_mstate->__pyx_kp_b_iso88591_31O_Q_wc_l_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[448])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7574};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clock_id, __pyx_mstate->__pyx_n_u_rate, __pyx_mstate->__pyx_n_u_status};
    __pyx_mstate_global->__pyx_codeobj_tab[449] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_ca_clock_get_play_rate, __pyx_mstate->__pyx_kp_b_iso88591_Q_31O_Qa_wc_l_0_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[449])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7593};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[450] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_ca_clock_time_format_host_ti, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[450])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7597};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[451] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_ca_clock_time_format_samples, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[451])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7601};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[452] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_ca_clock_time_format_beats, __pyx_mstate->__pyx_kp_b_iso88591_Q_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[452])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7605};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[453] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_ca_clock_time_format_seconds, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[453])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7609};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[454] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_get_ca_clock_time_format_smpte_t, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[454])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7666};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_target_peak, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_max_val, __pyx_mstate->__pyx_n_u_gain, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[455] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_normalize_audio_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_Q_E_aq_U_1_4q_3d_A_d_Qc_82, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[455])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7702};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_gain_db, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_linear_gain, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[456] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_apply_gain_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_L_E_aq_U_1_3fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[456])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7725};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_output, __pyx_mstate->__pyx_n_u_input1, __pyx_mstate->__pyx_n_u_input2, __pyx_mstate->__pyx_n_u_mix_ratio, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_ratio1, __pyx_mstate->__pyx_n_u_ratio2, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[457] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_mix_audio_float32, __pyx_mstate->__pyx_kp_b_iso88591_12_fF_1_fAQ_D_A_E_aq_U_1_as_vQc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[457])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7752};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_float_data, __pyx_mstate->__pyx_n_u_int_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[458] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_convert_float32_to_int16, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_E_aq_U_1_j_Cr_E_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[458])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7776};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_int_data, __pyx_mstate->__pyx_n_u_float_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[459] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_convert_int16_to_float32, __pyx_mstate->__pyx_kp_b_iso88591_hfAQ_aq_E_aq_U_1_3e_has_Rq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[459])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7802};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stereo_data, __pyx_mstate->__pyx_n_u_mono_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[460] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_stereo_to_mono_float32, __pyx_mstate->__pyx_kp_b_iso88591_k_q_E_aq_QfKq_3b_1Ct2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[460])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7822};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_mono_data, __pyx_mstate->__pyx_n_u_stereo_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[461] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_mono_to_stereo_float32, __pyx_mstate->__pyx_kp_b_iso88591_ivQa_E_aq_q_5_q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[461])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7847};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_fade_frames, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_actual_fade, __pyx_mstate->__pyx_n_u_gain, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[462] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_apply_fade_in_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_A_E_aq_b_Q_U_1_3fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[462])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7872};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_fade_frames, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_actual_fade, __pyx_mstate->__pyx_n_u_start_frame, __pyx_mstate->__pyx_n_u_gain, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[463] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_apply_fade_out_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_A_7_A_E_aq_4s_Rr_A_U_1_r_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[463])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7902};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_sum_squares, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_sample};
    __pyx_mstate_global->__pyx_codeobj_tab[464] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_calculate_rms_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_E_aq_U_1_1Cq_wb_4q_Cwb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[464])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7928};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_frames_3, __pyx_mstate->__pyx_n_u_channels, __pyx_mstate->__pyx_n_u_peak, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_abs_val};
    __pyx_mstate_global->__pyx_codeobj_tab[465] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_calculate_peak_float32, __pyx_mstate->__pyx_kp_b_iso88591_j_aq_E_aq_U_1_az_Q_82Q_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[465])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7959};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_target_peak, __pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[466] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_normalize_audio, __pyx_mstate->__pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_ZuA_1HA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[466])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_gain_db, __pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[467] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_apply_gain, __pyx_mstate->__pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_ZuA_axq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[467])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 8017};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_np};
    __pyx_mstate_global->__pyx_codeobj_tab[468] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_calculate_rms, __pyx_mstate->__pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[468])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 8044};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_audio_data, __pyx_mstate->__pyx_n_u_np};
    __pyx_mstate_global->__pyx_codeobj_tab[469] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_calculate_peak, __pyx_mstate->__pyx_kp_b_iso88591_z_2Q_Zwar_z_s_Zxr_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[469])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall (used by PyObjectCallOneArg) */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* RaiseArgTupleInvalid */
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,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseException */
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 *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            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 = PyObject_Call(type, args, NULL);
            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) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else 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) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* CIntToDigits (used by CIntToPyUnicode) */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
        Py_INCREF(values[i]);
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n)))
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    Py_ssize_t adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* RaiseTooManyValuesToUnpack */
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);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    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;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    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;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PySequenceMultiply */
#if CYTHON_USE_TYPE_SLOTS
static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
    PyObject *result, *pymul = PyLong_FromSsize_t(mul);
    if (unlikely(!pymul))
        return NULL;
    result = PyNumber_Multiply(seq, pymul);
    Py_DECREF(pymul);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
    PyTypeObject *type = Py_TYPE(seq);
    if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
        return type->tp_as_sequence->sq_repeat(seq, mul);
    } else {
        return __Pyx_PySequence_Multiply_Generic(seq, mul);
    }
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
            Py_INCREF(v);
            return PyList_SetItem(o, n, v);
        } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old;
            Py_INCREF(v);
            old = PyList_GET_ITEM(o, n);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 0;
        }
    } else
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_SetItem(o, i, v);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v);
}

/* RaiseUnboundLocalError */
static void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) {
    long q = a / b;
    long r = a - q*b;
    long adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_mstate_global->__pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyObjectVectorCallKwBuilder */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectCall2Args (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* SetStringIndexingError (used by GetItemIntUnicode) */
static void __Pyx_SetStringIndexingError(const char* message, int has_gil) {
    if (!has_gil) {
        PyGILState_STATE gil_state = PyGILState_Ensure();
        PyErr_SetString(PyExc_IndexError, message);
        PyGILState_Release(gil_state);
    } else
        PyErr_SetString(PyExc_IndexError, message);
}

/* GetItemIntUnicode */
static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i,
                                                           int wraparound, int boundscheck, int has_gil) {
    Py_ssize_t length;
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1;
    if (wraparound | boundscheck) {
        length = __Pyx_PyUnicode_GET_LENGTH(ustring);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return (Py_UCS4)-1;
        #endif
        if (wraparound & unlikely(i < 0)) i += length;
        if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) {
            return __Pyx_PyUnicode_READ_CHAR(ustring, i);
        } else {
            __Pyx_SetStringIndexingError("string index out of range", has_gil);
            return (Py_UCS4)-1;
        }
    } else {
        return __Pyx_PyUnicode_READ_CHAR(ustring, i);
    }
}

/* pybuiltin_invalid (used by pyint_simplify) */
static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) {
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    if (argname) {
        PyErr_Format(PyExc_TypeError,
            "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")",
            argname, type_name, obj_type_name
        );
    } else {
        PyErr_Format(PyExc_TypeError,
            "Expected %.200s, got " __Pyx_FMT_TYPENAME,
            type_name, obj_type_name
        );
    }
    __Pyx_DECREF_TypeName(obj_type_name);
}

/* pyint_simplify */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) {
    PyObject *number = *number_var;
    if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) {
        return 0;
    }
    PyObject *int_object;
    if (likely(PyNumber_Check(number))) {
        int_object = PyNumber_Long(number);
        if (unlikely(!int_object)) goto bad;
    } else {
        __Pyx_PyBuiltin_Invalid(number, "int", argname);
        goto bad;
    }
    *number_var = int_object;
    Py_DECREF(number);
    return 0;
bad:
    *number_var = NULL;
    Py_DECREF(number);
    return -1;
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_AndObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    if ((intval & PyLong_MASK) == intval) {
        long last_digit = (long) __Pyx_PyLong_Digits(op1)[0];
        long result = intval & (likely(is_positive) ? last_digit : (PyLong_MASK - last_digit + 1));
        return PyLong_FromLong(result);
    }
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_and(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a & b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla & llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyLong_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_AndObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    return __Pyx_Fallback___Pyx_PyLong_AndObjC(op1, op2, inplace);
}
#endif

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_RshiftObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceRshift : PyNumber_Rshift)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
#if (defined(__cplusplus) && __cplusplus >= 202002L)\
        || (defined(__GNUC__) || (defined(__clang__))) &&\
            (defined(__arm__) || defined(__x86_64__) || defined(__i386__))\
        || (defined(_MSC_VER) &&\
            (defined(_M_ARM) || defined(_M_AMD64) || defined(_M_IX86)))
    const int negative_shift_works = 1;
#else
    const int negative_shift_works = 0;
#endif
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_rshift(op1, op2);
    }
    calculate_long:
        if ((!negative_shift_works) && unlikely(a < 0)) goto fallback;
        {
            long x;
            if (unlikely(b >= (long) (sizeof(long)*8))) {
                x = (a < 0) ? -1 : 0;
            } else
            x = a >> b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        if ((!negative_shift_works) && unlikely(lla < 0)) goto fallback;
        {
            PY_LONG_LONG llx;
            if (unlikely(llb >= (long long) (sizeof(long long)*8))) {
                llx = (lla < 0) ? -1 : 0;
            } else
            llx = lla >> llb;
            return PyLong_FromLongLong(llx);
        }
    fallback:
        return __Pyx_Fallback___Pyx_PyLong_RshiftObjC(op1, op2, inplace);
    
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyLong_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_RshiftObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    return __Pyx_Fallback___Pyx_PyLong_RshiftObjC(op1, op2, inplace);
}
#endif

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_OSStatus(OSStatus value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const OSStatus neg_one = (OSStatus) -1, const_zero = (OSStatus) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (OSStatus) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_OSStatus(OSStatus value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(OSStatus)*3+2];
    char *dpos, *end = digits + sizeof(OSStatus)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    OSStatus remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const OSStatus neg_one = (OSStatus) -1, const_zero = (OSStatus) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (OSStatus) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (OSStatus) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (OSStatus) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_UInt32(UInt32 value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const UInt32 neg_one = (UInt32) -1, const_zero = (UInt32) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (UInt32) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_UInt32(UInt32 value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(UInt32)*3+2];
    char *dpos, *end = digits + sizeof(UInt32)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    UInt32 remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const UInt32 neg_one = (UInt32) -1, const_zero = (UInt32) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (UInt32) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (UInt32) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (UInt32) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        if (unlikely(PyTuple_Check(key))) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args)) {
                PyErr_SetObject(PyExc_KeyError, args);
                Py_DECREF(args);
            }
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
    }
    return value;
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (long) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyObjectGetMethod (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod1 (used by append) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* ErrOccurredWithGIL */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  PyGILState_STATE _save = PyGILState_Ensure();
  err = !!PyErr_Occurred();
  PyGILState_Release(_save);
  return err;
}

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#elif PY_VERSION_HEX >= 0x030d0000
    PyDict_SetDefaultRef(d, key, default_value, &value);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
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 - start) / 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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            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(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    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;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* MemviewRefcount */
#include <stdio.h>
#ifndef _Py_NO_RETURN
#define _Py_NO_RETURN
#endif
_Py_NO_RETURN
static void __pyx_fatalerror(const char *fmt, ...) {
    va_list vargs;
    char msg[200];
#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        return;
    }
    old_acquisition_count = __pyx_add_acquisition_count(memview);
    if (unlikely(old_acquisition_count <= 0)) {
        if (likely(old_acquisition_count == 0)) {
            if (have_gil) {
                Py_INCREF((PyObject *) memview);
            } else {
                PyGILState_STATE _gilstate = PyGILState_Ensure();
                Py_INCREF((PyObject *) memview);
                PyGILState_Release(_gilstate);
            }
        } else {
            __pyx_fatalerror("Acquisition count is %d (line %d)",
                             old_acquisition_count+1, lineno);
        }
    }
}
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        memslice->memview = NULL;
        return;
    }
    old_acquisition_count = __pyx_sub_acquisition_count(memview);
    memslice->data = NULL;
    if (likely(old_acquisition_count > 1)) {
        memslice->memview = NULL;
    } else if (likely(old_acquisition_count == 1)) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         old_acquisition_count-1, lineno);
    }
}

/* MemviewSliceIsContig */
static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* MemviewSliceInit */
static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (unlikely(memviewslice->memview || memviewslice->data)) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF((PyObject*)memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* IsLittleEndian (used by BufferFormatCheck) */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck (used by MemviewSliceValidateAndInit) */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              const __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 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)
        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 '?': return "'bool'";
    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 "unparsable format string";
  }
}
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;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(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 sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    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;
    }
  }
}
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;
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(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);
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
    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;
    }
}
/* 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;
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(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);
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
    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;
    }
}
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 '?': 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;
    }
  }
}
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 {
    const __Pyx_StructField* field = ctx->head->field;
    const __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);
  }
}
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;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    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;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    const __Pyx_StructField* field = ctx->head->field;
    const __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;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      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;
        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 int
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number, ndim;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return -1;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
    ndim = ctx->head->field->type->ndim;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return -1;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
            PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
            return -1;
        }
        if (*ts != ',' && *ts != ')') {
            PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
            return -1;
        }
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim) {
        PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
        return -1;
    }
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return -1;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return 0;
}
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 '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          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':
        {
          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;
          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 '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          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;
        }
        CYTHON_FALLTHROUGH;
      case '?': 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 'p':
        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        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) < 0) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* TypeInfoCompare (used by MemviewSliceValidateAndInit) */
  static int
  __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b)
  {
      int i;
      if (!a || !b)
          return 0;
      if (a == b)
          return 1;
      if (a->size != b->size || a->typegroup != b->typegroup ||
              a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
          if (a->typegroup == 'H' || b->typegroup == 'H') {
              return a->size == b->size;
          } else {
              return 0;
          }
      }
      if (a->ndim) {
          for (i = 0; i < a->ndim; i++)
              if (a->arraysize[i] != b->arraysize[i])
                  return 0;
      }
      if (a->typegroup == 'S') {
          if (a->flags != b->flags)
              return 0;
          if (a->fields || b->fields) {
              if (!(a->fields && b->fields))
                  return 0;
              for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                  const __Pyx_StructField *field_a = a->fields + i;
                  const __Pyx_StructField *field_b = b->fields + i;
                  if (field_a->offset != field_b->offset ||
                      !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                      return 0;
              }
              return !a->fields[i].type && !b->fields[i].type;
          }
      }
      return 1;
  }
  
/* MemviewSliceValidateAndInit (used by ObjectToMemviewSlice) */
  static int
  __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
  {
      if (buf->shape[dim] <= 1)
          return 1;
      if (buf->strides) {
          if (spec & __Pyx_MEMVIEW_CONTIG) {
              if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                  if (unlikely(buf->strides[dim] != sizeof(void *))) {
                      PyErr_Format(PyExc_ValueError,
                                   "Buffer is not indirectly contiguous "
                                   "in dimension %d.", dim);
                      goto fail;
                  }
              } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
                  PyErr_SetString(PyExc_ValueError,
                                  "Buffer and memoryview are not contiguous "
                                  "in the same dimension.");
                  goto fail;
              }
          }
          if (spec & __Pyx_MEMVIEW_FOLLOW) {
              Py_ssize_t stride = buf->strides[dim];
              if (stride < 0)
                  stride = -stride;
              if (unlikely(stride < buf->itemsize)) {
                  PyErr_SetString(PyExc_ValueError,
                                  "Buffer and memoryview are not contiguous "
                                  "in the same dimension.");
                  goto fail;
              }
          }
      } else {
          if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
              PyErr_Format(PyExc_ValueError,
                           "C-contiguous buffer is not contiguous in "
                           "dimension %d", dim);
              goto fail;
          } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
              PyErr_Format(PyExc_ValueError,
                           "C-contiguous buffer is not indirect in "
                           "dimension %d", dim);
              goto fail;
          } else if (unlikely(buf->suboffsets)) {
              PyErr_SetString(PyExc_ValueError,
                              "Buffer exposes suboffsets but no strides");
              goto fail;
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int
  __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
  {
      CYTHON_UNUSED_VAR(ndim);
      if (spec & __Pyx_MEMVIEW_DIRECT) {
          if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
              PyErr_Format(PyExc_ValueError,
                           "Buffer not compatible with direct access "
                           "in dimension %d.", dim);
              goto fail;
          }
      }
      if (spec & __Pyx_MEMVIEW_PTR) {
          if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
              PyErr_Format(PyExc_ValueError,
                           "Buffer is not indirectly accessible "
                           "in dimension %d.", dim);
              goto fail;
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int
  __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
  {
      int i;
      if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
          Py_ssize_t stride = 1;
          for (i = 0; i < ndim; i++) {
              if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                  PyErr_SetString(PyExc_ValueError,
                      "Buffer not fortran contiguous.");
                  goto fail;
              }
              stride = stride * buf->shape[i];
          }
      } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
          Py_ssize_t stride = 1;
          for (i = ndim - 1; i >- 1; i--) {
              if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                  PyErr_SetString(PyExc_ValueError,
                      "Buffer not C contiguous.");
                  goto fail;
              }
              stride = stride * buf->shape[i];
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int __Pyx_ValidateAndInit_memviewslice(
                  int *axes_specs,
                  int c_or_f_flag,
                  int buf_flags,
                  int ndim,
                  const __Pyx_TypeInfo *dtype,
                  __Pyx_BufFmt_StackElem stack[],
                  __Pyx_memviewslice *memviewslice,
                  PyObject *original_obj)
  {
      struct __pyx_memoryview_obj *memview, *new_memview;
      __Pyx_RefNannyDeclarations
      Py_buffer *buf;
      int i, spec = 0, retval = -1;
      __Pyx_BufFmt_Context ctx;
      int from_memoryview = __pyx_memoryview_check(original_obj);
      __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
      if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                              original_obj)->typeinfo)) {
          memview = (struct __pyx_memoryview_obj *) original_obj;
          new_memview = NULL;
      } else {
          memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                              original_obj, buf_flags, 0, dtype);
          new_memview = memview;
          if (unlikely(!memview))
              goto fail;
      }
      buf = &memview->view;
      if (unlikely(buf->ndim != ndim)) {
          PyErr_Format(PyExc_ValueError,
                  "Buffer has wrong number of dimensions (expected %d, got %d)",
                  ndim, buf->ndim);
          goto fail;
      }
      if (new_memview) {
          __Pyx_BufFmt_Init(&ctx, stack, dtype);
          if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
      }
      if (unlikely((unsigned) buf->itemsize != dtype->size)) {
          PyErr_Format(PyExc_ValueError,
                       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                       "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                       buf->itemsize,
                       (buf->itemsize > 1) ? "s" : "",
                       dtype->name,
                       dtype->size,
                       (dtype->size > 1) ? "s" : "");
          goto fail;
      }
      if (buf->len > 0) {
          for (i = 0; i < ndim; i++) {
              spec = axes_specs[i];
              if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
                  goto fail;
              if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
                  goto fail;
          }
          if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
              goto fail;
      }
      if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                           new_memview != NULL) == -1)) {
          goto fail;
      }
      retval = 0;
      goto no_fail;
  fail:
      Py_XDECREF((PyObject*)new_memview);
      retval = -1;
  no_fail:
      __Pyx_RefNannyFinishContext();
      return retval;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_char(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_char, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char__const__(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_unsigned_char__const__, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_unsigned_char, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_float32_t(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
                                                   &__Pyx_TypeInfo_nn___pyx_t_9coremusic_4capi_float32_t, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_9coremusic_4capi_int16_t(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
                                                   &__Pyx_TypeInfo_nn___pyx_t_9coremusic_4capi_int16_t, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_9coremusic_4capi_float32_t(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_nn___pyx_t_9coremusic_4capi_float32_t, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* MemviewSliceCopy */
  static __Pyx_memviewslice
  __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                   const char *mode, int ndim,
                                   size_t sizeof_dtype, int contig_flag,
                                   int dtype_is_object)
  {
      __Pyx_RefNannyDeclarations
      int i;
      __Pyx_memviewslice new_mvs = __Pyx_MEMSLICE_INIT;
      struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
      Py_buffer *buf = &from_memview->view;
      PyObject *shape_tuple = NULL;
      PyObject *temp_int = NULL;
      struct __pyx_array_obj *array_obj = NULL;
      struct __pyx_memoryview_obj *memview_obj = NULL;
      __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
      for (i = 0; i < ndim; i++) {
          if (unlikely(from_mvs->suboffsets[i] >= 0)) {
              PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                             "indirect dimensions (axis %d)", i);
              goto fail;
          }
      }
      shape_tuple = PyTuple_New(ndim);
      if (unlikely(!shape_tuple)) {
          goto fail;
      }
      __Pyx_GOTREF(shape_tuple);
      for(i = 0; i < ndim; i++) {
          temp_int = PyLong_FromSsize_t(from_mvs->shape[i]);
          if(unlikely(!temp_int)) {
              goto fail;
          } else {
  #if CYTHON_ASSUME_SAFE_MACROS
              PyTuple_SET_ITEM(shape_tuple, i, temp_int);
  #else
              if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) {
                  goto fail;
              }
  #endif
              temp_int = NULL;
          }
      }
      array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL);
      if (unlikely(!array_obj)) {
          goto fail;
      }
      __Pyx_GOTREF(array_obj);
      memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                      (PyObject *) array_obj, contig_flag,
                                      dtype_is_object,
                                      from_mvs->memview->typeinfo);
      if (unlikely(!memview_obj))
          goto fail;
      if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
          goto fail;
      if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                  dtype_is_object) < 0))
          goto fail;
      goto no_fail;
  fail:
      __Pyx_XDECREF((PyObject *) new_mvs.memview);
      new_mvs.memview = NULL;
      new_mvs.data = NULL;
  no_fail:
      __Pyx_XDECREF(shape_tuple);
      __Pyx_XDECREF(temp_int);
      __Pyx_XDECREF((PyObject *) array_obj);
      __Pyx_RefNannyFinishContext();
      return new_mvs;
  }
  
/* CIntFromPy */
  static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int neg_one = (int) -1, const_zero = (int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          int val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (int) -1;
          val = __Pyx_PyLong_As_int(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                              return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                              return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                              return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (int) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(int) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                              return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                              return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                              return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                              return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                              return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                              return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(int) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
          } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          int val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (int) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (int) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (int) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (int) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((int) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((int) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (int) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to int");
      return (int) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to int");
      return (int) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int neg_one = (int) -1, const_zero = (int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(int) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(int) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(int),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const long neg_one = (long) -1, const_zero = (long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          long val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (long) -1;
          val = __Pyx_PyLong_As_long(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                              return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                              return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                              return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (long) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(long) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                              return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                              return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                              return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                              return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                              return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                              return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(long) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
          } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          long val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (long) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (long) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (long) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (long) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((long) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((long) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (long) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to long");
      return (long) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to long");
      return (long) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const long neg_one = (long) -1, const_zero = (long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(long) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(long) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(long) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(long),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SInt32(SInt32 value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SInt32 neg_one = (SInt32) -1, const_zero = (SInt32) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(SInt32) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SInt32) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(SInt32) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(SInt32) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SInt32) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(SInt32),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SInt32));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE UInt32 __Pyx_PyLong_As_UInt32(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const UInt32 neg_one = (UInt32) -1, const_zero = (UInt32) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          UInt32 val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (UInt32) -1;
          val = __Pyx_PyLong_As_UInt32(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(UInt32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(UInt32) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) >= 2 * PyLong_SHIFT)) {
                              return (UInt32) (((((UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(UInt32) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) >= 3 * PyLong_SHIFT)) {
                              return (UInt32) (((((((UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(UInt32) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) >= 4 * PyLong_SHIFT)) {
                              return (UInt32) (((((((((UInt32)digits[3]) << PyLong_SHIFT) | (UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (UInt32) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(UInt32) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt32, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(UInt32) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(UInt32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(UInt32) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 2 * PyLong_SHIFT)) {
                              return (UInt32) (((UInt32)-1)*(((((UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(UInt32) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 2 * PyLong_SHIFT)) {
                              return (UInt32) ((((((UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(UInt32) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 3 * PyLong_SHIFT)) {
                              return (UInt32) (((UInt32)-1)*(((((((UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(UInt32) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 3 * PyLong_SHIFT)) {
                              return (UInt32) ((((((((UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(UInt32) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 4 * PyLong_SHIFT)) {
                              return (UInt32) (((UInt32)-1)*(((((((((UInt32)digits[3]) << PyLong_SHIFT) | (UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(UInt32) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt32) - 1 > 4 * PyLong_SHIFT)) {
                              return (UInt32) ((((((((((UInt32)digits[3]) << PyLong_SHIFT) | (UInt32)digits[2]) << PyLong_SHIFT) | (UInt32)digits[1]) << PyLong_SHIFT) | (UInt32)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(UInt32) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt32, long, PyLong_AsLong(x))
          } else if ((sizeof(UInt32) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt32, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          UInt32 val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (UInt32) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (UInt32) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (UInt32) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (UInt32) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(UInt32) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((UInt32) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(UInt32) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((UInt32) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((UInt32) 1) << (sizeof(UInt32) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (UInt32) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to UInt32");
      return (UInt32) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to UInt32");
      return (UInt32) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int neg_one = (int) -1, const_zero = (int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(int) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(int) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(int),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt32(UInt32 value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const UInt32 neg_one = (UInt32) -1, const_zero = (UInt32) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(UInt32) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt32) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(UInt32) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(UInt32) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt32) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(UInt32),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(UInt32));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_Boolean(Boolean value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const Boolean neg_one = (Boolean) -1, const_zero = (Boolean) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(Boolean) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(Boolean) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(Boolean) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(Boolean) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(Boolean) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(Boolean),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Boolean));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_uint64_t(uint64_t value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(uint64_t) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(uint64_t) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int64_t(int64_t value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(int64_t) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(int64_t) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamSeekFlags(AudioFileStreamSeekFlags value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const AudioFileStreamSeekFlags neg_one = (AudioFileStreamSeekFlags) -1, const_zero = (AudioFileStreamSeekFlags) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(AudioFileStreamSeekFlags) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamSeekFlags) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(AudioFileStreamSeekFlags) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(AudioFileStreamSeekFlags) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamSeekFlags) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(AudioFileStreamSeekFlags),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AudioFileStreamSeekFlags));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE CFIndex __Pyx_PyLong_As_CFIndex(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const CFIndex neg_one = (CFIndex) -1, const_zero = (CFIndex) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          CFIndex val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (CFIndex) -1;
          val = __Pyx_PyLong_As_CFIndex(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(CFIndex, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(CFIndex) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) >= 2 * PyLong_SHIFT)) {
                              return (CFIndex) (((((CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(CFIndex) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) >= 3 * PyLong_SHIFT)) {
                              return (CFIndex) (((((((CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(CFIndex) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) >= 4 * PyLong_SHIFT)) {
                              return (CFIndex) (((((((((CFIndex)digits[3]) << PyLong_SHIFT) | (CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (CFIndex) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(CFIndex) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(CFIndex, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(CFIndex) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(CFIndex, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(CFIndex, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(CFIndex) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 2 * PyLong_SHIFT)) {
                              return (CFIndex) (((CFIndex)-1)*(((((CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(CFIndex) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 2 * PyLong_SHIFT)) {
                              return (CFIndex) ((((((CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(CFIndex) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 3 * PyLong_SHIFT)) {
                              return (CFIndex) (((CFIndex)-1)*(((((((CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(CFIndex) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 3 * PyLong_SHIFT)) {
                              return (CFIndex) ((((((((CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(CFIndex) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 4 * PyLong_SHIFT)) {
                              return (CFIndex) (((CFIndex)-1)*(((((((((CFIndex)digits[3]) << PyLong_SHIFT) | (CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(CFIndex) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(CFIndex, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(CFIndex) - 1 > 4 * PyLong_SHIFT)) {
                              return (CFIndex) ((((((((((CFIndex)digits[3]) << PyLong_SHIFT) | (CFIndex)digits[2]) << PyLong_SHIFT) | (CFIndex)digits[1]) << PyLong_SHIFT) | (CFIndex)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(CFIndex) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(CFIndex, long, PyLong_AsLong(x))
          } else if ((sizeof(CFIndex) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(CFIndex, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          CFIndex val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (CFIndex) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (CFIndex) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (CFIndex) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (CFIndex) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(CFIndex) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((CFIndex) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(CFIndex) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((CFIndex) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((CFIndex) 1) << (sizeof(CFIndex) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (CFIndex) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to CFIndex");
      return (CFIndex) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to CFIndex");
      return (CFIndex) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CFIndex(CFIndex value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const CFIndex neg_one = (CFIndex) -1, const_zero = (CFIndex) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(CFIndex) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(CFIndex) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(CFIndex) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(CFIndex) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(CFIndex) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(CFIndex),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CFIndex));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE SInt32 __Pyx_PyLong_As_SInt32(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SInt32 neg_one = (SInt32) -1, const_zero = (SInt32) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          SInt32 val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (SInt32) -1;
          val = __Pyx_PyLong_As_SInt32(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(SInt32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(SInt32) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) >= 2 * PyLong_SHIFT)) {
                              return (SInt32) (((((SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(SInt32) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) >= 3 * PyLong_SHIFT)) {
                              return (SInt32) (((((((SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(SInt32) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) >= 4 * PyLong_SHIFT)) {
                              return (SInt32) (((((((((SInt32)digits[3]) << PyLong_SHIFT) | (SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (SInt32) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(SInt32) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt32, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(SInt32) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(SInt32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(SInt32) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 2 * PyLong_SHIFT)) {
                              return (SInt32) (((SInt32)-1)*(((((SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(SInt32) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 2 * PyLong_SHIFT)) {
                              return (SInt32) ((((((SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(SInt32) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 3 * PyLong_SHIFT)) {
                              return (SInt32) (((SInt32)-1)*(((((((SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(SInt32) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 3 * PyLong_SHIFT)) {
                              return (SInt32) ((((((((SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(SInt32) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 4 * PyLong_SHIFT)) {
                              return (SInt32) (((SInt32)-1)*(((((((((SInt32)digits[3]) << PyLong_SHIFT) | (SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(SInt32) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt32) - 1 > 4 * PyLong_SHIFT)) {
                              return (SInt32) ((((((((((SInt32)digits[3]) << PyLong_SHIFT) | (SInt32)digits[2]) << PyLong_SHIFT) | (SInt32)digits[1]) << PyLong_SHIFT) | (SInt32)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(SInt32) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt32, long, PyLong_AsLong(x))
          } else if ((sizeof(SInt32) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt32, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          SInt32 val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (SInt32) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (SInt32) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (SInt32) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (SInt32) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(SInt32) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((SInt32) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(SInt32) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((SInt32) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((SInt32) 1) << (sizeof(SInt32) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (SInt32) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to SInt32");
      return (SInt32) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to SInt32");
      return (SInt32) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamPropertyFlags(AudioFileStreamPropertyFlags value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const AudioFileStreamPropertyFlags neg_one = (AudioFileStreamPropertyFlags) -1, const_zero = (AudioFileStreamPropertyFlags) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(AudioFileStreamPropertyFlags) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamPropertyFlags) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(AudioFileStreamPropertyFlags) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(AudioFileStreamPropertyFlags) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamPropertyFlags) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(AudioFileStreamPropertyFlags),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AudioFileStreamPropertyFlags));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_AudioFileStreamParseFlags(AudioFileStreamParseFlags value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const AudioFileStreamParseFlags neg_one = (AudioFileStreamParseFlags) -1, const_zero = (AudioFileStreamParseFlags) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(AudioFileStreamParseFlags) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamParseFlags) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(AudioFileStreamParseFlags) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(AudioFileStreamParseFlags) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(AudioFileStreamParseFlags) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(AudioFileStreamParseFlags),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(AudioFileStreamParseFlags));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDIMessageType(MIDIMessageType value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const MIDIMessageType neg_one = (MIDIMessageType) -1, const_zero = (MIDIMessageType) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(MIDIMessageType) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDIMessageType) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(MIDIMessageType) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(MIDIMessageType) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDIMessageType) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(MIDIMessageType),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MIDIMessageType));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDICVStatus(MIDICVStatus value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const MIDICVStatus neg_one = (MIDICVStatus) -1, const_zero = (MIDICVStatus) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(MIDICVStatus) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDICVStatus) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(MIDICVStatus) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(MIDICVStatus) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDICVStatus) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(MIDICVStatus),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MIDICVStatus));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt8(UInt8 value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const UInt8 neg_one = (UInt8) -1, const_zero = (UInt8) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(UInt8) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt8) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(UInt8) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(UInt8) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt8) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(UInt8),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(UInt8));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDITransformType(MIDITransformType value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const MIDITransformType neg_one = (MIDITransformType) -1, const_zero = (MIDITransformType) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(MIDITransformType) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDITransformType) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(MIDITransformType) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(MIDITransformType) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDITransformType) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(MIDITransformType),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MIDITransformType));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE UInt8 __Pyx_PyLong_As_UInt8(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const UInt8 neg_one = (UInt8) -1, const_zero = (UInt8) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          UInt8 val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (UInt8) -1;
          val = __Pyx_PyLong_As_UInt8(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(UInt8, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(UInt8) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) >= 2 * PyLong_SHIFT)) {
                              return (UInt8) (((((UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(UInt8) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) >= 3 * PyLong_SHIFT)) {
                              return (UInt8) (((((((UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(UInt8) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) >= 4 * PyLong_SHIFT)) {
                              return (UInt8) (((((((((UInt8)digits[3]) << PyLong_SHIFT) | (UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (UInt8) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(UInt8) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt8, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(UInt8) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(UInt8, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(UInt8) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 2 * PyLong_SHIFT)) {
                              return (UInt8) (((UInt8)-1)*(((((UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(UInt8) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 2 * PyLong_SHIFT)) {
                              return (UInt8) ((((((UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(UInt8) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 3 * PyLong_SHIFT)) {
                              return (UInt8) (((UInt8)-1)*(((((((UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(UInt8) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 3 * PyLong_SHIFT)) {
                              return (UInt8) ((((((((UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(UInt8) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 4 * PyLong_SHIFT)) {
                              return (UInt8) (((UInt8)-1)*(((((((((UInt8)digits[3]) << PyLong_SHIFT) | (UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(UInt8) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(UInt8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(UInt8) - 1 > 4 * PyLong_SHIFT)) {
                              return (UInt8) ((((((((((UInt8)digits[3]) << PyLong_SHIFT) | (UInt8)digits[2]) << PyLong_SHIFT) | (UInt8)digits[1]) << PyLong_SHIFT) | (UInt8)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(UInt8) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt8, long, PyLong_AsLong(x))
          } else if ((sizeof(UInt8) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(UInt8, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          UInt8 val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (UInt8) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (UInt8) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (UInt8) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (UInt8) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(UInt8) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((UInt8) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(UInt8) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((UInt8) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((UInt8) 1) << (sizeof(UInt8) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (UInt8) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to UInt8");
      return (UInt8) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to UInt8");
      return (UInt8) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SInt16(SInt16 value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SInt16 neg_one = (SInt16) -1, const_zero = (SInt16) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(SInt16) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SInt16) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(SInt16) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(SInt16) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SInt16) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(SInt16),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SInt16));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE SInt16 __Pyx_PyLong_As_SInt16(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SInt16 neg_one = (SInt16) -1, const_zero = (SInt16) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          SInt16 val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (SInt16) -1;
          val = __Pyx_PyLong_As_SInt16(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(SInt16, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(SInt16) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) >= 2 * PyLong_SHIFT)) {
                              return (SInt16) (((((SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(SInt16) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) >= 3 * PyLong_SHIFT)) {
                              return (SInt16) (((((((SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(SInt16) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) >= 4 * PyLong_SHIFT)) {
                              return (SInt16) (((((((((SInt16)digits[3]) << PyLong_SHIFT) | (SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (SInt16) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(SInt16) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt16, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(SInt16) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(SInt16, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(SInt16) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 2 * PyLong_SHIFT)) {
                              return (SInt16) (((SInt16)-1)*(((((SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(SInt16) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 2 * PyLong_SHIFT)) {
                              return (SInt16) ((((((SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(SInt16) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 3 * PyLong_SHIFT)) {
                              return (SInt16) (((SInt16)-1)*(((((((SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(SInt16) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 3 * PyLong_SHIFT)) {
                              return (SInt16) ((((((((SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(SInt16) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 4 * PyLong_SHIFT)) {
                              return (SInt16) (((SInt16)-1)*(((((((((SInt16)digits[3]) << PyLong_SHIFT) | (SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(SInt16) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(SInt16, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(SInt16) - 1 > 4 * PyLong_SHIFT)) {
                              return (SInt16) ((((((((((SInt16)digits[3]) << PyLong_SHIFT) | (SInt16)digits[2]) << PyLong_SHIFT) | (SInt16)digits[1]) << PyLong_SHIFT) | (SInt16)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(SInt16) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt16, long, PyLong_AsLong(x))
          } else if ((sizeof(SInt16) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(SInt16, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          SInt16 val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (SInt16) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (SInt16) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (SInt16) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (SInt16) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(SInt16) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((SInt16) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(SInt16) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((SInt16) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((SInt16) 1) << (sizeof(SInt16) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (SInt16) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to SInt16");
      return (SInt16) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to SInt16");
      return (SInt16) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_UInt16(UInt16 value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const UInt16 neg_one = (UInt16) -1, const_zero = (UInt16) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(UInt16) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt16) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(UInt16) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(UInt16) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(UInt16) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(UInt16),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(UInt16));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_MIDITransformControlType(MIDITransformControlType value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const MIDITransformControlType neg_one = (MIDITransformControlType) -1, const_zero = (MIDITransformControlType) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(MIDITransformControlType) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDITransformControlType) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(MIDITransformControlType) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(MIDITransformControlType) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(MIDITransformControlType) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(MIDITransformControlType),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(MIDITransformControlType));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CAClockTimeFormat(CAClockTimeFormat value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const CAClockTimeFormat neg_one = (CAClockTimeFormat) -1, const_zero = (CAClockTimeFormat) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(CAClockTimeFormat) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(CAClockTimeFormat) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(CAClockTimeFormat) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(CAClockTimeFormat) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(CAClockTimeFormat) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(CAClockTimeFormat),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CAClockTimeFormat));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SMPTETimeType(SMPTETimeType value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SMPTETimeType neg_one = (SMPTETimeType) -1, const_zero = (SMPTETimeType) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(SMPTETimeType) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SMPTETimeType) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(SMPTETimeType) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(SMPTETimeType) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SMPTETimeType) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(SMPTETimeType),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SMPTETimeType));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_SMPTETimeFlags(SMPTETimeFlags value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const SMPTETimeFlags neg_one = (SMPTETimeFlags) -1, const_zero = (SMPTETimeFlags) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(SMPTETimeFlags) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SMPTETimeFlags) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(SMPTETimeFlags) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(SMPTETimeFlags) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(SMPTETimeFlags) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(SMPTETimeFlags),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(SMPTETimeFlags));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* UpdateUnpickledDict */
  static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
      PyObject *state_dict = __Pyx_PySequence_ITEM(state, index);
      if (unlikely(!state_dict)) {
          return -1;
      }
      int non_empty = PyObject_IsTrue(state_dict);
      if (non_empty == 0) {
          Py_DECREF(state_dict);
          return 0;
      } else if (unlikely(non_empty == -1)) {
          return -1;
      }
      PyObject *dict;
      #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
      dict = PyObject_GetAttrString(obj, "__dict__");
      #else
      dict = PyObject_GenericGetDict(obj, NULL);
      #endif
      if (unlikely(!dict)) {
          Py_DECREF(state_dict);
          return -1;
      }
      int result;
      if (likely(PyDict_CheckExact(dict))) {
          result = PyDict_Update(dict, state_dict);
      } else {
          PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict);
          if (likely(obj_result)) {
              Py_DECREF(obj_result);
              result = 0;
          } else {
              result = -1;
          }
      }
      Py_DECREF(state_dict);
      Py_DECREF(dict);
      return result;
  }
  static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
      Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely(state_size == -1)) return -1;
      #endif
      if (state_size <= index) {
          return 0;
      }
      return __Pyx__UpdateUnpickledDict(obj, state, index);
  }
  
/* CheckUnpickleChecksum */
  static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
      PyObject *pickle_module = PyImport_ImportModule("pickle");
      if (unlikely(!pickle_module)) return;
      PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError");
      Py_DECREF(pickle_module);
      if (unlikely(!pickle_error)) return;
      if (checksum2 == checksum1) {
          PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))",
              checksum, checksum1, members);
      } else if (checksum3 == checksum2) {
          PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))",
              checksum, checksum1, checksum2, members);
      } else {
          PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
              checksum, checksum1, checksum2, checksum3, members);
      }
      Py_DECREF(pickle_error);
  }
  static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
      int found = 0;
      found |= checksum1 == checksum;
      found |= checksum2 == checksum;
      found |= checksum3 == checksum;
      if (likely(found))
          return 0;
      __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
      return -1;
  }
  
/* CIntFromPy */
  static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const char neg_one = (char) -1, const_zero = (char) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          char val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (char) -1;
          val = __Pyx_PyLong_As_char(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
                              return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
                              return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
                              return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          if (unlikely(Py_SIZE(x) < 0)) {
              goto raise_neg_overflow;
          }
  #else
          {
              int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
              if (unlikely(result < 0))
                  return (char) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(char) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                              return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                              return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
                              return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(char) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
          } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          char val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (char) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (char) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (char) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (char) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((char) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((char) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (char) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to char");
      return (char) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to char");
      return (char) -1;
  }
  
/* FormatTypeName */
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  static __Pyx_TypeName
  __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
  {
      PyObject *module = NULL, *name = NULL, *result = NULL;
      #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
      name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                                 __pyx_mstate_global->__pyx_n_u_qualname);
      #else
      name = PyType_GetQualName(tp);
      #endif
      if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
      module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                                 __pyx_mstate_global->__pyx_n_u_module);
      if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
      if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
          result = name;
          name = NULL;
          goto done;
      }
      result = PyUnicode_FromFormat("%U.%U", module, name);
      if (unlikely(result == NULL)) goto bad;
    done:
      Py_XDECREF(name);
      Py_XDECREF(module);
      return result;
    bad:
      PyErr_Clear();
      if (name) {
          result = name;
          name = NULL;
      } else {
          result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__9);
      }
      goto done;
  }
  #endif
  
/* GetRuntimeVersion */
  #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  void __Pyx_init_runtime_version(void) {
      if (__Pyx_cached_runtime_version == 0) {
          const char* rt_version = Py_GetVersion();
          unsigned long version = 0;
          unsigned long factor = 0x01000000UL;
          unsigned int digit = 0;
          int i = 0;
          while (factor) {
              while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                  digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                  ++i;
              }
              version += factor * digit;
              if (rt_version[i] != '.')
                  break;
              digit = 0;
              factor >>= 8;
              ++i;
          }
          __Pyx_cached_runtime_version = version;
      }
  }
  #endif
  static unsigned long __Pyx_get_runtime_version(void) {
  #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
      return Py_Version & ~0xFFUL;
  #else
      return __Pyx_cached_runtime_version;
  #endif
  }
  
/* CheckBinaryVersion */
  static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
      const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
      if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
          return 0;
      if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
          return 1;
      {
          char message[200];
          PyOS_snprintf(message, sizeof(message),
                        "compile time Python version %d.%d "
                        "of module '%.100s' "
                        "%s "
                        "runtime version %d.%d",
                         (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                         __Pyx_MODULE_NAME,
                         (allow_newer) ? "was newer than" : "does not match",
                         (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
         );
          return PyErr_WarnEx(NULL, message, 1);
      }
  }
  
/* NewCodeObj */
  #if CYTHON_COMPILING_IN_LIMITED_API
      static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
          PyObject *exception_table = NULL;
          PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
          #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
          PyObject *version_info;
          PyObject *py_minor_version = NULL;
          #endif
          long minor_version = 0;
          PyObject *type, *value, *traceback;
          PyErr_Fetch(&type, &value, &traceback);
          #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
          minor_version = 11;
          #else
          if (!(version_info = PySys_GetObject("version_info"))) goto end;
          if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
          minor_version = PyLong_AsLong(py_minor_version);
          Py_DECREF(py_minor_version);
          if (minor_version == -1 && PyErr_Occurred()) goto end;
          #endif
          if (!(types_module = PyImport_ImportModule("types"))) goto end;
          if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
          if (minor_version <= 7) {
              (void)p;
              result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                            c, n, v, fn, name, fline, lnos, fv, cell);
          } else if (minor_version <= 10) {
              result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                            c, n, v, fn, name, fline, lnos, fv, cell);
          } else {
              if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
              result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                            c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
          }
      end:
          Py_XDECREF(code_type);
          Py_XDECREF(exception_table);
          Py_XDECREF(types_module);
          if (type) {
              PyErr_Restore(type, value, traceback);
          }
          return result;
      }
  #elif PY_VERSION_HEX >= 0x030B0000
    static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                           PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                           PyObject *fv, PyObject *cell, PyObject* fn,
                                           PyObject *name, int fline, PyObject *lnos) {
      PyCodeObject *result;
      result =
        #if PY_VERSION_HEX >= 0x030C0000
          PyUnstable_Code_NewWithPosOnlyArgs
        #else
          PyCode_NewWithPosOnlyArgs
        #endif
          (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
      #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
      if (likely(result))
          result->_co_firsttraceable = 0;
      #endif
      return result;
    }
  #elif !CYTHON_COMPILING_IN_PYPY
    #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
            PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #else
    #define __Pyx__PyCode_New(a, p, 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
  static PyObject* __Pyx_PyCode_New(
          const __Pyx_PyCode_New_function_description descr,
          PyObject * const *varnames,
          PyObject *filename,
          PyObject *funcname,
          PyObject *line_table,
          PyObject *tuple_dedup_map
  ) {
      PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
      Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
      PyObject *varnames_tuple = PyTuple_New(var_count);
      if (unlikely(!varnames_tuple)) return NULL;
      for (Py_ssize_t i=0; i < var_count; i++) {
          Py_INCREF(varnames[i]);
          if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
      }
      #if CYTHON_COMPILING_IN_LIMITED_API
      varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
      if (!varnames_tuple_dedup) {
          if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
          varnames_tuple_dedup = varnames_tuple;
      }
      #else
      varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
      if (unlikely(!varnames_tuple_dedup)) goto done;
      #endif
      #if CYTHON_AVOID_BORROWED_REFS
      Py_INCREF(varnames_tuple_dedup);
      #endif
      if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
          Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely(line_table_length == -1)) goto done;
          #endif
          Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
          code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
          if (unlikely(!code_bytes)) goto done;
          char* c_code_bytes = PyBytes_AsString(code_bytes);
          if (unlikely(!c_code_bytes)) goto done;
          memset(c_code_bytes, 0, (size_t) code_len);
      }
      code_obj = (PyObject*) __Pyx__PyCode_New(
          (int) descr.argcount,
          (int) descr.num_posonly_args,
          (int) descr.num_kwonly_args,
          (int) descr.nlocals,
          0,
          (int) descr.flags,
          code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
          __pyx_mstate_global->__pyx_empty_tuple,
          __pyx_mstate_global->__pyx_empty_tuple,
          varnames_tuple_dedup,
          __pyx_mstate_global->__pyx_empty_tuple,
          __pyx_mstate_global->__pyx_empty_tuple,
          filename,
          funcname,
          (int) descr.first_line,
          (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
      );
  done:
      Py_XDECREF(code_bytes);
      #if CYTHON_AVOID_BORROWED_REFS
      Py_XDECREF(varnames_tuple_dedup);
      #endif
      Py_DECREF(varnames_tuple);
      return code_obj;
  }
  
/* DecompressString */
  static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
      PyObject *module, *decompress, *compressed_bytes, *decompressed;
      const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
      PyObject *methodname = PyUnicode_FromString("decompress");
      if (unlikely(!methodname)) return NULL;
      #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
      if (algo == 3) {
          PyObject *fromlist = Py_BuildValue("[O]", methodname);
          if (unlikely(!fromlist)) return NULL;
          module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
          Py_DECREF(fromlist);
      } else
      #endif
          module = PyImport_ImportModule(module_name);
      if (unlikely(!module)) goto import_failed;
      decompress = PyObject_GetAttr(module, methodname);
      if (unlikely(!decompress)) goto import_failed;
      {
          #ifdef __cplusplus
              char *memview_bytes = const_cast<char*>(s);
          #else
              #if defined(__clang__)
                #pragma clang diagnostic push
                #pragma clang diagnostic ignored "-Wcast-qual"
              #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
                #pragma GCC diagnostic push
                #pragma GCC diagnostic ignored "-Wcast-qual"
              #endif
              char *memview_bytes = (char*) s;
              #if defined(__clang__)
                #pragma clang diagnostic pop
              #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
                #pragma GCC diagnostic pop
              #endif
          #endif
          #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
          int memview_flags = 0x100;
          #else
          int memview_flags = PyBUF_READ;
          #endif
          compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
      }
      if (unlikely(!compressed_bytes)) {
          Py_DECREF(decompress);
          goto bad;
      }
      decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
      Py_DECREF(compressed_bytes);
      Py_DECREF(decompress);
      Py_DECREF(module);
      Py_DECREF(methodname);
      return decompressed;
  import_failed:
      PyErr_Format(PyExc_ImportError,
          "Failed to import '%.20s.decompress' - cannot initialise module strings. "
          "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
          module_name, algo);
  bad:
      Py_XDECREF(module);
      Py_DECREF(methodname);
      return NULL;
  }
  
#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
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 CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_TypeError,
                      "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


  /* MultiPhaseInitModuleState */
  #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
    #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
  #else
    #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
  #endif
  #endif
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
  #error "Module state with PEP489 requires atomics. Currently that's one of\
   C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
  #endif
  #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  #define __Pyx_ModuleStateLookup_Lock()
  #define __Pyx_ModuleStateLookup_Unlock()
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
  #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(__cplusplus) && __cplusplus >= 201103L
  #include <mutex>
  static std::mutex __Pyx_ModuleStateLookup_mutex;
  #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
  #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
  #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
  #include <threads.h>
  static mtx_t __Pyx_ModuleStateLookup_mutex;
  static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
  static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
      mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
  }
  #define __Pyx_ModuleStateLookup_Lock()\
    call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
    mtx_lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(HAVE_PTHREAD_H)
  #include <pthread.h>
  static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
  #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(_WIN32)
  #include <Windows.h>  // synchapi.h on its own doesn't work
  static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
  #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  #else
  #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
   Requires C standard >= C11, or C++ standard >= C++11,\
   or pthreads, or the Windows 32 API, or Python >= 3.13."
  #endif
  typedef struct {
      int64_t id;
      PyObject *module;
  } __Pyx_InterpreterIdAndModule;
  typedef struct {
      char interpreter_id_as_index;
      Py_ssize_t count;
      Py_ssize_t allocated;
      __Pyx_InterpreterIdAndModule table[1];
  } __Pyx_ModuleStateLookupData;
  #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
  #endif
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
  #else
  static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
  #endif
  static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
          __Pyx_InterpreterIdAndModule* table,
          Py_ssize_t count,
          int64_t interpreterId) {
      __Pyx_InterpreterIdAndModule* begin = table;
      __Pyx_InterpreterIdAndModule* end = begin + count;
      if (begin->id == interpreterId) {
          return begin;
      }
      while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
          __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
          if (halfway->id == interpreterId) {
              return halfway;
          }
          if (halfway->id < interpreterId) {
              begin = halfway;
          } else {
              end = halfway;
          }
      }
      for (; begin < end; ++begin) {
          if (begin->id >= interpreterId) return begin;
      }
      return begin;
  }
  static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return NULL;
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
      {
          __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
          if (likely(data)) {
              __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
              if (likely(data == new_data)) {
                  goto read_finished;
              }
          }
          __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
          __Pyx_ModuleStateLookup_Lock();
          __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
          data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
          __Pyx_ModuleStateLookup_Unlock();
      }
    read_finished:;
  #else
      __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
  #endif
      __Pyx_InterpreterIdAndModule* found = NULL;
      if (unlikely(!data)) goto end;
      if (data->interpreter_id_as_index) {
          if (interpreter_id < data->count) {
              found = data->table+interpreter_id;
          }
      } else {
          found = __Pyx_State_FindModuleStateLookupTableLowerBound(
              data->table, data->count, interpreter_id);
      }
    end:
      {
          PyObject *result=NULL;
          if (found && found->id == interpreter_id) {
              result = found->module;
          }
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
          __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  #endif
          return result;
      }
  }
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
      while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
  }
  #else
  #define __Pyx_ModuleStateLookup_wait_until_no_readers()
  #endif
  static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
      Py_ssize_t to_allocate = (*old_data)->allocated;
      while (to_allocate <= interpreter_id) {
          if (to_allocate == 0) to_allocate = 1;
          else to_allocate *= 2;
      }
      __Pyx_ModuleStateLookupData *new_data = *old_data;
      if (to_allocate != (*old_data)->allocated) {
           new_data = (__Pyx_ModuleStateLookupData *)realloc(
              *old_data,
              sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
          if (!new_data) {
              PyErr_NoMemory();
              return -1;
          }
          for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
              new_data->table[i].id = i;
              new_data->table[i].module = NULL;
          }
          new_data->allocated = to_allocate;
      }
      new_data->table[interpreter_id].module = module;
      if (new_data->count < interpreter_id+1) {
          new_data->count = interpreter_id+1;
      }
      *old_data = new_data;
      return 0;
  }
  static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
      __Pyx_InterpreterIdAndModule *read = data->table;
      __Pyx_InterpreterIdAndModule *write = data->table;
      __Pyx_InterpreterIdAndModule *end = read + data->count;
      for (; read<end; ++read) {
          if (read->module) {
              write->id = read->id;
              write->module = read->module;
              ++write;
          }
      }
      data->count = write - data->table;
      for (; write<end; ++write) {
          write->id = 0;
          write->module = NULL;
      }
      data->interpreter_id_as_index = 0;
  }
  static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return -1;
      int result = 0;
      __Pyx_ModuleStateLookup_Lock();
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
              __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  #else
      __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
  #endif
      __Pyx_ModuleStateLookupData *new_data = old_data;
      if (!new_data) {
          new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
          if (!new_data) {
              result = -1;
              PyErr_NoMemory();
              goto end;
          }
          new_data->allocated = 1;
          new_data->interpreter_id_as_index = 1;
      }
      __Pyx_ModuleStateLookup_wait_until_no_readers();
      if (new_data->interpreter_id_as_index) {
          if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
              result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
              goto end;
          }
          __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
      }
      {
          Py_ssize_t insert_at = 0;
          {
              __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                  new_data->table, new_data->count, interpreter_id);
              assert(lower_bound);
              insert_at = lower_bound - new_data->table;
              if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                  lower_bound->module = module;
                  goto end;  // already in table, nothing more to do
              }
          }
          if (new_data->count+1 >= new_data->allocated) {
              Py_ssize_t to_allocate = (new_data->count+1)*2;
              new_data =
                  (__Pyx_ModuleStateLookupData*)realloc(
                      new_data,
                      sizeof(__Pyx_ModuleStateLookupData) +
                      (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
              if (!new_data) {
                  result = -1;
                  new_data = old_data;
                  PyErr_NoMemory();
                  goto end;
              }
              new_data->allocated = to_allocate;
          }
          ++new_data->count;
          int64_t last_id = interpreter_id;
          PyObject *last_module = module;
          for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
              int64_t current_id = new_data->table[i].id;
              new_data->table[i].id = last_id;
              last_id = current_id;
              PyObject *current_module = new_data->table[i].module;
              new_data->table[i].module = last_module;
              last_module = current_module;
          }
      }
    end:
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
  #else
      __Pyx_ModuleStateLookup_data = new_data;
  #endif
      __Pyx_ModuleStateLookup_Unlock();
      return result;
  }
  static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return -1;
      __Pyx_ModuleStateLookup_Lock();
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
              __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  #else
      __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
  #endif
      if (data->interpreter_id_as_index) {
          if (interpreter_id < data->count) {
              data->table[interpreter_id].module = NULL;
          }
          goto done;
      }
      {
          __Pyx_ModuleStateLookup_wait_until_no_readers();
          __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
              data->table, data->count, interpreter_id);
          if (!lower_bound) goto done;
          if (lower_bound->id != interpreter_id) goto done;
          __Pyx_InterpreterIdAndModule *end = data->table+data->count;
          for (;lower_bound<end-1; ++lower_bound) {
              lower_bound->id = (lower_bound+1)->id;
              lower_bound->module = (lower_bound+1)->module;
          }
      }
      --data->count;
      if (data->count == 0) {
          free(data);
          data = NULL;
      }
    done:
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
  #else
      __Pyx_ModuleStateLookup_data = data;
  #endif
      __Pyx_ModuleStateLookup_Unlock();
      return 0;
  }
  #endif
  
/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
