/* Generated by Cython 3.1.5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "name": "coremusic.capi",
        "sources": [
            "src/coremusic/capi.pyx",
            "src/coremusic/audio_player.c"
        ]
    },
    "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_1_5"
#define CYTHON_HEX_VERSION 0x030105F0
#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 HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#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 1
  #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
#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
#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_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 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
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 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
#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 && PY_VERSION_HEX >= 0x030800B1)
#endif
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#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 CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME
  #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100
#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)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#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 >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && 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 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))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#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 __PYX_LIMITED_VERSION_HEX < 0x03090000
  #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
  #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 && PY_VERSION_HEX >= 0x03080000
#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
  #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
#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 __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 __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#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>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#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 */

    #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 "audio_player.h"
#include <stdint.h>
#include "CoreMIDI/MIDIServices.h"
#include "CoreMIDI/MIDIMessages.h"
#include "CoreMIDI/MIDISetup.h"
#include "CoreMIDI/MIDIDriver.h"
#include "CoreMIDI/MIDIThruConnection.h"
#include <string.h>
#include <stdlib.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
  static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value);
  #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 */
#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)
    #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)
    #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_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)
    #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
    #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)
    #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
#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

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* CriticalSections.proto */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs
#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs
#define __Pyx_PyCriticalSection_End1(cs)
#define __Pyx_PyCriticalSection_End2(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin
#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin
#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End
#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End
#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

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_9coremusic_4capi_AudioPlayer;
struct __pyx_obj_9coremusic_4capi_CoreAudioObject;
struct __pyx_t_9coremusic_4capi_AudioConverterCallbackData;

/* "coremusic/capi.pyx":657
 * # ============================================================================
 * 
 * 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":1555
 * # ===== AUDIOPLAYER EXTENSION CLASS =====
 * 
 * cdef class AudioPlayer:             # <<<<<<<<<<<<<<
 *     """Python wrapper for the C audio_player implementation"""
 *     cdef ap.AudioOutput audio_output
*/
struct __pyx_obj_9coremusic_4capi_AudioPlayer {
  PyObject_HEAD
  AudioOutput audio_output;
  int initialized;
};


/* "coremusic/capi.pyx":5123
 * # 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;
};



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;
/* #### 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 */
#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 */
#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 */
#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 */
#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 */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

/* TupleAndListFromArray.proto */
#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 */
#include <string.h>

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

/* UnicodeEquals.proto */
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

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

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

/* CallCFunction.proto */
#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)

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCall.proto */
#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 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#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);

/* UnpackUnboundCMethod.proto */
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

/* 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

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

/* 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))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  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

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

/* SetStringIndexingError.proto */
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)\
    (__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);

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

/* 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

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* 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

/* 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

/* GetTopmostException.proto */
#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

/* 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

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

/* PyObjectCall2Args.proto */
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

/* 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

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

/* 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

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

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

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

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

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

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

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

/* COrdinalToPyUnicode.proto */
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 */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* IncludeStdlibH.proto */
#include <stdlib.h>

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

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

/* PyDictVersioning.proto */
#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_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

/* 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

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (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)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (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);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (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);
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);

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

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

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

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

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

/* SetItemOnTypeDict.proto */
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 */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

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

/* ValidateBasesTuple.proto */
#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 */
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 */
static void* __Pyx_GetVtable(PyTypeObject *type);

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

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

/* dict_setdefault.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type);

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

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

/* 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

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

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

/* CythonFunctionShared.proto */
#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_BACKPORT_VECTORCALL ||\
        (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL)
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    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_BACKPORT_VECTORCALL || 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 */
#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 */
#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);

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

/* 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

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

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

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

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

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

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

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

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

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

/* 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_CFIndex(CFIndex value);

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

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

/* 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

/* 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

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

/* 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 void __pyx_f_9coremusic_4capi_15CoreAudioObject__dispose_internal(struct __pyx_obj_9coremusic_4capi_CoreAudioObject *__pyx_v_self); /* proto*/

/* 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.audio_player" */

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

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

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

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

/* Module declarations from "coremusic.capi" */
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*/
/* #### Code section: typeinfo ### */
/* #### 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_AssertionError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_IndexError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "";
static const char __pyx_k_1[] = "\200\001\360\n\000\005\n\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\330\004\t\210\021\210!\340\004\013\2101";
static const char __pyx_k_A[] = "\200\001\360\014\000\005\016\320\r$\240A";
static const char __pyx_k_N[] = "\320\004(\250\010\260\001\340\010\014\210N\230!";
static const char __pyx_k_Q[] = "\320\000)\250\021\330\004\r\210Q";
static const char __pyx_k_a[] = "\200\001\360\022\000\005\016\320\r&\240a\240{\260!";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_q[] = "\320\000\037\230q\330\004\r\320\r!\240\021";
static const char __pyx_k__2[] = ")";
static const char __pyx_k__3[] = "?";
static const char __pyx_k__4[] = "\200\001\360\014\000\005\016\320\r)\250\021";
static const char __pyx_k_aq[] = "\200\001\330\006\026\220a\220q";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_1_2[] = "\200\001\340\004\013\2101";
static const char __pyx_k_1_Q[] = "\320\000;\2701\330\004\r\210Q";
static const char __pyx_k_1_a[] = "\200\001\360\022\000\005\016\320\r+\2501\320,>\270a";
static const char __pyx_k_4t1[] = "\320\004\031\230\021\340\010\013\2104\210t\2201\330\014\020\320\020\"\240!";
static const char __pyx_k_A_1[] = "\320\000A\300\021\330\004\r\320\r1\260\021\260!";
static const char __pyx_k_A_2[] = "\320\000)\250\021\340\004\014\210A";
static const char __pyx_k_A_3[] = "\320\000*\250!\340\004\014\210A";
static const char __pyx_k_A_6[] = "\200\001\360\022\000\005&\320%<\270A\330\004\013\2106\220\021";
static const char __pyx_k_A_A[] = "\200\001\360\024\000\005\006\330\010\024\220A\330\010\021\220\021\330\010\024\220A";
static const char __pyx_k_A_Q[] = "\320\000<\270A\330\004\r\210Q";
static const char __pyx_k_Q_2[] = "\320\000*\250!\330\004\r\210Q";
static const char __pyx_k_Q_3[] = "\320\000@\300\001\330\004\r\210Q";
static const char __pyx_k_Q_4[] = "\200\001\330\004\r\210Q";
static const char __pyx_k_Q_5[] = "\200\001\330\004\n\210+\220Q";
static const char __pyx_k_Q_6[] = "\200\001\340\004\r\210Q";
static const char __pyx_k_Q_7[] = "\200\001\360\022\000\005\016\320\r*\250!\320+=\270Q";
static const char __pyx_k_Q_A[] = "\320\000-\250Q\340\004\014\210A";
static const char __pyx_k_Q_Q[] = "\320\000=\270Q\330\004\r\210Q";
static const char __pyx_k_a_1[] = "\200\001\340\004,\320,>\270a\330\006\"\240!\2401";
static const char __pyx_k_a_Q[] = "\320\000>\270a\330\004\r\210Q";
static const char __pyx_k_bpm[] = "bpm";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_lsb[] = "lsb";
static const char __pyx_k_msb[] = "msb";
static const char __pyx_k_msg[] = "msg";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_q0B[] = "\200\001\360\022\000\005\016\320\r/\250q\3200B\300!";
static const char __pyx_k_q_2[] = "\200\001\360\030\000\005\014\320\013\037\230q\240\001";
static const char __pyx_k_seq[] = "seq";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_url[] = "url";
static const char __pyx_k_4A_Q[] = "\320\0004\260A\330\004\r\210Q";
static const char __pyx_k_5Q_Q[] = "\320\0005\260Q\330\004\r\210Q";
static const char __pyx_k_7q_A[] = "\320\0007\260q\340\004\014\210A";
static const char __pyx_k_A_m1[] = "\200A\340\n\030\230\001\230\021\230$\230m\2501";
static const char __pyx_k_DA_Q[] = "\320\000D\300A\330\004\r\210Q";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_a_1A[] = "\200\001\340\004,\320,>\270a\330\006#\2401\240A";
static const char __pyx_k_a_EQ[] = "\200\001\360\022\000\005\016\320\r.\250a\320/E\300Q";
static const char __pyx_k_asbd[] = "asbd";
static const char __pyx_k_az_5[] = "\200\001\360\030\000\005\016\320\r\036\230a\230z\250\027\260\n\270!\330!+\2505\260\n\270!";
static const char __pyx_k_bool[] = "bool";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_desc[] = "desc";
static const char __pyx_k_dest[] = "dest";
static const char __pyx_k_dict[] = "dict";
static const char __pyx_k_func[] = "__func__";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_loop[] = "loop";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_node[] = "node";
static const char __pyx_k_note[] = "note";
static const char __pyx_k_port[] = "port";
static const char __pyx_k_ref1[] = "ref1";
static const char __pyx_k_ref2[] = "ref2";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_unit[] = "unit";
static const char __pyx_k_word[] = "word";
static const char __pyx_k_A_Q_2[] = "\320\000,\250A\330\004\r\210Q";
static const char __pyx_k_A_Q_3[] = "\320\000\024\220A\340\004\r\210Q";
static const char __pyx_k_A_Qat[] = "\200A\340\010\021\320\021%\240Q\240a\240t\250=\270\001";
static const char __pyx_k_byte1[] = "byte1";
static const char __pyx_k_byte2[] = "byte2";
static const char __pyx_k_byte3[] = "byte3";
static const char __pyx_k_byte4[] = "byte4";
static const char __pyx_k_byte5[] = "byte5";
static const char __pyx_k_byte6[] = "byte6";
static const char __pyx_k_bytes[] = "bytes";
static const char __pyx_k_c_str[] = "c_str";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_data1[] = "data1";
static const char __pyx_k_data2[] = "data2";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_float[] = "float";
static const char __pyx_k_graph[] = "graph";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_param[] = "param";
static const char __pyx_k_pitch[] = "pitch";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_queue[] = "queue";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_scope[] = "scope";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_track[] = "track";
static const char __pyx_k_tuple[] = "tuple";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_AZwj_j[] = "\200\001\360\030\000\005\016\210_\230A\230Z\240w\250j\270\001\330\037)\250\035\260j\300\001";
static const char __pyx_k_WJa_wj[] = "\200\001\360\030\000\005\016\320\r\"\240!\240:\250W\260J\270a\330%/\250w\260j\300\001";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_buffer[] = "buffer";
static const char __pyx_k_client[] = "client";
static const char __pyx_k_device[] = "device";
static const char __pyx_k_driver[] = "driver";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_entity[] = "entity";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frames[] = "frames";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_packet[] = "packet";
static const char __pyx_k_params[] = "params";
static const char __pyx_k_player[] = "player";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_A_Qat_Q[] = "\200A\340\n\025\220Q\220a\220t\230=\250\r\260Q";
static const char __pyx_k_G_Q_gZq[] = "\200\001\360\030\000\005\016\320\r!\240\021\240*\250G\260:\270Q\330$.\250g\260Z\270q";
static const char __pyx_k_address[] = "address";
static const char __pyx_k_cf_name[] = "cf_name";
static const char __pyx_k_cf_path[] = "cf_path";
static const char __pyx_k_channel[] = "channel";
static const char __pyx_k_devices[] = "devices";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_dispose[] = "dispose";
static const char __pyx_k_element[] = "element";
static const char __pyx_k_enabled[] = "enabled";
static const char __pyx_k_is_open[] = "is_open";
static const char __pyx_k_lowNote[] = "lowNote";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_node_id[] = "node_id";
static const char __pyx_k_numMaps[] = "numMaps";
static const char __pyx_k_offline[] = "offline";
static const char __pyx_k_pktlist[] = "pktlist";
static const char __pyx_k_private[] = "private";
static const char __pyx_k_program[] = "program";
static const char __pyx_k_prop_id[] = "prop_id";
static const char __pyx_k_runloop[] = "runloop";
static const char __pyx_k_sources[] = "sources";
static const char __pyx_k_subtype[] = "subtype";
static const char __pyx_k_url_ref[] = "url_ref";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_1JgZq_Zq[] = "\200\001\360\030\000\005\016\210^\2301\230J\240g\250Z\260q\330\036(\250\r\260Z\270q";
static const char __pyx_k_7q_1_r_r[] = "\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";
static const char __pyx_k_A_t3j_m1[] = "\200A\340\010\017\210t\2203\220j\240\001\240\021\240$\240m\2601";
static const char __pyx_k_C1DVVW_1[] = "\200\001\360\032\000\005,\320+C\3001\320DV\320VW\330\004\013\2101";
static const char __pyx_k_add_note[] = "add_note";
static const char __pyx_k_argCount[] = "argCount";
static const char __pyx_k_bank_lsb[] = "bank_lsb";
static const char __pyx_k_bank_msb[] = "bank_msb";
static const char __pyx_k_cf_model[] = "cf_model";
static const char __pyx_k_cf_value[] = "cf_value";
static const char __pyx_k_controls[] = "controls";
static const char __pyx_k_cpu_load[] = "cpu_load";
static const char __pyx_k_data_ptr[] = "data_ptr";
static const char __pyx_k_dev_list[] = "dev_list";
static const char __pyx_k_deviceID[] = "deviceID";
static const char __pyx_k_duration[] = "duration";
static const char __pyx_k_embedded[] = "embedded";
static const char __pyx_k_endpoint[] = "endpoint";
static const char __pyx_k_ext_file[] = "ext_file";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_graph_id[] = "graph_id";
static const char __pyx_k_group_id[] = "group_id";
static const char __pyx_k_highNote[] = "highNote";
static const char __pyx_k_instance[] = "instance";
static const char __pyx_k_max_load[] = "max_load";
static const char __pyx_k_max_size[] = "max_size";
static const char __pyx_k_name_ref[] = "name_ref";
static const char __pyx_k_param_id[] = "param_id";
static const char __pyx_k_previous[] = "previous";
static const char __pyx_k_protocol[] = "protocol";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_queue_id[] = "queue_id";
static const char __pyx_k_reserved[] = "reserved";
static const char __pyx_k_sequence[] = "sequence";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_sound_id[] = "sound_id";
static const char __pyx_k_uniqueID[] = "uniqueID";
static const char __pyx_k_velocity[] = "velocity";
static const char __pyx_k_writable[] = "writable";
static const char __pyx_k_Bb_1A_A_A[] = "\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";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_arg_count[] = "arg_count";
static const char __pyx_k_buffer_id[] = "buffer_id";
static const char __pyx_k_byte_data[] = "byte_data";
static const char __pyx_k_cf_params[] = "cf_params";
static const char __pyx_k_component[] = "component";
static const char __pyx_k_converter[] = "converter";
static const char __pyx_k_data_size[] = "data_size";
static const char __pyx_k_desc_dict[] = "desc_dict";
static const char __pyx_k_dest_node[] = "dest_node";
static const char __pyx_k_device_id[] = "device_id";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_file_path[] = "file_path";
static const char __pyx_k_file_type[] = "file_type";
static const char __pyx_k_format_id[] = "format_id";
static const char __pyx_k_immediate[] = "immediate";
static const char __pyx_k_input_ptr[] = "input_ptr";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_load_file[] = "load_file";
static const char __pyx_k_num_bytes[] = "num_bytes";
static const char __pyx_k_num_dests[] = "num_dests";
static const char __pyx_k_object_id[] = "object_id";
static const char __pyx_k_pitchBend[] = "pitchBend";
static const char __pyx_k_port_name[] = "port_name";
static const char __pyx_k_prop_size[] = "prop_size";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_specifier[] = "specifier";
static const char __pyx_k_stream_id[] = "stream_id";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_transform[] = "transform";
static const char __pyx_k_uint_data[] = "uint_data";
static const char __pyx_k_valueMaps[] = "valueMaps";
static const char __pyx_k_A_wc_l_2_A[] = "\200\001\360\022\000\005!\240\014\250A\250\\\270\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035A\300\021";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_audio_data[] = "audio_data";
static const char __pyx_k_audio_file[] = "audio_file";
static const char __pyx_k_audio_unit[] = "audio_unit";
static const char __pyx_k_bytes_used[] = "bytes_used";
static const char __pyx_k_channelMap[] = "channelMap";
static const char __pyx_k_connection[] = "connection";
static const char __pyx_k_controller[] = "controller";
static const char __pyx_k_dest_index[] = "dest_index";
static const char __pyx_k_dest_input[] = "dest_input";
static const char __pyx_k_device_ids[] = "device_ids";
static const char __pyx_k_dst_format[] = "dst_format";
static const char __pyx_k_flags_mask[] = "flags_mask";
static const char __pyx_k_input_data[] = "input_data";
static const char __pyx_k_is_playing[] = "is_playing";
static const char __pyx_k_is_running[] = "is_running";
static const char __pyx_k_is_updated[] = "is_updated";
static const char __pyx_k_name_bytes[] = "name_bytes";
static const char __pyx_k_noteNumber[] = "noteNumber";
static const char __pyx_k_num_frames[] = "num_frames";
static const char __pyx_k_path_bytes[] = "path_bytes";
static const char __pyx_k_prop_bytes[] = "prop_bytes";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_scale_rate[] = "scale_rate";
static const char __pyx_k_src_format[] = "src_format";
static const char __pyx_k_string_ref[] = "string_ref";
static const char __pyx_k_test_error[] = "test_error";
static const char __pyx_k_4A_wc_l_2_I[] = "\200\001\360\022\000\005!\320 4\260A\260\\\300\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035I\310\021";
static const char __pyx_k_7_A_5Yj_zYZ[] = "\200\001\360\032\000\005\016\320\r(\250\001\250\032\2607\270*\300A\330+5\260Y\270j\310\007\310z\320YZ";
static const char __pyx_k_AudioPlayer[] = "AudioPlayer";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_Ql_wc_l_2_B[] = "\200\001\360\022\000\005!\240\r\250Q\250l\270!\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035B\300!";
static const char __pyx_k_U_XRq_HHBfA[] = "\200\001\360\024\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220H\230B\230f\240A";
static const char __pyx_k_WJiWbbc_Cxs[] = "\200\001\360\026\000\005$\240?\260!\260:\270W\300J\310i\320Wb\320bc\330\004\014\210C\210x\220s\230!";
static const char __pyx_k_a_4q_ar_T_1[] = "\320\004&\240a\340\010\013\2104\210q\330\014\022\220,\230a\230r\240\024\240T\250\032\2601";
static const char __pyx_k_actual_size[] = "actual_size";
static const char __pyx_k_buffer_list[] = "buffer_list";
static const char __pyx_k_buffer_size[] = "buffer_size";
static const char __pyx_k_byte_offset[] = "byte_offset";
static const char __pyx_k_cf_owner_id[] = "cf_owner_id";
static const char __pyx_k_channel_map[] = "channel_map";
static const char __pyx_k_connections[] = "connections";
static const char __pyx_k_data_length[] = "data_length";
static const char __pyx_k_description[] = "description";
static const char __pyx_k_dest_format[] = "dest_format";
static const char __pyx_k_destination[] = "destination";
static const char __pyx_k_displayName[] = "displayName";
static const char __pyx_k_driverOwner[] = "driverOwner";
static const char __pyx_k_endpointRef[] = "endpointRef";
static const char __pyx_k_ext_file_id[] = "ext_file_id";
static const char __pyx_k_instance_id[] = "instance_id";
static const char __pyx_k_keyPressure[] = "keyPressure";
static const char __pyx_k_lowVelocity[] = "lowVelocity";
static const char __pyx_k_model_bytes[] = "model_bytes";
static const char __pyx_k_note_number[] = "note_number";
static const char __pyx_k_num_devices[] = "num_devices";
static const char __pyx_k_num_packets[] = "num_packets";
static const char __pyx_k_num_sources[] = "num_sources";
static const char __pyx_k_params_size[] = "params_size";
static const char __pyx_k_permissions[] = "permissions";
static const char __pyx_k_property_id[] = "property_id";
static const char __pyx_k_sample_rate[] = "sample_rate";
static const char __pyx_k_set_looping[] = "set_looping";
static const char __pyx_k_source_node[] = "source_node";
static const char __pyx_k_track_count[] = "track_count";
static const char __pyx_k_track_index[] = "track_index";
static const char __pyx_k_value_bytes[] = "value_bytes";
static const char __pyx_k_4AQ_wc_l_2_I[] = "\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!\2302\320\035I\310\021";
static const char __pyx_k_Device_index[] = "Device index ";
static const char __pyx_k_Entity_index[] = "Entity index ";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Source_index[] = "Source index ";
static const char __pyx_k_U_XRq_HE_6_A[] = "\200\001\360\026\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220E\230\022\2306\240\031\250\"\250A";
static const char __pyx_k_actual_bytes[] = "actual_bytes";
static const char __pyx_k_au_graph_new[] = "au_graph_new";
static const char __pyx_k_audio_format[] = "audio_format";
static const char __pyx_k_cf_prop_name[] = "cf_prop_name";
static const char __pyx_k_component_id[] = "component_id";
static const char __pyx_k_converter_id[] = "converter_id";
static const char __pyx_k_destinations[] = "destinations";
static const char __pyx_k_device_count[] = "device_count";
static const char __pyx_k_device_index[] = "device_index";
static const char __pyx_k_entity_index[] = "entity_index";
static const char __pyx_k_filterOutMTC[] = "filterOutMTC";
static const char __pyx_k_format_flags[] = "format_flags";
static const char __pyx_k_get_progress[] = "get_progress";
static const char __pyx_k_highVelocity[] = "highVelocity";
static const char __pyx_k_in_device_id[] = "in_device_id";
static const char __pyx_k_input_buffer[] = "input_buffer";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_is_estimated[] = "is_estimated";
static const char __pyx_k_large_buffer[] = "large_buffer";
static const char __pyx_k_manufacturer[] = "manufacturer";
static const char __pyx_k_midi_note_on[] = "midi_note_on";
static const char __pyx_k_num_controls[] = "num_controls";
static const char __pyx_k_num_entities[] = "num_entities";
static const char __pyx_k_packet_count[] = "packet_count";
static const char __pyx_k_pktlist_size[] = "pktlist_size";
static const char __pyx_k_setup_output[] = "setup_output";
static const char __pyx_k_source_index[] = "source_index";
static const char __pyx_k_start_packet[] = "start_packet";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_2_q_wc_l_2_Gq[] = "\200\001\360\022\000\005!\320 2\260!\260<\270q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035G\300q";
static const char __pyx_k_6aq_wc_l_2_K1[] = "\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!\2302\320\035K\3101";
static const char __pyx_k_8_Q_wc_l_2_MQ[] = "\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!\2302\320\035M\310Q";
static const char __pyx_k_U_XRq_6_Cr_HE[] = "\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";
static const char __pyx_k_U_XRq_HKr_vRq[] = "\200\001\360\026\000\005\016\210U\220#\220X\230R\230q\330\004\014\210H\220K\230r\240\026\240v\250R\250q";
static const char __pyx_k_a_1A_wc_l_2_6[] = "\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!\2302\320\035@\300\001\340\004\013\2106\220\021";
static const char __pyx_k_au_graph_open[] = "au_graph_open";
static const char __pyx_k_au_graph_stop[] = "au_graph_stop";
static const char __pyx_k_audio_file_id[] = "audio_file_id";
static const char __pyx_k_audio_unit_id[] = "audio_unit_id";
static const char __pyx_k_bank_is_valid[] = "bank_is_valid";
static const char __pyx_k_callback_data[] = "callback_data";
static const char __pyx_k_instrument_id[] = "instrument_id";
static const char __pyx_k_midi2_note_on[] = "midi2_note_on";
static const char __pyx_k_midi_note_off[] = "midi_note_off";
static const char __pyx_k_output_buffer[] = "output_buffer";
static const char __pyx_k_packet_offset[] = "packet_offset";
static const char __pyx_k_programChange[] = "programChange";
static const char __pyx_k_property_name[] = "property_name";
static const char __pyx_k_q_A_wc_l_2_DA[] = "\200\001\360\022\000\005!\240\017\250q\260\014\270A\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035D\300A";
static const char __pyx_k_q_wc_l_2_DA_6[] = "\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!\2302\320\035D\300A\330\004\013\2106\220\021";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_sequence_type[] = "sequence_type";
static const char __pyx_k_set_object_id[] = "_set_object_id";
static const char __pyx_k_source_format[] = "source_format";
static const char __pyx_k_source_output[] = "source_output";
static const char __pyx_k_status_result[] = "status_result";
static const char __pyx_k_1_4AQ_wc_l_2_I[] = "\200\001\340\004'\320';\2701\330\004 \320 4\260A\260Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035I\310\021";
static const char __pyx_k_7q_wc_l_2_LA_1[] = "\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!\2302\320\035L\310A\340\004\013\2101";
static const char __pyx_k_A_1_wc_l_2_PPQ[] = "\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!\2302\320\035P\320PQ";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_U_XRq_HE_6_A_2[] = "\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";
static const char __pyx_k_aq_wc_l_2_Oq_6[] = "\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!\2302\320\035O\310q\340\004\013\2106\220\021";
static const char __pyx_k_attribute_data[] = "attribute_data";
static const char __pyx_k_attribute_type[] = "attribute_type";
static const char __pyx_k_au_graph_close[] = "au_graph_close";
static const char __pyx_k_au_graph_start[] = "au_graph_start";
static const char __pyx_k_coremusic_capi[] = "coremusic.capi";
static const char __pyx_k_file_type_hint[] = "file_type_hint";
static const char __pyx_k_filterOutSysEx[] = "filterOutSysEx";
static const char __pyx_k_frames_to_read[] = "frames_to_read";
static const char __pyx_k_is_initialized[] = "is_initialized";
static const char __pyx_k_midi1_up_sysex[] = "midi1_up_sysex";
static const char __pyx_k_midi2_note_off[] = "midi2_note_off";
static const char __pyx_k_midi_send_data[] = "midi_send_data";
static const char __pyx_k_note_transform[] = "note_transform";
static const char __pyx_k_out_of_range_0[] = " out of range (0-";
static const char __pyx_k_owner_id_bytes[] = "owner_id_bytes";
static const char __pyx_k_reset_playback[] = "reset_playback";
static const char __pyx_k_1_1_wc_l_2_Fa_6[] = "\200\001\360\024\000\005!\320 1\260\021\260!\2601\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035F\300a\330\004\013\2106\220\021";
static const char __pyx_k_4A5I_wc_l_2_I_1[] = "\200\001\360\030\000\005!\320 4\260A\3205I\310\021\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035I\310\021\330\004\013\2101";
static const char __pyx_k_5Q6H_wc_l_2_J_1[] = "\200\001\360\030\000\005!\320 5\260Q\3206H\310\001\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035J\310!\330\004\013\2101";
static const char __pyx_k_8_j_wc_l_2_MQ_1[] = "\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!\2302\320\035M\310Q\340\004\013\2101";
static const char __pyx_k_9_2_wc_l_2_Na_1[] = "\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!\2302\320\035N\310a\330\004\013\2101";
static const char __pyx_k_CoreAudioObject[] = "CoreAudioObject";
static const char __pyx_k_UUV_wc_l_2_Oq_1[] = "\200\001\360\030\000\005!\320 :\270!\320;U\320UV\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035O\310q\340\004\013\2101";
static const char __pyx_k_au_graph_update[] = "au_graph_update";
static const char __pyx_k_bytes_per_frame[] = "bytes_per_frame";
static const char __pyx_k_cf_manufacturer[] = "cf_manufacturer";
static const char __pyx_k_channelPressure[] = "channelPressure";
static const char __pyx_k_fourchar_to_int[] = "fourchar_to_int";
static const char __pyx_k_input_data_size[] = "input_data_size";
static const char __pyx_k_int_to_fourchar[] = "int_to_fourchar";
static const char __pyx_k_max_packet_size[] = "max_packet_size";
static const char __pyx_k_midi_get_device[] = "midi_get_device";
static const char __pyx_k_midi_get_source[] = "midi_get_source";
static const char __pyx_k_midi_pitch_bend[] = "midi_pitch_bend";
static const char __pyx_k_num_connections[] = "num_connections";
static const char __pyx_k_out_of_bounds_0[] = " out of bounds (0-";
static const char __pyx_k_port_name_bytes[] = "port_name_bytes";
static const char __pyx_k_receiveChannels[] = "receiveChannels";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_specifier_value[] = "specifier_value";
static const char __pyx_k_system_sound_id[] = "system_sound_id";
static const char __pyx_k_0_1A_wc_l_2_EQ_1[] = "\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!\2302\320\035E\300Q\330\004\013\2101";
static const char __pyx_k_1_2B_wc_l_2_Fa_1[] = "\200\001\360\030\000\005!\320 1\260\021\3202B\300!\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035F\300a\330\004\013\2101";
static const char __pyx_k_1_4AQ_wc_l_2_I_1[] = "\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!\2302\320\035I\310\021\340\004\013\2101";
static const char __pyx_k_1_5Qa_wc_l_2_J_1[] = "\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!\2302\320\035J\310!\340\004\013\2101";
static const char __pyx_k_1_a_wc_l_2_PPQ_1[] = "\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!\2302\320\035P\320PQ\340\004\013\2101";
static const char __pyx_k_1_j_wc_l_2_Fa_4q[] = "\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!\2302\320\035F\300a\330\004\013\2104\210q\220\001";
static const char __pyx_k_2_z_TU_wc_l_2_Gq[] = "\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!\2302\320\035G\300q";
static const char __pyx_k_314DA_wc_l_2_H_1[] = "\200\001\360\030\000\005!\320 3\2601\3204D\300A\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035H\310\001\330\004\013\2101";
static const char __pyx_k_314Fa_wc_l_2_H_1[] = "\200\001\360\030\000\005!\320 3\2601\3204F\300a\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035H\310\001\340\004\013\2101";
static const char __pyx_k_4A_0_wc_l_2_EQ_1[] = "\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!\2302\320\035E\300Q\340\004\013\2101";
static const char __pyx_k_5Q_q_wc_l_2_DA_1[] = "\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!\2302\320\035D\300A\330\004\013\2101";
static const char __pyx_k_6a7I_wc_l_2_K1_1[] = "\200\001\360\030\000\005!\320 6\260a\3207I\310\021\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035K\3101\340\004\013\2101";
static const char __pyx_k_6a_2_wc_l_2_K1_1[] = "\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!\2302\320\035K\3101\330\004\013\2101";
static const char __pyx_k_6az_RS_Fg_XY_Cxs[] = "\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!";
static const char __pyx_k_AudioPlayer_stop[] = "AudioPlayer.stop";
static const char __pyx_k_Q_5Qa_wc_l_2_J_1[] = "\200\001\340\004'\320'=\270Q\330\004 \320 5\260Q\260a\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035J\310!\330\004\013\2101";
static const char __pyx_k_au_graph_dispose[] = "au_graph_dispose";
static const char __pyx_k_au_graph_is_open[] = "au_graph_is_open";
static const char __pyx_k_audio_file_close[] = "audio_file_close";
static const char __pyx_k_audio_queue_stop[] = "audio_queue_stop";
static const char __pyx_k_bits_per_channel[] = "bits_per_channel";
static const char __pyx_k_bytes_per_packet[] = "bytes_per_packet";
static const char __pyx_k_description_dict[] = "description_dict";
static const char __pyx_k_midi1_up_note_on[] = "midi1_up_note_on";
static const char __pyx_k_midi2_pitch_bend[] = "midi2_pitch_bend";
static const char __pyx_k_new_music_player[] = "new_music_player";
static const char __pyx_k_note_instance_id[] = "note_instance_id";
static const char __pyx_k_output_data_size[] = "output_data_size";
static const char __pyx_k_release_velocity[] = "release_velocity";
static const char __pyx_k_transmitChannels[] = "transmitChannels";
static const char __pyx_k_1_4A_A_wc_l_2_I_6[] = "\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!\2302\320\035I\310\021\340\004\013\2106\220\021";
static const char __pyx_k_1_6aq_wc_l_2_K1_1[] = "\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!\2302\320\035K\3101\340\004\013\2101";
static const char __pyx_k_1_Na_wc_l_2_PPQ_1[] = "\200\001\360\030\000\005!\320 ;\2701\320<N\310a\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035P\320PQ\340\004\013\2101";
static const char __pyx_k_2_3EQ_wc_l_2_Gq_1[] = "\200\001\360\030\000\005!\320 2\260!\3203E\300Q\330\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035G\300q\330\004\013\2101";
static const char __pyx_k_6a7MQ_wc_l_2_K1_1[] = "\200\001\360\030\000\005!\320 6\260a\3207M\310Q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035K\3101\340\004\013\2101";
static const char __pyx_k_A_2_z_wc_l_2_Gq_1[] = "\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!\2302\320\035G\300q\330\004\013\2101";
static const char __pyx_k_AudioPlayer_start[] = "AudioPlayer.start";
static const char __pyx_k_Destination_index[] = "Destination index ";
static const char __pyx_k_I_aq_wc_l_2_SST_1[] = "\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!\2302\320\035S\320ST\340\004\013\2101";
static const char __pyx_k_au_graph_add_node[] = "au_graph_add_node";
static const char __pyx_k_audio_object_show[] = "audio_object_show";
static const char __pyx_k_audio_queue_start[] = "audio_queue_start";
static const char __pyx_k_connection_params[] = "connection_params";
static const char __pyx_k_controlTransforms[] = "controlTransforms";
static const char __pyx_k_frames_per_packet[] = "frames_per_packet";
static const char __pyx_k_has_been_disposed[] = " has been disposed";
static const char __pyx_k_midi1_up_note_off[] = "midi1_up_note_off";
static const char __pyx_k_midi_port_dispose[] = "midi_port_dispose";
static const char __pyx_k_music_player_stop[] = "music_player_stop";
static const char __pyx_k_property_selector[] = "property_selector";
static const char __pyx_k_q_A_1_1_wc_l_2_MQ[] = "\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!\2302\320\035M\310Q";
static const char __pyx_k_0_1A_wc_l_2_EQ_1_2[] = "\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!\2302\320\035E\300Q\330\004\013\2101";
static const char __pyx_k_4A_9_1_wc_l_2_Na_6[] = "\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!\2302\320\035N\310a\340\004\013\2106\220\021";
static const char __pyx_k_MZWffg_wc_l_2_Oq_1[] = "\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!\2302\320\035O\310q\330\004\013\2101";
static const char __pyx_k_a_4A_1A_wc_l_2_I_1[] = "\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!\2302\320\035I\310\021\330\004\013\2101";
static const char __pyx_k_a_B_1_wc_l_2_WWX_1[] = "\200\001\340\004,\320,>\270a\330\004 \320 B\300!\3001\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035W\320WX\340\004\013\2101";
static const char __pyx_k_a_QQR_wc_l_2_SST_1[] = "\200\001\360\030\000\005!\320 >\270a\320?Q\320QR\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035S\320ST\340\004\013\2101";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_au_graph_node_info[] = "au_graph_node_info";
static const char __pyx_k_cf_connection_list[] = "cf_connection_list";
static const char __pyx_k_channels_per_frame[] = "channels_per_frame";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_codec_manufacturer[] = "codec_manufacturer";
static const char __pyx_k_data_must_be_bytes[] = "data must be bytes";
static const char __pyx_k_filterOutBeatClock[] = "filterOutBeatClock";
static const char __pyx_k_input_packet_count[] = "input_packet_count";
static const char __pyx_k_manufacturer_bytes[] = "manufacturer_bytes";
static const char __pyx_k_midi_client_create[] = "midi_client_create";
static const char __pyx_k_midi_device_create[] = "midi_device_create";
static const char __pyx_k_midi_source_create[] = "midi_source_create";
static const char __pyx_k_music_device_sysex[] = "music_device_sysex";
static const char __pyx_k_music_player_start[] = "music_player_start";
static const char __pyx_k_new_music_sequence[] = "new_music_sequence";
static const char __pyx_k_output_buffer_list[] = "output_buffer_list";
static const char __pyx_k_output_buffer_size[] = "output_buffer_size";
static const char __pyx_k_q_a_a_wc_l_2_TTU_1[] = "\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!\2302\320\035T\320TU\340\004\013\2101";
static const char __pyx_k_source_format_dict[] = "source_format_dict";
static const char __pyx_k_velocity_transform[] = "velocity_transform";
static const char __pyx_k_0_5Ql_AQ_wc_l_2_J_1[] = "\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!\2302\320\035J\310!\330\004\013\2101";
static const char __pyx_k_2_3EQ_wc_l_2_Gq_1_2[] = "\200\001\360\030\000\005!\320 2\260!\3203E\300Q\340\004\007\200w\210c\220\021\330\010\016\210l\230!\2302\320\035G\300q\340\004\013\2101";
static const char __pyx_k_314DHAQ_wc_l_2_H_81[] = "\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!\2302\320\035H\310\001\330\004\013\2108\2201";
static const char __pyx_k_314DHL___wc_l_2_H_1[] = "\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!\2302\320\035H\310\001\330\004\013\2101";
static const char __pyx_k_5Q6Fhaq_wc_l_2_J_4q[] = "\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!\2302\320\035J\310!\330\004\013\2104\210q\220\001";
static const char __pyx_k_6az_R_FizYccmmn_Cxs[] = "\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!";
static const char __pyx_k_Q_PPZZ_wc_l_2_RRS_1[] = "\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!\2302\320\035R\320RS\330\004\013\2101";
static const char __pyx_k_a_a_Qa_wc_l_2_C1_4q[] = "\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!\2302\320\035C\3001\330\004\013\2104\210q\220\001";
static const char __pyx_k_au_graph_initialize[] = "au_graph_initialize";
static const char __pyx_k_au_graph_is_running[] = "au_graph_is_running";
static const char __pyx_k_audio_converter_new[] = "audio_converter_new";
static const char __pyx_k_audio_file_open_url[] = "audio_file_open_url";
static const char __pyx_k_audio_queue_dispose[] = "audio_queue_dispose";
static const char __pyx_k_ensure_not_disposed[] = "_ensure_not_disposed";
static const char __pyx_k_midi1_up_pitch_bend[] = "midi1_up_pitch_bend";
static const char __pyx_k_midi_client_dispose[] = "midi_client_dispose";
static const char __pyx_k_midi_control_change[] = "midi_control_change";
static const char __pyx_k_midi_device_dispose[] = "midi_device_dispose";
static const char __pyx_k_midi_program_change[] = "midi_program_change";
static const char __pyx_k_offset_sample_frame[] = "offset_sample_frame";
static const char __pyx_k_output_packet_count[] = "output_packet_count";
static const char __pyx_k_persistent_owner_id[] = "persistent_owner_id";
static const char __pyx_k_q_a_Qa_wc_l_2_C1_4q[] = "\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!\2302\320\035C\3001\330\004\013\2104\210q\220\001";
static const char __pyx_k_4A_A_8_1_wc_l_2_MQ_1[] = "\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!\2302\320\035M\310Q\340\004\013\2101";
static const char __pyx_k_5WA_Cq_1_wc_l_2_Fa_1[] = "\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!\2302\320\035F\300a\330\004\013\2101";
static const char __pyx_k_AZwjXYBLIU_ggrrs_Cxs[] = "\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!";
static const char __pyx_k_A_4A_q_q_wc_l_2_DA_1[] = "\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!\2302\320\035D\300A\340\004\013\2101";
static const char __pyx_k_BBZZ_82Q_Rq_IRq_Rq_A[] = "\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";
static const char __pyx_k_a_5Ql_AQ_wc_l_2_J_4q[] = "\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!\2302\320\035J\310!\330\004\013\2104\210q\220\001";
static const char __pyx_k_au_graph_remove_node[] = "au_graph_remove_node";
static const char __pyx_k_dispose_music_player[] = "dispose_music_player";
static const char __pyx_k_filterOutAllControls[] = "filterOutAllControls";
static const char __pyx_k_filterOutTuneRequest[] = "filterOutTuneRequest";
static const char __pyx_k_midi2_control_change[] = "midi2_control_change";
static const char __pyx_k_midi2_program_change[] = "midi2_program_change";
static const char __pyx_k_midi_device_get_name[] = "midi_device_get_name";
static const char __pyx_k_midi_entity_get_name[] = "midi_entity_get_name";
static const char __pyx_k_midi_get_destination[] = "midi_get_destination";
static const char __pyx_k_midi_object_get_name[] = "midi_object_get_name";
static const char __pyx_k_music_player_preroll[] = "music_player_preroll";
static const char __pyx_k_numControlTransforms[] = "numControlTransforms";
static const char __pyx_k_num_source_endpoints[] = "num_source_endpoints";
static const char __pyx_k_q_4A_2_7_wc_l_2_Gq_1[] = "\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!\2302\320\035G\300q\340\004\013\2101";
static const char __pyx_k_q_9T__5_O_Zjjuuv_Cxs[] = "\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!";
static const char __pyx_k_1_NjXYYZ_wc_l_2_PPQ_1[] = "\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!\2302\320\035P\320PQ\330\004\013\2101";
static const char __pyx_k_1_NjXYYZ_wc_l_2_PPQ_6[] = "\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!\2302\320\035P\320PQ\330\004\013\2106\220\021";
static const char __pyx_k_4A_Bb_1_j_K_VWWX_Qk_6[] = "\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\022\320\033,\320,K\310;\320VW\320WX\340\004'\240~\260Q\260k\300\021\330\004\013\2106\220\021";
static const char __pyx_k_6a7I_STTU_wc_l_2_K1_6[] = "\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!\2302\320\035K\3101\330\004\013\2106\220\021";
static const char __pyx_k_7_IU___6_PP_kkvvw_Cxs[] = "\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!";
static const char __pyx_k_7q8H_PQQR_wc_l_2_LA_6[] = "\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!\2302\320\035L\310A\330\004\013\2106\220\021";
static const char __pyx_k_AudioPlayer_load_file[] = "AudioPlayer.load_file";
static const char __pyx_k_I_A_1_1_1_1_S_l_2_J_1[] = "\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!\2302\320\035J\310!\330\004\013\2101";
static const char __pyx_k_au_graph_get_cpu_load[] = "au_graph_get_cpu_load";
static const char __pyx_k_au_graph_get_ind_node[] = "au_graph_get_ind_node";
static const char __pyx_k_au_graph_uninitialize[] = "au_graph_uninitialize";
static const char __pyx_k_audio_converter_reset[] = "audio_converter_reset";
static const char __pyx_k_audio_hardware_unload[] = "audio_hardware_unload";
static const char __pyx_k_audio_unit_initialize[] = "audio_unit_initialize";
static const char __pyx_k_get_midi_protocol_1_0[] = "get_midi_protocol_1_0";
static const char __pyx_k_get_midi_protocol_2_0[] = "get_midi_protocol_2_0";
static const char __pyx_k_midi_endpoint_dispose[] = "midi_endpoint_dispose";
static const char __pyx_k_midi_object_get_model[] = "midi_object_get_model";
static const char __pyx_k_midi_setup_add_device[] = "midi_setup_add_device";
static const char __pyx_k_music_player_get_time[] = "music_player_get_time";
static const char __pyx_k_music_player_set_time[] = "music_player_set_time";
static const char __pyx_k_previous_component_id[] = "previous_component_id";
static const char __pyx_k_s_1_wa_mS___wc_l_2_Oq[] = "\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!\2302\320\035O\310q";
static const char __pyx_k_1_s_1_wa_8_P_wc_l_2_MQ[] = "\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!\2302\320\035M\310Q";
static const char __pyx_k_4A_Bb_1_j_K_VWWX_1Kq_6[] = "\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\022\320\033,\320,K\310;\320VW\320WX\340\004%\240^\2601\260K\270q\330\004\013\2106\220\021";
static const char __pyx_k_7q_JavQa_wc_l_2_LA_F_a[] = "\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!\2302\320\035L\310A\340\004\014\210F\220&\230\006\230a";
static const char __pyx_k_A_5Qat1_7_Q_ar_C1_O1_q[] = "\200A\340\010$\320$5\260Q\260a\260t\2701\330\010\013\2107\220#\220Q\330\014\022\220,\230a\230r\320!C\3001\330\010\014\210O\2301\330\010\017\210q";
static const char __pyx_k_AudioPlayer_is_playing[] = "AudioPlayer.is_playing";
static const char __pyx_k_K1_4A_q_1_1_wc_l_2_I_1[] = "\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!\2302\320\035I\310\021\330\004\013\2101";
static const char __pyx_k_MQ_Bb_1_j_K_VWWX_1_Q_6[] = "\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\022\320\033,\320,K\310;\320VW\320WX\340\004'\320';\2701\330\010\032\230(\240+\250Q\330\004\013\2106\220\021";
static const char __pyx_k_Q_4A_1_wc_l_2_I_q_AV4q[] = "\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!\2302\320\035I\310\021\340\004\005\330\010\027\220q\330\010\021\220\021\330\010\030\230\004\230A\230V\2404\240q";
static const char __pyx_k_Q_NhVWWX_wc_l_2_RRS_81[] = "\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!\2302\320\035R\320RS\330\004\013\2108\2201";
static const char __pyx_k_Q_PPZZeef_wc_l_2_RRS_1[] = "\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!\2302\320\035R\320RS\330\004\013\2101";
static const char __pyx_k_audio_file_stream_open[] = "audio_file_stream_open";
static const char __pyx_k_audio_file_stream_seek[] = "audio_file_stream_seek";
static const char __pyx_k_audio_output_unit_stop[] = "audio_output_unit_stop";
static const char __pyx_k_audio_queue_new_output[] = "audio_queue_new_output";
static const char __pyx_k_dispose_music_sequence[] = "dispose_music_sequence";
static const char __pyx_k_get_midi_property_name[] = "get_midi_property_name";
static const char __pyx_k_get_midi_transform_add[] = "get_midi_transform_add";
static const char __pyx_k_get_music_device_range[] = "get_music_device_range";
static const char __pyx_k_midi1_up_system_common[] = "midi1_up_system_common";
static const char __pyx_k_midi_device_add_entity[] = "midi_device_add_entity";
static const char __pyx_k_midi_device_get_entity[] = "midi_device_get_entity";
static const char __pyx_k_midi_device_new_entity[] = "midi_device_new_entity";
static const char __pyx_k_midi_endpoint_get_name[] = "midi_endpoint_get_name";
static const char __pyx_k_midi_entity_get_source[] = "midi_entity_get_source";
static const char __pyx_k_midi_input_port_create[] = "midi_input_port_create";
static const char __pyx_k_music_device_stop_note[] = "music_device_stop_note";
static const char __pyx_k_src_coremusic_capi_pyx[] = "src/coremusic/capi.pyx";
static const char __pyx_k_7q_2_z_PQQR_wc_l_2_Gq_1[] = "\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!\2302\320\035G\300q\330\004\013\2101";
static const char __pyx_k_A_4t1_1_4AQd_7_Q_ar_B_q[] = "\200A\340\010\013\2104\210t\2201\330\014\023\2201\340\010$\320$4\260A\260Q\260d\270!\330\010\013\2107\220#\220Q\330\014\022\220,\230a\230r\320!B\300!\330\010\017\210q";
static const char __pyx_k_AudioPlayer_set_looping[] = "AudioPlayer.set_looping";
static const char __pyx_k_CoreAudioObject_dispose[] = "CoreAudioObject.dispose";
static const char __pyx_k_D_q_q_a_Q_7_Q_ar_MQ_q_1[] = "\200\001\360$\000\005\035\230D\240\007\240q\250\001\340\004\020\320\020*\250!\330\n\013\330\010\t\330\n\013\360\010\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\230r\320!M\310Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021";
static const char __pyx_k_a_Q_s_1_Q_a_wc_l_2_Oq_1[] = "\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!\2302\320\035O\310q\340\004\013\2101";
static const char __pyx_k_au_graph_get_node_count[] = "au_graph_get_node_count";
static const char __pyx_k_au_graph_is_initialized[] = "au_graph_is_initialized";
static const char __pyx_k_audio_converter_dispose[] = "audio_converter_dispose";
static const char __pyx_k_audio_file_get_property[] = "audio_file_get_property";
static const char __pyx_k_audio_file_read_packets[] = "audio_file_read_packets";
static const char __pyx_k_audio_file_stream_close[] = "audio_file_stream_close";
static const char __pyx_k_audio_output_unit_start[] = "audio_output_unit_start";
static const char __pyx_k_audio_unit_get_property[] = "audio_unit_get_property";
static const char __pyx_k_audio_unit_set_property[] = "audio_unit_set_property";
static const char __pyx_k_audio_unit_uninitialize[] = "audio_unit_uninitialize";
static const char __pyx_k_fourchar_to_int_line_11[] = "fourchar_to_int (line 11)";
static const char __pyx_k_get_midi_property_model[] = "get_midi_property_model";
static const char __pyx_k_get_midi_transform_none[] = "get_midi_transform_none";
static const char __pyx_k_int_to_fourchar_line_21[] = "int_to_fourchar (line 21)";
static const char __pyx_k_m1_7q_A_q_q_wc_l_2_LA_1[] = "\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!\2302\320\035L\310A\340\004\013\2101";
static const char __pyx_k_midi1_up_control_change[] = "midi1_up_control_change";
static const char __pyx_k_midi_destination_create[] = "midi_destination_create";
static const char __pyx_k_midi_output_port_create[] = "midi_output_port_create";
static const char __pyx_k_music_device_midi_event[] = "music_device_midi_event";
static const char __pyx_k_music_device_start_note[] = "music_device_start_note";
static const char __pyx_k_music_player_is_playing[] = "music_player_is_playing";
static const char __pyx_k_output_data_packet_size[] = "output_data_packet_size";
static const char __pyx_k_xq_Rr_D_Rr_D_Rr_Cr_Rr_1[] = "\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";
static const char __pyx_k_9_LJVaannoop_wc_l_2_Na_6[] = "\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!\2302\320\035N\310a\330\004\013\2106\220\021";
static const char __pyx_k_A_Oq_Bb_1_j_K_WXXY_9_Q_6[] = "\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\022\320\033,\320,K\310<\320WX\320XY\340\004%\320%9\270\021\330\010\032\230(\240+\250Q\330\004\013\2106\220\021";
static const char __pyx_k_AudioPlayer_get_progress[] = "AudioPlayer.get_progress";
static const char __pyx_k_AudioPlayer_setup_output[] = "AudioPlayer.setup_output";
static const char __pyx_k_Qk_wc_l_2_RRS_A_4q_A_Q_d[] = "\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!\2302\320\035R\320RS\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!";
static const char __pyx_k_create_midi_note_message[] = "create_midi_note_message";
static const char __pyx_k_extended_audio_file_read[] = "extended_audio_file_read";
static const char __pyx_k_get_audio_file_wave_type[] = "get_audio_file_wave_type";
static const char __pyx_k_get_midi_transform_scale[] = "get_midi_transform_scale";
static const char __pyx_k_get_user_preferred_alert[] = "get_user_preferred_alert";
static const char __pyx_k_midi_device_list_dispose[] = "midi_device_list_dispose";
static const char __pyx_k_midi_port_connect_source[] = "midi_port_connect_source";
static const char __pyx_k_midi_setup_remove_device[] = "midi_setup_remove_device";
static const char __pyx_k_music_sequence_file_load[] = "music_sequence_file_load";
static const char __pyx_k_music_sequence_new_track[] = "music_sequence_new_track";
static const char __pyx_k_t3a_j_q_1_A_wc_l_2_UUV_1[] = "\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!\2302\320\035U\320UV\330\004\013\2101";
static const char __pyx_k_7q_Bc_Cq_j_11NiWXXY_8_A_6[] = "\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\230\022\320\0331\3201N\310i\320WX\320XY\340\004%\320%8\270\001\270\033\300A\330\004\013\2106\220\021";
static const char __pyx_k_D_q_q_a_q_Q_7_Q_ar_MQ_q_1[] = "\200\001\360&\000\005\035\230D\240\007\240q\250\001\340\004\020\320\020*\250!\330\n\013\330\010\t\330\n\013\360\010\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\230r\320!M\310Q\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021";
static const char __pyx_k_Data_must_be_int_or_bytes[] = "Data must be int or bytes";
static const char __pyx_k_Failed_to_allocate_buffer[] = "Failed to allocate buffer";
static const char __pyx_k_Failed_to_load_audio_file[] = "Failed to load audio file: ";
static const char __pyx_k_Q_j_Q_NhVbbc_wc_l_2_RRS_1[] = "\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!\2302\320\035R\320RS\330\004\013\2101";
static const char __pyx_k_au_graph_get_max_cpu_load[] = "au_graph_get_max_cpu_load";
static const char __pyx_k_audio_component_copy_name[] = "audio_component_copy_name";
static const char __pyx_k_audio_component_find_next[] = "audio_component_find_next";
static const char __pyx_k_extended_audio_file_write[] = "extended_audio_file_write";
static const char __pyx_k_get_midi_property_offline[] = "get_midi_property_offline";
static const char __pyx_k_get_midi_property_private[] = "get_midi_property_private";
static const char __pyx_k_get_music_event_type_meta[] = "get_music_event_type_meta";
static const char __pyx_k_get_music_event_type_null[] = "get_music_event_type_null";
static const char __pyx_k_get_music_event_type_user[] = "get_music_event_type_user";
static const char __pyx_k_midi_device_remove_entity[] = "midi_device_remove_entity";
static const char __pyx_k_midi_thru_connection_find[] = "midi_thru_connection_find";
static const char __pyx_k_music_player_get_sequence[] = "music_player_get_sequence";
static const char __pyx_k_music_player_set_sequence[] = "music_player_set_sequence";
static const char __pyx_k_num_destination_endpoints[] = "num_destination_endpoints";
static const char __pyx_k_A_4t1_aq_5Qat1_7_Q_ar_C1_q[] = "\200A\340\010\013\2104\210t\2201\330\014\022\220,\230a\230q\340\010$\320$5\260Q\260a\260t\2701\330\010\013\2107\220#\220Q\330\014\022\220,\230a\230r\320!C\3001\330\010\017\210q";
static const char __pyx_k_AudioPlayer_reset_playback[] = "AudioPlayer.reset_playback";
static const char __pyx_k_au_graph_clear_connections[] = "au_graph_clear_connections";
static const char __pyx_k_audio_hardware_get_devices[] = "audio_hardware_get_devices";
static const char __pyx_k_audio_queue_enqueue_buffer[] = "audio_queue_enqueue_buffer";
static const char __pyx_k_get_audio_unit_scope_input[] = "get_audio_unit_scope_input";
static const char __pyx_k_get_audio_unit_type_output[] = "get_audio_unit_type_output";
static const char __pyx_k_get_midi_control_type_7bit[] = "get_midi_control_type_7bit";
static const char __pyx_k_get_midi_cv_status_note_on[] = "get_midi_cv_status_note_on";
static const char __pyx_k_get_midi_object_type_other[] = "get_midi_object_type_other";
static const char __pyx_k_midi_endpoint_get_ref_cons[] = "midi_endpoint_get_ref_cons";
static const char __pyx_k_midi_endpoint_set_ref_cons[] = "midi_endpoint_set_ref_cons";
static const char __pyx_k_midi_get_driver_io_runloop[] = "midi_get_driver_io_runloop";
static const char __pyx_k_midi_get_number_of_devices[] = "midi_get_number_of_devices";
static const char __pyx_k_midi_get_number_of_sources[] = "midi_get_number_of_sources";
static const char __pyx_k_2_is_QR_7q8H_PQ_wc_l_2_LA_1[] = "\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!\2302\320\035L\310A\330\004\013\2101";
static const char __pyx_k_AudioPlayer___reduce_cython[] = "AudioPlayer.__reduce_cython__";
static const char __pyx_k_Failed_to_stop_audio_output[] = "Failed to stop audio output: ";
static const char __pyx_k_MIDISend_failed_with_status[] = "MIDISend failed with status: ";
static const char __pyx_k_au_graph_connect_node_input[] = "au_graph_connect_node_input";
static const char __pyx_k_audio_queue_allocate_buffer[] = "audio_queue_allocate_buffer";
static const char __pyx_k_audio_services_get_property[] = "audio_services_get_property";
static const char __pyx_k_audio_services_set_property[] = "audio_services_set_property";
static const char __pyx_k_create_midi_channel_message[] = "create_midi_channel_message";
static const char __pyx_k_extended_audio_file_dispose[] = "extended_audio_file_dispose";
static const char __pyx_k_get_audio_format_linear_pcm[] = "get_audio_format_linear_pcm";
static const char __pyx_k_get_audio_services_no_error[] = "get_audio_services_no_error";
static const char __pyx_k_get_audio_unit_scope_global[] = "get_audio_unit_scope_global";
static const char __pyx_k_get_audio_unit_scope_output[] = "get_audio_unit_scope_output";
static const char __pyx_k_get_midi_control_type_14bit[] = "get_midi_control_type_14bit";
static const char __pyx_k_get_midi_cv_status_note_off[] = "get_midi_cv_status_note_off";
static const char __pyx_k_get_midi_error_invalid_port[] = "get_midi_error_invalid_port";
static const char __pyx_k_get_midi_error_wrong_thread[] = "get_midi_error_wrong_thread";
static const char __pyx_k_get_midi_message_type_sysex[] = "get_midi_message_type_sysex";
static const char __pyx_k_get_midi_object_type_device[] = "get_midi_object_type_device";
static const char __pyx_k_get_midi_object_type_entity[] = "get_midi_object_type_entity";
static const char __pyx_k_get_midi_object_type_source[] = "get_midi_object_type_source";
static const char __pyx_k_get_midi_property_device_id[] = "get_midi_property_device_id";
static const char __pyx_k_get_midi_property_unique_id[] = "get_midi_property_unique_id";
static const char __pyx_k_get_music_note_event_unused[] = "get_music_note_event_unused";
static const char __pyx_k_get_system_sound_id_vibrate[] = "get_system_sound_id_vibrate";
static const char __pyx_k_midi2_channel_voice_message[] = "midi2_channel_voice_message";
static const char __pyx_k_midi_device_list_add_device[] = "midi_device_list_add_device";
static const char __pyx_k_midi_device_list_get_device[] = "midi_device_list_get_device";
static const char __pyx_k_midi_entity_get_destination[] = "midi_entity_get_destination";
static const char __pyx_k_midi_external_device_create[] = "midi_external_device_create";
static const char __pyx_k_midi_get_driver_device_list[] = "midi_get_driver_device_list";
static const char __pyx_k_midi_port_disconnect_source[] = "midi_port_disconnect_source";
static const char __pyx_k_midi_thru_connection_create[] = "midi_thru_connection_create";
static const char __pyx_k_1_q_a_Q_q_H_RUU_gghhi_wc_q_1[] = "\320\0001\260\021\360\006\000\005 \230q\330\004&\240a\360\006\000\005\014\210?\230!\330\004\013\210:\220Q\330\004\013\210<\220q\340\004\017\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";
static const char __pyx_k_2_q_a_Q_q_H_RUU_gghhi_wc_q_1[] = "\320\0002\260!\360\006\000\005 \230q\330\004&\240a\360\006\000\005\014\210?\230!\330\004\013\210:\220Q\330\004\013\210<\220q\340\004\017\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";
static const char __pyx_k_7_HT__6_zQXXbbc6_zQXXbbc_Cxs[] = "\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!";
static const char __pyx_k_Failed_to_setup_audio_output[] = "Failed to setup audio output: ";
static const char __pyx_k_Failed_to_start_audio_output[] = "Failed to start audio output: ";
static const char __pyx_k_Q_PPQ_Bc_Cq_j_11NiWXXY_a_Q_6[] = "\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\230\022\320\0331\3201N\310i\320WX\320XY\340\004%\320%>\270a\330\010\032\230(\240+\250Q\330\004\013\2106\220\021";
static const char __pyx_k_audio_component_instance_new[] = "audio_component_instance_new";
static const char __pyx_k_audio_converter_get_property[] = "audio_converter_get_property";
static const char __pyx_k_audio_converter_set_property[] = "audio_converter_set_property";
static const char __pyx_k_extended_audio_file_open_url[] = "extended_audio_file_open_url";
static const char __pyx_k_get_midi_error_id_not_unique[] = "get_midi_error_id_not_unique";
static const char __pyx_k_get_midi_error_no_connection[] = "get_midi_error_no_connection";
static const char __pyx_k_get_midi_error_not_permitted[] = "get_midi_error_not_permitted";
static const char __pyx_k_get_midi_error_unknown_error[] = "get_midi_error_unknown_error";
static const char __pyx_k_get_midi_message_type_system[] = "get_midi_message_type_system";
static const char __pyx_k_get_midi_transform_map_value[] = "get_midi_transform_map_value";
static const char __pyx_k_get_midi_transform_max_value[] = "get_midi_transform_max_value";
static const char __pyx_k_get_midi_transform_min_value[] = "get_midi_transform_min_value";
static const char __pyx_k_midi_object_get_manufacturer[] = "midi_object_get_manufacturer";
static const char __pyx_k_midi_thru_connection_dispose[] = "midi_thru_connection_dispose";
static const char __pyx_k_music_sequence_dispose_track[] = "music_sequence_dispose_track";
static const char __pyx_k_music_sequence_get_ind_track[] = "music_sequence_get_ind_track";
static const char __pyx_k_1_z_A_A_a_6a_4Cq_j_wc_l_2_J_1[] = "\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!\2302\320\035J\310!\340\004\013\2101";
static const char __pyx_k_AudioPlayer___setstate_cython[] = "AudioPlayer.__setstate_cython__";
static const char __pyx_k_BPM_must_be_greater_than_zero[] = "BPM must be greater than zero";
static const char __pyx_k_Could_not_create_URL_for_file[] = "Could not create URL for file: ";
static const char __pyx_k_Failed_to_get_device_at_index[] = "Failed to get device at index ";
static const char __pyx_k_Hardware_audio_output_control[] = "   Hardware audio output control";
static const char __pyx_k_IWAQ_8_1A_t1_j_A_wc_l_2_VVW_6[] = "\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!\2302\320\035V\320VW\340\004\013\2106\220\021";
static const char __pyx_k_NewAUGraph_failed_with_status[] = "NewAUGraph failed with status: ";
static const char __pyx_k_a_31_t1_k_hiq_7_Q_ar_Na_vQ_AQ[] = "\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\230r\320!N\310a\330\010\017\210v\220Q\340\n\024\220A\220Q";
static const char __pyx_k_audio_file_stream_parse_bytes[] = "audio_file_stream_parse_bytes";
static const char __pyx_k_get_midi_cv_status_pitch_bend[] = "get_midi_cv_status_pitch_bend";
static const char __pyx_k_get_midi_error_invalid_client[] = "get_midi_error_invalid_client";
static const char __pyx_k_get_midi_message_type_data128[] = "get_midi_message_type_data128";
static const char __pyx_k_get_midi_message_type_utility[] = "get_midi_message_type_utility";
static const char __pyx_k_get_midi_transform_filter_out[] = "get_midi_transform_filter_out";
static const char __pyx_k_get_music_device_sysex_select[] = "get_music_device_sysex_select";
static const char __pyx_k_get_music_sequence_type_beats[] = "get_music_sequence_type_beats";
static const char __pyx_k_midi_driver_enable_monitoring[] = "midi_driver_enable_monitoring";
static const char __pyx_k_midi_message_type_for_up_word[] = "midi_message_type_for_up_word";
static const char __pyx_k_0_a_S_a_Qha_D_A_1_Q6Fa_ay_d_AQ[] = "\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";
static const char __pyx_k_1_5Qa_wc_l_2_QQR_q_A_1_U_1JF_a[] = "\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!\2302\320\035Q\320QR\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";
static const char __pyx_k_1_6aq_wc_l_2_QQR_q_A_1_U_1JF_a[] = "\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!\2302\320\035Q\320QR\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";
static const char __pyx_k_1_J_q_q_Q_S_q_c_wc_l_2_RRS_vQa[] = "\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!\2302\320\035R\320RS\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\230r\320!R\320RS\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";
static const char __pyx_k_1_d_a_t1Kq_1Cq_U_6_QgQd_2__q_a[] = "\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\230r\320!U\320UV\340\010\017\210q\360\006\000\t\014\2101\330\016\030\230\001\230\021";
static const char __pyx_k_1_q_q_A_A_a_wc_l_2_Na_vQa_t1_k[] = "\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!\2302\320\035N\310a\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\230r\320!N\310a\340\010\017\210v\220R\220q\360\006\000\t\r\210A\210Q";
static const char __pyx_k_31_avYgUVVbbc_1F_Mdde_t3a_AQ_j[] = "\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\230\022\320\033?\270q\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!\2302\320\035I\310\021\340\004\013\2106\220\021";
static const char __pyx_k_37_1_B_2_7_Q_ar_PPQ_1_c_1_E_aq[] = "\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\230r\320!P\320PQ\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";
static const char __pyx_k_6a_q_Jk_6QRRS_wc_l_2_EQ_A_4q_A[] = "\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!\2302\320\035E\300Q\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";
static const char __pyx_k_7q_J_z_Kq_A_1F_A_Cq_iq_9_S_q_c[] = "\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!\2302\320\035N\310a\340\004\013\2101";
static const char __pyx_k_AQ_Kq_AQ_T_1_k_QnA_a_QfAQ_wc_l[] = "\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!\2302\320\035D\300A\340\004\013\2101";
static const char __pyx_k_AUGraphOpen_failed_with_status[] = "AUGraphOpen failed with status: ";
static const char __pyx_k_AUGraphStop_failed_with_status[] = "AUGraphStop failed with status: ";
static const char __pyx_k_A_q_Q_q_c1LAYVYY___a_wc_q_S_Cq[] = "\320\000$\240A\360\006\000\005 \230q\360\010\000\005\031\230\001\340\004\013\210?\230!\330\004\013\210:\220Q\330\004\013\210<\220q\360\006\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";
static const char __pyx_k_A_s_6_1_j_Rs_1_t1_k_aq_Q_1_a_s[] = "\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\230r\320!B\300!\330\010\017\210q\360\006\000\t\r\210A\210Q";
static const char __pyx_k_All_components_needed_for_real[] = "   All components needed for real-time audio callbacks:";
static const char __pyx_k_AudioUnit_lifecycle_management[] = "   AudioUnit lifecycle management";
static const char __pyx_k_AudioUnit_property_setting_for[] = "   AudioUnit property setting for render callbacks";
static const char __pyx_k_Callback_structure_definitions[] = "   Callback structure definitions (AURenderCallbackStruct)";
static const char __pyx_k_CoreAudioObject__set_object_id[] = "CoreAudioObject._set_object_id";
static const char __pyx_k_Could_not_allocate_packet_list[] = "Could not allocate packet list";
static const char __pyx_k_D_q_L_q_U_a_2_6a_1_q_A_a_j_7_Q[] = "\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\230r\320!J\310!\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";
static const char __pyx_k_D_q_a_a_t1_k_A_7xy_7_Q_ar_J_vQ[] = "\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\230r\320!J\310!\330\010\017\210v\220Q\340\n\024\220A\220Q";
static const char __pyx_k_Failed_to_allocate_read_buffer[] = "Failed to allocate read buffer";
static const char __pyx_k_Failed_to_create_URL_from_path[] = "Failed to create URL from path: ";
static const char __pyx_k_IWAQ_8_1A_t1_j_1_A_wc_l_2_Fa_6[] = "\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!\2302\320\035F\300a\340\004\013\2106\220\021";
static const char __pyx_k_K1_S_6b_gWA_wfAQ_S_q_k_q_Q_7_Q[] = "\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\230r\320!U\320UV\340\010\021\220\035\230b\240\001\330\010\017\210q\340\010\014\210A\210Q";
static const char __pyx_k_M_C1_a_t1_j_0_e_A_7_Q_ar_VVW_q[] = "\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\230r\320!V\320VW\330\010\017\210q\340\n\024\220A\220Q";
static const char __pyx_k_au_graph_disconnect_node_input[] = "au_graph_disconnect_node_input";
static const char __pyx_k_audio_converter_convert_buffer[] = "audio_converter_convert_buffer";
static const char __pyx_k_audio_file_stream_get_property[] = "audio_file_stream_get_property";
static const char __pyx_k_audio_object_get_property_data[] = "audio_object_get_property_data";
static const char __pyx_k_get_audio_file_read_permission[] = "get_audio_file_read_permission";
static const char __pyx_k_get_audio_object_property_name[] = "get_audio_object_property_name";
static const char __pyx_k_get_midi_control_type_7bit_rpn[] = "get_midi_control_type_7bit_rpn";
static const char __pyx_k_get_midi_property_display_name[] = "get_midi_property_display_name";
static const char __pyx_k_get_midi_property_driver_owner[] = "get_midi_property_driver_owner";
static const char __pyx_k_get_midi_property_manufacturer[] = "get_midi_property_manufacturer";
static const char __pyx_k_get_midi_transform_map_control[] = "get_midi_transform_map_control";
static const char __pyx_k_get_music_event_type_au_preset[] = "get_music_event_type_au_preset";
static const char __pyx_k_get_music_event_type_parameter[] = "get_music_event_type_parameter";
static const char __pyx_k_midi1_up_channel_voice_message[] = "midi1_up_channel_voice_message";
static const char __pyx_k_midi_setup_add_external_device[] = "midi_setup_add_external_device";
static const char __pyx_k_music_sequence_get_tempo_track[] = "music_sequence_get_tempo_track";
static const char __pyx_k_music_sequence_get_track_count[] = "music_sequence_get_track_count";
static const char __pyx_k_q_WA_t1_j_q_e_7_Q_ar_UUV_q_A_1[] = "\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\230r\320!U\320UV\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";
static const char __pyx_k_should_be_four_characters_only[] = "should be four characters only";
static const char __pyx_k_1_6_1_av_D_U_1_vQ_a_6_F_F_P_YfI[] = "\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";
static const char __pyx_k_1_7q_1A_wc_3is_q_A_AZxwa_vWAQ_1[] = "\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\010\000\005\025\220A\340\004\t\320\t\034\230A\230Z\240x\250w\260a\330\010\017\210v\220W\230A\230Q\340\006\020\220\001\220\021\330\004\013\2101";
static const char __pyx_k_1_A_wa_AQ_y_a_y_A_y_9A_2_XQa_wc[] = "\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!\2302\320\035G\300q";
static const char __pyx_k_1_Qa_wc_l_2_QQR_q_A_1_U_1JF_a_W[] = "\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!\2302\320\035Q\320QR\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";
static const char __pyx_k_1_o_a_a_m_A_A_m4q_t1_d_3Gq_t14I[] = "\320\000'\320':\270)\3001\360\036\000\005\017\210o\230]\250$\250a\250\177\270a\330\004\016\210m\230=\250\004\250A\250_\270A\330\004\016\320\016\036\230m\2504\250q\260\001\330\n/\250t\2601\330\004\016\320\016!\240\035\250d\260!\3203G\300q\330\004\016\320\016\"\240-\250t\2601\3204I\310\021\330\004\016\320\016 \240\r\250T\260\021\3202E\300Q\330\004\016\320\016#\240=\260\004\260A\3205K\3101\330\004\016\320\016!\240\035\250d\260!\3203G\300q\330\004\016\210m\2301\360\006\000\005\017\210o\230[\250\004\250A\250_\270A\330\004\016\210m\230;\240d\250!\250?\270!\330\004\016\320\016\036\230k\250\024\250Q\250a\330\n/\250t\2601\330\004\016\320\016!\240\033\250D\260\001\3201E\300Q\330\004\016\320\016\"\240+\250T\260\021\3202G\300q\330\004\016\320\016 \240\013\2504\250q\3200C\3001\330\004\016\320\016#\240;\250d\260!\3203I\310\021\330\004\016\320\016!\240\033\250D\260\001\3201E\300Q\330\004\016\210m\2301\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!\2302\320\035G\300q\340\004\013\2106\220\021";
static const char __pyx_k_5Q_q_Q_Q_q_5Q_wc_l_2_DA_1_1_vQa[] = "\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!\2302\320\035D\300A\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\230r\320!N\310a\340\010\017\210v\220R\220|\2401\360\006\000\t\r\210A\210Q";
static const char __pyx_k_5Q_q_a_9_wc_l_2_Na_vQa_t1_k_A_Q[] = "\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!\2302\320\035N\310a\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\230r\320!N\310a\360\006\000\t\020\210v\220R\220q\360\006\000\t\r\210A\210Q";
static const char __pyx_k_AUGraphClose_failed_with_status[] = "AUGraphClose failed with status: ";
static const char __pyx_k_AUGraphGetNodeCount_failed_with[] = "AUGraphGetNodeCount failed with status: ";
static const char __pyx_k_AUGraphStart_failed_with_status[] = "AUGraphStart failed with status: ";
static const char __pyx_k_AUGraphUninitialize_failed_with[] = "AUGraphUninitialize failed with status: ";
static const char __pyx_k_A_aq_wc_l_2_QQR_1_r_aq_q_vQ_q_A[] = "\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!\2302\320\035Q\320QR\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";
static const char __pyx_k_All_low_level_CoreAudio_APIs_ar[] = "   \342\200\242 All low-level CoreAudio APIs are now available through coremusic";
static const char __pyx_k_AudioComponent_discovery_and_in[] = "   AudioComponent discovery and instantiation";
static const char __pyx_k_AudioConverterFillComplexBuffer[] = "AudioConverterFillComplexBuffer failed with status: ";
static const char __pyx_k_AudioConverterReset_failed_with[] = "AudioConverterReset failed with status: ";
static const char __pyx_k_AudioFileGetPropertyInfo_failed[] = "AudioFileGetPropertyInfo failed with status: ";
static const char __pyx_k_AudioFileStreamOpen_failed_with[] = "AudioFileStreamOpen failed with status: ";
static const char __pyx_k_AudioFileStreamSeek_failed_with[] = "AudioFileStreamSeek failed with status: ";
static const char __pyx_k_AudioOutputUnitStop_failed_with[] = "AudioOutputUnitStop failed with status: ";
static const char __pyx_k_AudioQueueAllocateBuffer_failed[] = "AudioQueueAllocateBuffer failed with status: ";
static const char __pyx_k_AudioQueueNewOutput_failed_with[] = "AudioQueueNewOutput failed with status: ";
static const char __pyx_k_AudioServicesGetProperty_failed[] = "AudioServicesGetProperty failed with status: ";
static const char __pyx_k_AudioServicesSetProperty_failed[] = "AudioServicesSetProperty failed with status: ";
static const char __pyx_k_AudioUnitGetPropertyInfo_failed[] = "AudioUnitGetPropertyInfo failed with status: ";
static const char __pyx_k_AudioUnitInitialize_failed_with[] = "AudioUnitInitialize failed with status: ";
static const char __pyx_k_B_1_A_Bb_vQa_wc_k_Q_9AR_2_9AR_0[] = "\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\230r\320!J\310!\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";
static const char __pyx_k_Callback_functions_can_be_imple[] = "   \342\200\242 Callback functions can be implemented in pure C extensions";
static const char __pyx_k_CoreAudioObject___reduce_cython[] = "CoreAudioObject.__reduce_cython__";
static const char __pyx_k_Could_not_convert_CFString_to_C[] = "Could not convert CFString to C string";
static const char __pyx_k_D_q_L_q_U_a_2_6a_1_q_A_j_7_Q_ar[] = "\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\230r\320!R\320RS\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";
static const char __pyx_k_D_q_a_a_t1_k_AYfF_1_7_Q_ar_J_vQ[] = "\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\230r\320!J\310!\330\010\017\210v\220Q\340\n\024\220A\220Q";
static const char __pyx_k_D_q_a_a_t1_k_hivV1A_7_Q_ar_Oq_v[] = "\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\230r\320!O\310q\330\010\017\210v\220Q\340\n\024\220A\220Q";
static const char __pyx_k_ExtAudioFileDispose_failed_with[] = "ExtAudioFileDispose failed with status: ";
static const char __pyx_k_ExtAudioFileOpenURL_failed_with[] = "ExtAudioFileOpenURL failed with status: ";
static const char __pyx_k_Format_configuration_and_proper[] = "   Format configuration and property setting";
static const char __pyx_k_GqH___vRr_F_Q_j_E_PQQR_Q_j_a_wc[] = "\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\022\320\033,\320,E\300[\320PQ\320QR\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!\2302\320\035?\270q\340\004\013\2101";
static const char __pyx_k_H_q_Qk_a_RS_wc_l_2_SST_z_A_q_vQ[] = "\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!\2302\320\035S\320ST\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\230r\320!S\320ST\340\010\021\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q";
static const char __pyx_k_K1_1_q_vQa_wc_k_1Jm1Kq_7_Q_ar_Q[] = "\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\230r\320!Q\320QR\340\010\021\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q";
static const char __pyx_k_MIDIDeviceAddEntity_failed_with[] = "MIDIDeviceAddEntity failed with status: ";
static const char __pyx_k_MIDIDeviceNewEntity_failed_with[] = "MIDIDeviceNewEntity failed with status: ";
static const char __pyx_k_MIDIEndpointDispose_failed_with[] = "MIDIEndpointDispose failed with status: ";
static const char __pyx_k_MIDIExternalDeviceCreate_failed[] = "MIDIExternalDeviceCreate failed with status: ";
static const char __pyx_k_MIDIInputPortCreate_failed_with[] = "MIDIInputPortCreate failed with status: ";
static const char __pyx_k_MIDIPortDisconnectSource_failed[] = "MIDIPortDisconnectSource failed with status: ";
static const char __pyx_k_MIDIThruConnectionCreate_failed[] = "MIDIThruConnectionCreate failed with status: ";
static const char __pyx_k_M_C1_a_U_q_q_t1_j_t1_AQ_j_q_e_7[] = "\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\230r\320!U\320UV\330\010\017\210q\340\n\024\220A\220Q\330\n\024\220A\220Q";
static const char __pyx_k_M_C1_a_t1_j_0_e_7_Q_ar_VVW_q_AQ[] = "\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\230r\320!V\320VW\330\010\017\210q\340\n\024\220A\220Q";
static const char __pyx_k_MusicDeviceStopNote_failed_with[] = "MusicDeviceStopNote failed with status: ";
static const char __pyx_k_MusicSequenceGetIndTrack_failed[] = "MusicSequenceGetIndTrack failed with status: ";
static const char __pyx_k_MusicTrackNewExtendedTempoEvent[] = "MusicTrackNewExtendedTempoEvent failed with status: ";
static const char __pyx_k_Or_use_higher_level_Python_audi[] = "   \342\200\242 Or use higher-level Python audio libraries with our CoreAudio access";
static const char __pyx_k_QQR_IWAQ_I_1A_t1_j_DA_a_q_q_7_Q[] = "\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\230\022\320\033D\300A\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\230r\320!O\310q\330\010\017\210q\360\006\000\013\025\220A\220Q";
static const char __pyx_k_Q_q_q_q_a_wc_l_2_TTU_vQa_t1_k_a[] = "\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!\2302\320\035T\320TU\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\230r\320!T\320TU\360\006\000\t\014\210<\220u\230A\340\014\023\320\0234\260A\330\014\r\330\020\037\230t\2401\330\020\035\230T\240\021\330\020 \240\004\240A\330\020$\240D\250\001\330\020%\240T\250\021\330\020#\2404\240q\330\020&\240d\250!\330\020$\240D\250\001\330\020\034\230D\240\001\340\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";
static const char __pyx_k_Q_wa_c_2_1_aq_A_22DAQ_33EQa_11C[] = "\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\022\220\036\230\177\320.@\300\001\300\021\330\004\021\220\036\230}\320,>\270a\270q\330\004\021\220\036\320\037/\320/A\300\021\300!\330\004\021\220\036\320\0372\3202D\300A\300Q\330\004\021\220\036\320\0373\3203E\300Q\300a\330\004\021\220\036\320\0371\3201C\3001\300A\330\004\021\220\036\320\0374\3204F\300a\300q\330\004\021\220\036\320\0372\3202D\300A\300Q\330\004\021\220\036\230}\250A\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\230r\320!Y\320YZ\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";
static const char __pyx_k_QfCs_Cq_AT_D_3at1D_4q_q_AT_D_Qd[] = "\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";
static const char __pyx_k_Real_time_audio_buffer_manageme[] = "   Real-time audio buffer management (AudioBufferList)";
static const char __pyx_k_Scale_rate_must_be_greater_than[] = "Scale rate must be greater than zero";
static const char __pyx_k_T_4q_q_d_1_t1_Q_B_l_a_DA_L_A_4q[] = "\200\001\360\014\000\005\013\210/\230\034\240T\250\021\250/\270\021\330\004\n\210-\220|\2404\240q\250\017\260q\330\004\n\320\n\032\230,\240d\250!\2501\330\n/\250t\2601\330\004\n\320\n\035\230\\\250\024\250Q\320.B\300!\330\004\n\320\n\036\230l\250$\250a\320/D\300A\330\004\n\320\n\034\230L\250\004\250A\320-@\300\001\330\004\n\320\n\037\230|\2504\250q\3200F\300a\330\004\n\320\n\035\230\\\250\024\250Q\320.B\300!\330\004\n\210-\220q\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!\2302\320\035I\310\021\340\004\013\2106\220\021";
static const char __pyx_k_The_AudioUnit_infrastructure_is[] = "   \342\200\242 The AudioUnit infrastructure is complete and functional";
static const char __pyx_k_UUV_Fa_avYgUVVbbc_1F_Mdde_t3a_A[] = "\320\000U\320UV\330)F\300a\360\030\000\005%\320$>\270a\270v\300Y\310g\320UV\320Vb\320bc\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\230\022\320\033?\270q\360\006\000\005\013\210/\230\035\240d\250!\250?\270!\330\004\n\210-\220}\240D\250\001\250\037\270\001\330\004\n\320\n\032\230-\240t\2501\250A\330\n/\250t\2601\330\004\n\320\n\035\230]\250$\250a\320/C\3001\330\004\n\320\n\036\230m\2504\250q\3200E\300Q\330\004\n\320\n\034\230M\250\024\250Q\320.A\300\021\330\004\n\320\n\037\230}\250D\260\001\3201G\300q\330\004\n\320\n\035\230]\250$\250a\320/C\3001\330\004\n\210-\220q\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!\2302\320\035O\310q\340\004\013\2106\220\021";
static const char __pyx_k_Zq_9Ja_9Ja_q_EQ_q_1_S_l_2_SST_1[] = "\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!\2302\320\035S\320ST\330\004\013\2101";
static const char __pyx_k_a_31_t1_k_q_hivV1A_7_Q_ar_MQ_vQ[] = "\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\230r\320!M\310Q\330\010\017\210v\220Q\340\n\024\220A\220Q";
static const char __pyx_k_a_A_B_1_d_a_t1Kq_1Cq_U_6_QgQd_2[] = "\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\230r\320!R\320RS\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";
static const char __pyx_k_audio_component_get_description[] = "audio_component_get_description";
static const char __pyx_k_audio_services_play_alert_sound[] = "audio_services_play_alert_sound";
static const char __pyx_k_create_music_device_note_params[] = "create_music_device_note_params";
static const char __pyx_k_e_f_A_A_B_q_A_q_s_1_Q_s_rQTTVVW[] = "\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\230r\320!N\310a\340\010\017\210v\220Q\360\006\000\t\r\210A\210Q";
static const char __pyx_k_extended_audio_file_create_with[] = "extended_audio_file_create_with_url";
static const char __pyx_k_get_au_graph_err_node_not_found[] = "get_au_graph_err_node_not_found";
static const char __pyx_k_get_audio_converter_quality_low[] = "get_audio_converter_quality_low";
static const char __pyx_k_get_audio_converter_quality_max[] = "get_audio_converter_quality_max";
static const char __pyx_k_get_audio_converter_quality_min[] = "get_audio_converter_quality_min";
static const char __pyx_k_get_audio_device_property_model[] = "get_audio_device_property_model_uid";
static const char __pyx_k_get_audio_file_property_maximum[] = "get_audio_file_property_maximum_packet_size";
static const char __pyx_k_get_audio_file_stream_error_bad[] = "get_audio_file_stream_error_bad_property_size";
static const char __pyx_k_get_audio_file_stream_error_not[] = "get_audio_file_stream_error_not_optimized";
static const char __pyx_k_get_audio_file_stream_seek_flag[] = "get_audio_file_stream_seek_flag_offset_is_estimated";
static const char __pyx_k_get_audio_object_property_scope[] = "get_audio_object_property_scope_global";
static const char __pyx_k_get_audio_services_bad_property[] = "get_audio_services_bad_property_size_error";
static const char __pyx_k_get_audio_services_system_sound[] = "get_audio_services_system_sound_unspecified_error";
static const char __pyx_k_get_midi_control_type_14bit_rpn[] = "get_midi_control_type_14bit_rpn";
static const char __pyx_k_get_midi_control_type_7bit_nrpn[] = "get_midi_control_type_7bit_nrpn";
static const char __pyx_k_get_midi_error_message_send_err[] = "get_midi_error_message_send_err";
static const char __pyx_k_get_midi_error_no_current_setup[] = "get_midi_error_no_current_setup";
static const char __pyx_k_get_midi_error_object_not_found[] = "get_midi_error_object_not_found";
static const char __pyx_k_get_midi_error_server_start_err[] = "get_midi_error_server_start_err";
static const char __pyx_k_get_midi_error_setup_format_err[] = "get_midi_error_setup_format_err";
static const char __pyx_k_get_midi_error_unknown_endpoint[] = "get_midi_error_unknown_endpoint";
static const char __pyx_k_get_midi_error_unknown_property[] = "get_midi_error_unknown_property";
static const char __pyx_k_get_music_sequence_file_imelody[] = "get_music_sequence_file_imelody_type";
static const char __pyx_k_get_music_sequence_type_samples[] = "get_music_sequence_type_samples";
static const char __pyx_k_get_music_sequence_type_seconds[] = "get_music_sequence_type_seconds";
static const char __pyx_k_k_1_8_e2Q_2Q_k_A_1_1_q_1_wc_l_2[] = "\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!\2302\320\035P\320PQ\330\004\013\2101";
static const char __pyx_k_midi_get_number_of_destinations[] = "midi_get_number_of_destinations";
static const char __pyx_k_midi_object_get_string_property[] = "midi_object_get_string_property";
static const char __pyx_k_midi_object_set_string_property[] = "midi_object_set_string_property";
static const char __pyx_k_midi_thru_connection_get_params[] = "midi_thru_connection_get_params";
static const char __pyx_k_midi_thru_connection_set_params[] = "midi_thru_connection_set_params";
static const char __pyx_k_music_track_new_midi_note_event[] = "music_track_new_midi_note_event";
static const char __pyx_k_q_Q_q_a_9CwcQRRS_wc_l_2_TTU_z_A[] = "\200\001\360\016\000\005 \230q\360\n\000\005\014\210=\230\001\330\004\013\210:\220Q\330\004\013\210<\220q\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!\2302\320\035T\320TU\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\230r\320!T\320TU\360\006\000\t\022\220\026\220r\230\021\330\010\017\210q\340\010\014\210A\210Q";
static const char __pyx_k_q_Q_q_ay_7_QkYZZ_wc_l_2_PPQ_Q_q[] = "\200\001\360\016\000\005 \230q\360\022\000\005\014\210=\230\001\330\004\013\210:\220Q\330\004\013\210<\220q\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!\2302\320\035P\320PQ\340\004\007\200{\220#\320\025%\240Q\330\010\017\210q\360\006\000\005\n\320\t\034\230A\230\\\250\030\260\027\270\013\3001\330\010\021\220\021\330\010\017\210q\360\006\000\005\020\320\017!\240\021\240!\330\004\021\320\0213\2601\260J\270a\330\004\023\2207\230&\240\001\240\031\250\"\250A\340\004\007\200}\220C\220w\230a\330\010\017\210q\340\004\005\330\010\r\320\r \240\001\240\034\250^\2709\300B\300e\3101\330\014\025\220Q\330\014\023\2201\340\014\023\2201\340\010\014\210A\210Q";
static const char __pyx_k_AUGraphAddNode_failed_with_statu[] = "AUGraphAddNode failed with status: ";
static const char __pyx_k_AUGraphClearConnections_failed_w[] = "AUGraphClearConnections failed with status: ";
static const char __pyx_k_AUGraphConnectNodeInput_failed_w[] = "AUGraphConnectNodeInput failed with status: ";
static const char __pyx_k_AUGraphDisconnectNodeInput_faile[] = "AUGraphDisconnectNodeInput failed with status: ";
static const char __pyx_k_AUGraphGetCPULoad_failed_with_st[] = "AUGraphGetCPULoad failed with status: ";
static const char __pyx_k_AUGraphGetIndNode_failed_with_st[] = "AUGraphGetIndNode failed with status: ";
static const char __pyx_k_AUGraphGetMaxCPULoad_failed_with[] = "AUGraphGetMaxCPULoad failed with status: ";
static const char __pyx_k_AUGraphInitialize_failed_with_st[] = "AUGraphInitialize failed with status: ";
static const char __pyx_k_AUGraphIsInitialized_failed_with[] = "AUGraphIsInitialized failed with status: ";
static const char __pyx_k_AUGraphIsOpen_failed_with_status[] = "AUGraphIsOpen failed with status: ";
static const char __pyx_k_AUGraphIsRunning_failed_with_sta[] = "AUGraphIsRunning failed with status: ";
static const char __pyx_k_AUGraphNodeInfo_failed_with_stat[] = "AUGraphNodeInfo failed with status: ";
static const char __pyx_k_AUGraphRemoveNode_failed_with_st[] = "AUGraphRemoveNode failed with status: ";
static const char __pyx_k_AUGraphUpdate_failed_with_status[] = "AUGraphUpdate failed with status: ";
static const char __pyx_k_A_MQ_Q_q_83a_AR_B_N_9AT_a_AQ_7_Q[] = "\200A\340\010 \240\t\250\027\260\001\260\021\330\010%\320%M\310Q\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\230R\320\037B\300!\340\010$\240N\260!\2609\270A\270T\300\035\310a\330\n\024\220A\220Q\340\010\013\2107\220#\220Q\330\014\022\220,\230a\230r\320!@\300\001\340\010\017\210q";
static const char __pyx_k_AudioComponentGetDescription_fai[] = "AudioComponentGetDescription failed with status: ";
static const char __pyx_k_AudioComponentInstanceDispose_fa[] = "AudioComponentInstanceDispose failed with status: ";
static const char __pyx_k_AudioComponentInstanceNew_failed[] = "AudioComponentInstanceNew failed with status: ";
static const char __pyx_k_AudioConverterConvertBuffer_fail[] = "AudioConverterConvertBuffer failed with status: ";
static const char __pyx_k_AudioConverterDispose_failed_wit[] = "AudioConverterDispose failed with status: ";
static const char __pyx_k_AudioConverterGetPropertyInfo_fa[] = "AudioConverterGetPropertyInfo failed with status: ";
static const char __pyx_k_AudioConverterGetProperty_failed[] = "AudioConverterGetProperty failed with status: ";
static const char __pyx_k_AudioConverterNew_failed_with_st[] = "AudioConverterNew failed with status: ";
static const char __pyx_k_AudioConverterSetProperty_failed[] = "AudioConverterSetProperty failed with status: ";
static const char __pyx_k_AudioFileClose_failed_with_statu[] = "AudioFileClose failed with status: ";
static const char __pyx_k_AudioFileGetProperty_failed_with[] = "AudioFileGetProperty failed with status: ";
static const char __pyx_k_AudioFileOpenURL_failed_with_sta[] = "AudioFileOpenURL failed with status: ";
static const char __pyx_k_AudioFileReadPackets_failed_with[] = "AudioFileReadPackets failed with status: ";
static const char __pyx_k_AudioFileStreamClose_failed_with[] = "AudioFileStreamClose failed with status: ";
static const char __pyx_k_AudioFileStreamGetPropertyInfo_f[] = "AudioFileStreamGetPropertyInfo failed with status: ";
static const char __pyx_k_AudioFileStreamGetProperty_faile[] = "AudioFileStreamGetProperty failed with status: ";
static const char __pyx_k_AudioFileStreamParseBytes_failed[] = "AudioFileStreamParseBytes failed with status: ";
static const char __pyx_k_AudioObjectGetPropertyDataSize_f[] = "AudioObjectGetPropertyDataSize failed with status: ";
static const char __pyx_k_AudioObjectGetPropertyData_faile[] = "AudioObjectGetPropertyData failed with status: ";
static const char __pyx_k_AudioOutputUnitStart_failed_with[] = "AudioOutputUnitStart failed with status: ";
static const char __pyx_k_AudioPlayer_not_initialized_Call[] = "AudioPlayer not initialized. Call setup_output() first.";
static const char __pyx_k_AudioQueueDispose_failed_with_st[] = "AudioQueueDispose failed with status: ";
static const char __pyx_k_AudioQueueEnqueueBuffer_failed_w[] = "AudioQueueEnqueueBuffer failed with status: ";
static const char __pyx_k_AudioQueueStart_failed_with_stat[] = "AudioQueueStart failed with status: ";
static const char __pyx_k_AudioQueueStop_failed_with_statu[] = "AudioQueueStop failed with status: ";
static const char __pyx_k_AudioServicesCreateSystemSoundID[] = "AudioServicesCreateSystemSoundID failed with status: ";
static const char __pyx_k_AudioServicesDisposeSystemSoundI[] = "AudioServicesDisposeSystemSoundID failed with status: ";
static const char __pyx_k_AudioServicesGetPropertyInfo_fai[] = "AudioServicesGetPropertyInfo failed with status: ";
static const char __pyx_k_AudioUnitGetProperty_failed_with[] = "AudioUnitGetProperty failed with status: ";
static const char __pyx_k_AudioUnitSetProperty_failed_with[] = "AudioUnitSetProperty failed with status: ";
static const char __pyx_k_AudioUnitUninitialize_failed_wit[] = "AudioUnitUninitialize failed with status: ";
static const char __pyx_k_AudioUnit_Callback_Infrastructur[] = "AudioUnit Callback Infrastructure Demonstration";
static const char __pyx_k_Convert_fourcc_chars_to_an_int_f[] = "Convert fourcc chars to an int\n\n   >>> fourchar_to_int('TEXT')\n   1413830740\n   ";
static const char __pyx_k_CoreAudioObject___setstate_cytho[] = "CoreAudioObject.__setstate_cython__";
static const char __pyx_k_CoreAudioObject__ensure_not_disp[] = "CoreAudioObject._ensure_not_disposed";
static const char __pyx_k_Could_not_add_packet_to_packet_l[] = "Could not add packet to packet list";
static const char __pyx_k_Could_not_allocate_buffer_for_pa[] = "Could not allocate buffer for packet data";
static const char __pyx_k_Could_not_allocate_buffer_for_pr[] = "Could not allocate buffer for property data";
static const char __pyx_k_Could_not_allocate_buffer_for_st[] = "Could not allocate buffer for string conversion";
static const char __pyx_k_Could_not_allocate_memory_for_no[] = "Could not allocate memory for note parameters";
static const char __pyx_k_Could_not_allocate_memory_for_pr[] = "Could not allocate memory for property data";
static const char __pyx_k_Could_not_create_CFString_from_n[] = "Could not create CFString from name";
static const char __pyx_k_Could_not_create_CFString_from_p[] = "Could not create CFString from port name";
static const char __pyx_k_Could_not_create_CFString_from_v[] = "Could not create CFString from value";
static const char __pyx_k_Could_not_create_URL_from_file_p[] = "Could not create URL from file path";
static const char __pyx_k_Could_not_get_maximum_packet_siz[] = "Could not get maximum packet size: ";
static const char __pyx_k_DisposeAUGraph_failed_with_statu[] = "DisposeAUGraph failed with status: ";
static const char __pyx_k_DisposeMusicPlayer_failed_with_s[] = "DisposeMusicPlayer failed with status: ";
static const char __pyx_k_DisposeMusicSequence_failed_with[] = "DisposeMusicSequence failed with status: ";
static const char __pyx_k_ExtAudioFileCreateWithURL_failed[] = "ExtAudioFileCreateWithURL failed with status: ";
static const char __pyx_k_ExtAudioFileGetProperty_failed_w[] = "ExtAudioFileGetProperty failed with status: ";
static const char __pyx_k_ExtAudioFileRead_failed_with_sta[] = "ExtAudioFileRead failed with status: ";
static const char __pyx_k_ExtAudioFileSetProperty_failed_w[] = "ExtAudioFileSetProperty failed with status: ";
static const char __pyx_k_ExtAudioFileWrite_failed_with_st[] = "ExtAudioFileWrite failed with status: ";
static const char __pyx_k_Failed_to_allocate_AudioBufferLi[] = "Failed to allocate AudioBufferList";
static const char __pyx_k_Failed_to_allocate_output_buffer[] = "Failed to allocate output buffer";
static const char __pyx_k_For_actual_audio_playback_with_r[] = "For actual audio playback with render callbacks:";
static const char __pyx_k_Invalid_connection_parameters_da[] = "Invalid connection parameters data";
static const char __pyx_k_MIDIClientCreate_failed_with_sta[] = "MIDIClientCreate failed with status: ";
static const char __pyx_k_MIDIClientDispose_failed_with_st[] = "MIDIClientDispose failed with status: ";
static const char __pyx_k_MIDIDestinationCreate_failed_wit[] = "MIDIDestinationCreate failed with status: ";
static const char __pyx_k_MIDIDeviceCreate_failed_with_sta[] = "MIDIDeviceCreate failed with status: ";
static const char __pyx_k_MIDIDeviceDispose_failed_with_st[] = "MIDIDeviceDispose failed with status: ";
static const char __pyx_k_MIDIDeviceListAddDevice_failed_w[] = "MIDIDeviceListAddDevice failed with status: ";
static const char __pyx_k_MIDIDeviceListDispose_failed_wit[] = "MIDIDeviceListDispose failed with status: ";
static const char __pyx_k_MIDIDeviceRemoveEntity_failed_wi[] = "MIDIDeviceRemoveEntity failed with status: ";
static const char __pyx_k_MIDIDriverEnableMonitoring_faile[] = "MIDIDriverEnableMonitoring failed with status: ";
static const char __pyx_k_MIDIEndpointGetRefCons_failed_wi[] = "MIDIEndpointGetRefCons failed with status: ";
static const char __pyx_k_MIDIEndpointSetRefCons_failed_wi[] = "MIDIEndpointSetRefCons failed with status: ";
static const char __pyx_k_MIDIEntityAddOrRemoveEndpoints_f[] = "MIDIEntityAddOrRemoveEndpoints failed with status: ";
static const char __pyx_k_MIDIObjectGetIntegerProperty_fai[] = "MIDIObjectGetIntegerProperty failed with status: ";
static const char __pyx_k_MIDIObjectGetStringProperty_fail[] = "MIDIObjectGetStringProperty failed with status: ";
static const char __pyx_k_MIDIObjectSetIntegerProperty_fai[] = "MIDIObjectSetIntegerProperty failed with status: ";
static const char __pyx_k_MIDIObjectSetStringProperty_fail[] = "MIDIObjectSetStringProperty failed with status: ";
static const char __pyx_k_MIDIOutputPortCreate_failed_with[] = "MIDIOutputPortCreate failed with status: ";
static const char __pyx_k_MIDIPortConnectSource_failed_wit[] = "MIDIPortConnectSource failed with status: ";
static const char __pyx_k_MIDIPortDispose_failed_with_stat[] = "MIDIPortDispose failed with status: ";
static const char __pyx_k_MIDISetupAddDevice_failed_with_s[] = "MIDISetupAddDevice failed with status: ";
static const char __pyx_k_MIDISetupAddExternalDevice_faile[] = "MIDISetupAddExternalDevice failed with status: ";
static const char __pyx_k_MIDISetupRemoveDevice_failed_wit[] = "MIDISetupRemoveDevice failed with status: ";
static const char __pyx_k_MIDISetupRemoveExternalDevice_fa[] = "MIDISetupRemoveExternalDevice failed with status: ";
static const char __pyx_k_MIDISourceCreate_failed_with_sta[] = "MIDISourceCreate failed with status: ";
static const char __pyx_k_MIDIThruConnectionDispose_failed[] = "MIDIThruConnectionDispose failed with status: ";
static const char __pyx_k_MIDIThruConnectionFind_failed_wi[] = "MIDIThruConnectionFind failed with status: ";
static const char __pyx_k_MIDIThruConnectionGetParams_fail[] = "MIDIThruConnectionGetParams failed with status: ";
static const char __pyx_k_MIDIThruConnectionSetParams_fail[] = "MIDIThruConnectionSetParams failed with status: ";
static const char __pyx_k_MIDI_data_too_large_max_256_byte[] = "MIDI data too large (max 256 bytes)";
static const char __pyx_k_MusicDeviceMIDIEvent_failed_with[] = "MusicDeviceMIDIEvent failed with status: ";
static const char __pyx_k_MusicDeviceStartNote_failed_with[] = "MusicDeviceStartNote failed with status: ";
static const char __pyx_k_MusicDeviceSysEx_failed_with_sta[] = "MusicDeviceSysEx failed with status: ";
static const char __pyx_k_MusicPlayerGetPlayRateScalar_fai[] = "MusicPlayerGetPlayRateScalar failed with status: ";
static const char __pyx_k_MusicPlayerGetSequence_failed_wi[] = "MusicPlayerGetSequence failed with status: ";
static const char __pyx_k_MusicPlayerGetTime_failed_with_s[] = "MusicPlayerGetTime failed with status: ";
static const char __pyx_k_MusicPlayerIsPlaying_failed_with[] = "MusicPlayerIsPlaying failed with status: ";
static const char __pyx_k_MusicPlayerPreroll_failed_with_s[] = "MusicPlayerPreroll failed with status: ";
static const char __pyx_k_MusicPlayerSetPlayRateScalar_fai[] = "MusicPlayerSetPlayRateScalar failed with status: ";
static const char __pyx_k_MusicPlayerSetSequence_failed_wi[] = "MusicPlayerSetSequence failed with status: ";
static const char __pyx_k_MusicPlayerSetTime_failed_with_s[] = "MusicPlayerSetTime failed with status: ";
static const char __pyx_k_MusicPlayerStart_failed_with_sta[] = "MusicPlayerStart failed with status: ";
static const char __pyx_k_MusicPlayerStop_failed_with_stat[] = "MusicPlayerStop failed with status: ";
static const char __pyx_k_MusicSequenceDisposeTrack_failed[] = "MusicSequenceDisposeTrack failed with status: ";
static const char __pyx_k_MusicSequenceFileLoad_failed_wit[] = "MusicSequenceFileLoad failed with status: ";
static const char __pyx_k_MusicSequenceGetSequenceType_fai[] = "MusicSequenceGetSequenceType failed with status: ";
static const char __pyx_k_MusicSequenceGetTempoTrack_faile[] = "MusicSequenceGetTempoTrack failed with status: ";
static const char __pyx_k_MusicSequenceGetTrackCount_faile[] = "MusicSequenceGetTrackCount failed with status: ";
static const char __pyx_k_MusicSequenceNewTrack_failed_wit[] = "MusicSequenceNewTrack failed with status: ";
static const char __pyx_k_MusicSequenceSetSequenceType_fai[] = "MusicSequenceSetSequenceType failed with status: ";
static const char __pyx_k_MusicTrackNewMIDIChannelEvent_fa[] = "MusicTrackNewMIDIChannelEvent failed with status: ";
static const char __pyx_k_MusicTrackNewMIDINoteEvent_faile[] = "MusicTrackNewMIDINoteEvent failed with status: ";
static const char __pyx_k_NewMusicPlayer_failed_with_statu[] = "NewMusicPlayer failed with status: ";
static const char __pyx_k_NewMusicSequence_failed_with_sta[] = "NewMusicSequence failed with status: ";
static const char __pyx_k_Note_that_Cython_is_deliberately[] = "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.";
static const char __pyx_k_audio_component_instance_dispose[] = "audio_component_instance_dispose";
static const char __pyx_k_audio_converter_fill_complex_buf[] = "audio_converter_fill_complex_buffer";
static const char __pyx_k_audio_hardware_destroy_aggregate[] = "audio_hardware_destroy_aggregate_device";
static const char __pyx_k_audio_hardware_get_default_input[] = "audio_hardware_get_default_input_device";
static const char __pyx_k_audio_hardware_get_default_outpu[] = "audio_hardware_get_default_output_device";
static const char __pyx_k_audio_object_get_property_string[] = "audio_object_get_property_string";
static const char __pyx_k_audio_services_create_system_sou[] = "audio_services_create_system_sound_id";
static const char __pyx_k_audio_services_dispose_system_so[] = "audio_services_dispose_system_sound_id";
static const char __pyx_k_audio_services_play_system_sound[] = "audio_services_play_system_sound";
static const char __pyx_k_convert_int_to_fourcc_4_chars_in[] = "convert int to fourcc 4 chars\n\n    >>> int_to_fourchar(1413830740)\n    'TEXT'\n    ";
static const char __pyx_k_create_music_device_std_note_par[] = "create_music_device_std_note_params";
static const char __pyx_k_demonstrate_callback_infrastruct[] = "demonstrate_callback_infrastructure";
static const char __pyx_k_extended_audio_file_get_property[] = "extended_audio_file_get_property";
static const char __pyx_k_extended_audio_file_set_property[] = "extended_audio_file_set_property";
static const char __pyx_k_get_au_graph_err_cannot_do_in_cu[] = "get_au_graph_err_cannot_do_in_current_context";
static const char __pyx_k_get_au_graph_err_invalid_audio_u[] = "get_au_graph_err_invalid_audio_unit";
static const char __pyx_k_get_au_graph_err_invalid_connect[] = "get_au_graph_err_invalid_connection";
static const char __pyx_k_get_au_graph_err_output_node_err[] = "get_au_graph_err_output_node_err";
static const char __pyx_k_get_audio_component_type_music_d[] = "get_audio_component_type_music_device";
static const char __pyx_k_get_audio_converter_property_cod[] = "get_audio_converter_property_codec_quality";
static const char __pyx_k_get_audio_converter_property_max[] = "get_audio_converter_property_max_input_packet_size";
static const char __pyx_k_get_audio_converter_property_min[] = "get_audio_converter_property_min_input_buffer_size";
static const char __pyx_k_get_audio_converter_property_sam[] = "get_audio_converter_property_sample_rate_converter_quality";
static const char __pyx_k_get_audio_converter_quality_high[] = "get_audio_converter_quality_high";
static const char __pyx_k_get_audio_converter_quality_medi[] = "get_audio_converter_quality_medium";
static const char __pyx_k_get_audio_device_property_availa[] = "get_audio_device_property_available_nominal_sample_rates";
static const char __pyx_k_get_audio_device_property_device[] = "get_audio_device_property_device_uid";
static const char __pyx_k_get_audio_device_property_is_hid[] = "get_audio_device_property_is_hidden";
static const char __pyx_k_get_audio_device_property_nomina[] = "get_audio_device_property_nominal_sample_rate";
static const char __pyx_k_get_audio_device_property_prefer[] = "get_audio_device_property_preferred_channels_for_stereo";
static const char __pyx_k_get_audio_device_property_stream[] = "get_audio_device_property_stream_configuration";
static const char __pyx_k_get_audio_device_property_transp[] = "get_audio_device_property_transport_type";
static const char __pyx_k_get_audio_file_property_audio_da[] = "get_audio_file_property_audio_data_packet_count";
static const char __pyx_k_get_audio_file_property_data_for[] = "get_audio_file_property_data_format";
static const char __pyx_k_get_audio_file_property_estimate[] = "get_audio_file_property_estimated_duration";
static const char __pyx_k_get_audio_file_stream_error_data[] = "get_audio_file_stream_error_data_unavailable";
static const char __pyx_k_get_audio_file_stream_error_disc[] = "get_audio_file_stream_error_discontinuity_cant_recover";
static const char __pyx_k_get_audio_file_stream_error_ille[] = "get_audio_file_stream_error_illegal_operation";
static const char __pyx_k_get_audio_file_stream_error_inva[] = "get_audio_file_stream_error_invalid_packet_offset";
static const char __pyx_k_get_audio_file_stream_error_unsp[] = "get_audio_file_stream_error_unspecified_error";
static const char __pyx_k_get_audio_file_stream_error_unsu[] = "get_audio_file_stream_error_unsupported_file_type";
static const char __pyx_k_get_audio_file_stream_error_valu[] = "get_audio_file_stream_error_value_unknown";
static const char __pyx_k_get_audio_file_stream_parse_flag[] = "get_audio_file_stream_parse_flag_discontinuity";
static const char __pyx_k_get_audio_file_stream_property_a[] = "get_audio_file_stream_property_audio_data_byte_count";
static const char __pyx_k_get_audio_file_stream_property_b[] = "get_audio_file_stream_property_byte_to_packet";
static const char __pyx_k_get_audio_file_stream_property_c[] = "get_audio_file_stream_property_channel_layout";
static const char __pyx_k_get_audio_file_stream_property_d[] = "get_audio_file_stream_property_data_format";
static const char __pyx_k_get_audio_file_stream_property_f[] = "get_audio_file_stream_property_file_format";
static const char __pyx_k_get_audio_file_stream_property_i[] = "get_audio_file_stream_property_info_dictionary";
static const char __pyx_k_get_audio_file_stream_property_m[] = "get_audio_file_stream_property_magic_cookie_data";
static const char __pyx_k_get_audio_file_stream_property_p[] = "get_audio_file_stream_property_packet_to_frame";
static const char __pyx_k_get_audio_file_stream_property_r[] = "get_audio_file_stream_property_ready_to_produce_packets";
static const char __pyx_k_get_audio_object_property_elemen[] = "get_audio_object_property_element_main";
static const char __pyx_k_get_audio_object_property_manufa[] = "get_audio_object_property_manufacturer";
static const char __pyx_k_get_audio_services_bad_specifier[] = "get_audio_services_bad_specifier_size_error";
static const char __pyx_k_get_audio_services_property_comp[] = "get_audio_services_property_complete_playback_if_app_dies";
static const char __pyx_k_get_audio_services_property_is_u[] = "get_audio_services_property_is_ui_sound";
static const char __pyx_k_get_audio_services_unsupported_p[] = "get_audio_services_unsupported_property_error";
static const char __pyx_k_get_audio_unit_manufacturer_appl[] = "get_audio_unit_manufacturer_apple";
static const char __pyx_k_get_audio_unit_property_set_rend[] = "get_audio_unit_property_set_render_callback";
static const char __pyx_k_get_audio_unit_property_stream_f[] = "get_audio_unit_property_stream_format";
static const char __pyx_k_get_audio_unit_subtype_default_o[] = "get_audio_unit_subtype_default_output";
static const char __pyx_k_get_extended_audio_file_property[] = "get_extended_audio_file_property_file_data_format";
static const char __pyx_k_get_linear_pcm_format_flag_is_no[] = "get_linear_pcm_format_flag_is_non_interleaved";
static const char __pyx_k_get_linear_pcm_format_flag_is_pa[] = "get_linear_pcm_format_flag_is_packed";
static const char __pyx_k_get_linear_pcm_format_flag_is_si[] = "get_linear_pcm_format_flag_is_signed_integer";
static const char __pyx_k_get_midi_control_type_14bit_nrpn[] = "get_midi_control_type_14bit_nrpn";
static const char __pyx_k_get_midi_cv_status_channel_press[] = "get_midi_cv_status_channel_pressure";
static const char __pyx_k_get_midi_cv_status_control_chang[] = "get_midi_cv_status_control_change";
static const char __pyx_k_get_midi_cv_status_poly_pressure[] = "get_midi_cv_status_poly_pressure";
static const char __pyx_k_get_midi_cv_status_program_chang[] = "get_midi_cv_status_program_change";
static const char __pyx_k_get_midi_error_wrong_endpoint_ty[] = "get_midi_error_wrong_endpoint_type";
static const char __pyx_k_get_midi_error_wrong_property_ty[] = "get_midi_error_wrong_property_type";
static const char __pyx_k_get_midi_message_type_channel_vo[] = "get_midi_message_type_channel_voice1";
static const char __pyx_k_get_midi_object_type_destination[] = "get_midi_object_type_destination";
static const char __pyx_k_get_midi_object_type_external_de[] = "get_midi_object_type_external_device";
static const char __pyx_k_get_midi_object_type_external_en[] = "get_midi_object_type_external_entity";
static const char __pyx_k_get_midi_object_type_external_so[] = "get_midi_object_type_external_source";
static const char __pyx_k_get_midi_property_receive_channe[] = "get_midi_property_receive_channels";
static const char __pyx_k_get_midi_property_transmit_chann[] = "get_midi_property_transmit_channels";
static const char __pyx_k_get_midi_thru_connection_max_end[] = "get_midi_thru_connection_max_endpoints";
static const char __pyx_k_get_music_device_midi_event_list[] = "get_music_device_midi_event_list_select";
static const char __pyx_k_get_music_device_midi_event_sele[] = "get_music_device_midi_event_select";
static const char __pyx_k_get_music_device_start_note_sele[] = "get_music_device_start_note_select";
static const char __pyx_k_get_music_device_stop_note_selec[] = "get_music_device_stop_note_select";
static const char __pyx_k_get_music_event_type_extended_no[] = "get_music_event_type_extended_note";
static const char __pyx_k_get_music_event_type_extended_te[] = "get_music_event_type_extended_tempo";
static const char __pyx_k_get_music_event_type_midi_channe[] = "get_music_event_type_midi_channel_message";
static const char __pyx_k_get_music_event_type_midi_note_m[] = "get_music_event_type_midi_note_message";
static const char __pyx_k_get_music_event_type_midi_raw_da[] = "get_music_event_type_midi_raw_data";
static const char __pyx_k_get_music_note_event_use_group_i[] = "get_music_note_event_use_group_instrument";
static const char __pyx_k_get_music_sequence_file_any_type[] = "get_music_sequence_file_any_type";
static const char __pyx_k_get_music_sequence_file_midi_typ[] = "get_music_sequence_file_midi_type";
static const char __pyx_k_get_sequence_track_property_auto[] = "get_sequence_track_property_automated_parameters";
static const char __pyx_k_get_sequence_track_property_loop[] = "get_sequence_track_property_loop_info";
static const char __pyx_k_get_sequence_track_property_mute[] = "get_sequence_track_property_mute_status";
static const char __pyx_k_get_sequence_track_property_offs[] = "get_sequence_track_property_offset_time";
static const char __pyx_k_get_sequence_track_property_solo[] = "get_sequence_track_property_solo_status";
static const char __pyx_k_get_sequence_track_property_time[] = "get_sequence_track_property_time_resolution";
static const char __pyx_k_get_sequence_track_property_trac[] = "get_sequence_track_property_track_length";
static const char __pyx_k_get_system_sound_id_flash_screen[] = "get_system_sound_id_flash_screen";
static const char __pyx_k_get_system_sound_id_user_preferr[] = "get_system_sound_id_user_preferred_alert";
static const char __pyx_k_midi_device_get_number_of_entiti[] = "midi_device_get_number_of_entities";
static const char __pyx_k_midi_device_list_get_number_of_d[] = "midi_device_list_get_number_of_devices";
static const char __pyx_k_midi_entity_add_or_remove_endpoi[] = "midi_entity_add_or_remove_endpoints";
static const char __pyx_k_midi_entity_get_number_of_destin[] = "midi_entity_get_number_of_destinations";
static const char __pyx_k_midi_entity_get_number_of_source[] = "midi_entity_get_number_of_sources";
static const char __pyx_k_midi_object_get_integer_property[] = "midi_object_get_integer_property";
static const char __pyx_k_midi_object_set_integer_property[] = "midi_object_set_integer_property";
static const char __pyx_k_midi_setup_remove_external_devic[] = "midi_setup_remove_external_device";
static const char __pyx_k_midi_thru_connection_params_init[] = "midi_thru_connection_params_initialize";
static const char __pyx_k_music_player_get_play_rate_scala[] = "music_player_get_play_rate_scalar";
static const char __pyx_k_music_player_set_play_rate_scala[] = "music_player_set_play_rate_scalar";
static const char __pyx_k_music_sequence_get_sequence_type[] = "music_sequence_get_sequence_type";
static const char __pyx_k_music_sequence_set_sequence_type[] = "music_sequence_set_sequence_type";
static const char __pyx_k_music_track_new_extended_tempo_e[] = "music_track_new_extended_tempo_event";
static const char __pyx_k_music_track_new_midi_channel_eve[] = "music_track_new_midi_channel_event";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_self_audio_output_cannot_be_conv[] = "self.audio_output cannot be converted to a Python object for pickling";
static const char __pyx_k_get_audio_object_property_scope_2[] = "get_audio_object_property_scope_input";
static const char __pyx_k_get_audio_object_property_scope_3[] = "get_audio_object_property_scope_output";
static const char __pyx_k_get_audio_services_system_sound_2[] = "get_audio_services_system_sound_client_timed_out_error";
static const char __pyx_k_get_audio_services_system_sound_3[] = "get_audio_services_system_sound_exceeded_maximum_duration_error";
static const char __pyx_k_Could_not_create_CFString_from_p_2[] = "Could not create CFString from property name";
static const char __pyx_k_Could_not_create_URL_from_file_p_2[] = "Could not create URL from file path: ";
static const char __pyx_k_get_audio_converter_property_max_2[] = "get_audio_converter_property_max_output_packet_size";
static const char __pyx_k_get_audio_converter_property_min_2[] = "get_audio_converter_property_min_output_buffer_size";
static const char __pyx_k_get_audio_device_property_device_2[] = "get_audio_device_property_device_is_alive";
static const char __pyx_k_get_audio_file_stream_error_inva_2[] = "get_audio_file_stream_error_invalid_file";
static const char __pyx_k_get_audio_file_stream_error_unsu_2[] = "get_audio_file_stream_error_unsupported_data_format";
static const char __pyx_k_get_audio_file_stream_error_unsu_3[] = "get_audio_file_stream_error_unsupported_property";
static const char __pyx_k_get_audio_file_stream_property_a_2[] = "get_audio_file_stream_property_audio_data_packet_count";
static const char __pyx_k_get_audio_file_stream_property_a_3[] = "get_audio_file_stream_property_average_bytes_per_packet";
static const char __pyx_k_get_audio_file_stream_property_b_2[] = "get_audio_file_stream_property_bit_rate";
static const char __pyx_k_get_audio_file_stream_property_d_2[] = "get_audio_file_stream_property_data_offset";
static const char __pyx_k_get_audio_file_stream_property_f_2[] = "get_audio_file_stream_property_format_list";
static const char __pyx_k_get_audio_file_stream_property_f_3[] = "get_audio_file_stream_property_frame_to_packet";
static const char __pyx_k_get_audio_file_stream_property_f_4[] = "get_audio_file_stream_property_flag_property_is_cached";
static const char __pyx_k_get_audio_file_stream_property_f_5[] = "get_audio_file_stream_property_flag_cache_property";
static const char __pyx_k_get_audio_file_stream_property_m_2[] = "get_audio_file_stream_property_maximum_packet_size";
static const char __pyx_k_get_audio_file_stream_property_p_2[] = "get_audio_file_stream_property_packet_to_byte";
static const char __pyx_k_get_audio_file_stream_property_p_3[] = "get_audio_file_stream_property_packet_table_info";
static const char __pyx_k_get_audio_file_stream_property_p_4[] = "get_audio_file_stream_property_packet_size_upper_bound";
static const char __pyx_k_get_extended_audio_file_property_2[] = "get_extended_audio_file_property_client_data_format";
static const char __pyx_k_get_extended_audio_file_property_3[] = "get_extended_audio_file_property_file_channel_layout";
static const char __pyx_k_get_extended_audio_file_property_4[] = "get_extended_audio_file_property_client_channel_layout";
static const char __pyx_k_get_extended_audio_file_property_5[] = "get_extended_audio_file_property_codec_manufacturer";
static const char __pyx_k_get_extended_audio_file_property_6[] = "get_extended_audio_file_property_audio_file";
static const char __pyx_k_get_extended_audio_file_property_7[] = "get_extended_audio_file_property_file_length_frames";
static const char __pyx_k_get_midi_message_type_channel_vo_2[] = "get_midi_message_type_channel_voice2";
static const char __pyx_k_get_midi_object_type_external_de_2[] = "get_midi_object_type_external_destination";
/* #### Code section: decls ### */
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_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_14audio_hardware_get_devices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_16audio_hardware_get_default_output_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_18audio_hardware_get_default_input_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_20audio_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_22audio_file_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_file_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_24audio_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_26audio_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_28audio_file_stream_open(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_type_hint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_30audio_file_stream_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_stream_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_32audio_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_34audio_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_36audio_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_38audio_converter_new(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_source_format, PyObject *__pyx_v_dest_format); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_40audio_converter_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_42audio_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_44audio_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_46audio_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_48audio_converter_reset(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_converter_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_50audio_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_52get_audio_converter_property_min_input_buffer_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_54get_audio_converter_property_min_output_buffer_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_56get_audio_converter_property_max_input_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_58get_audio_converter_property_max_output_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_60get_audio_converter_property_sample_rate_converter_quality(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_62get_audio_converter_property_codec_quality(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_64get_audio_converter_quality_max(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_66get_audio_converter_quality_high(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_68get_audio_converter_quality_medium(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_70get_audio_converter_quality_low(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_72get_audio_converter_quality_min(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_74extended_audio_file_open_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_76extended_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_78extended_audio_file_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_ext_file_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_80extended_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_82extended_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_84extended_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_86extended_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_88get_extended_audio_file_property_file_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_90get_extended_audio_file_property_client_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_92get_extended_audio_file_property_file_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_94get_extended_audio_file_property_client_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_96get_extended_audio_file_property_codec_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_98get_extended_audio_file_property_audio_file(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_100get_extended_audio_file_property_file_length_frames(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_102audio_queue_new_output(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_audio_format); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_104audio_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_106audio_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_108audio_queue_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_110audio_queue_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_112audio_queue_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_queue_id, int __pyx_v_immediate); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_114get_audio_format_linear_pcm(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_116get_linear_pcm_format_flag_is_signed_integer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_118get_linear_pcm_format_flag_is_packed(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_120get_audio_file_wave_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_122get_audio_file_read_permission(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_124get_audio_file_property_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_126get_audio_file_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_128get_audio_file_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_130get_audio_file_property_estimated_duration(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_132get_audio_object_property_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_134get_audio_object_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_136get_audio_device_property_device_uid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_138get_audio_device_property_model_uid(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_140get_audio_device_property_transport_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_142get_audio_device_property_device_is_alive(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_144get_audio_device_property_nominal_sample_rate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_146get_audio_device_property_available_nominal_sample_rates(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_148get_audio_device_property_is_hidden(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_150get_audio_device_property_preferred_channels_for_stereo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_152get_audio_device_property_stream_configuration(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_154get_audio_object_property_scope_global(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_156get_audio_object_property_scope_input(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_158get_audio_object_property_scope_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_160get_audio_object_property_element_main(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_162audio_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_164audio_component_instance_new(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_166audio_component_instance_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_instance_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_168audio_component_copy_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_170audio_component_get_description(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_component_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_172audio_unit_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_174audio_unit_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_176audio_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_178audio_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_180audio_output_unit_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_182audio_output_unit_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_audio_unit_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_184get_audio_unit_type_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_186get_audio_component_type_music_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_188get_audio_unit_subtype_default_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_190get_audio_unit_manufacturer_apple(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_192get_audio_unit_property_stream_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_194get_audio_unit_property_set_render_callback(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_196get_audio_unit_scope_input(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_198get_audio_unit_scope_output(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_200get_audio_unit_scope_global(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_202get_linear_pcm_format_flag_is_non_interleaved(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_204demonstrate_callback_infrastructure(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* 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_8stop(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_10set_looping(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, int __pyx_v_loop); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_12reset_playback(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_14is_playing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_16get_progress(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static void __pyx_pf_9coremusic_4capi_11AudioPlayer_18__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_206get_audio_file_stream_property_ready_to_produce_packets(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_208get_audio_file_stream_property_file_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_210get_audio_file_stream_property_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_212get_audio_file_stream_property_format_list(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_214get_audio_file_stream_property_magic_cookie_data(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_216get_audio_file_stream_property_audio_data_byte_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_218get_audio_file_stream_property_audio_data_packet_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_220get_audio_file_stream_property_maximum_packet_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_222get_audio_file_stream_property_data_offset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_224get_audio_file_stream_property_channel_layout(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_226get_audio_file_stream_property_packet_to_frame(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_228get_audio_file_stream_property_frame_to_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_230get_audio_file_stream_property_packet_to_byte(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_232get_audio_file_stream_property_byte_to_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_234get_audio_file_stream_property_packet_table_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_236get_audio_file_stream_property_packet_size_upper_bound(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_238get_audio_file_stream_property_average_bytes_per_packet(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_240get_audio_file_stream_property_bit_rate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_242get_audio_file_stream_property_info_dictionary(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_244get_audio_file_stream_property_flag_property_is_cached(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_246get_audio_file_stream_property_flag_cache_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_248get_audio_file_stream_parse_flag_discontinuity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_250get_audio_file_stream_seek_flag_offset_is_estimated(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_252get_audio_file_stream_error_unsupported_file_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_254get_audio_file_stream_error_unsupported_data_format(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_256get_audio_file_stream_error_unsupported_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_258get_audio_file_stream_error_bad_property_size(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_260get_audio_file_stream_error_not_optimized(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_262get_audio_file_stream_error_invalid_packet_offset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_264get_audio_file_stream_error_invalid_file(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_266get_audio_file_stream_error_value_unknown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_268get_audio_file_stream_error_data_unavailable(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_270get_audio_file_stream_error_illegal_operation(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_272get_audio_file_stream_error_unspecified_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_274get_audio_file_stream_error_discontinuity_cant_recover(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_276audio_services_create_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_path); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_278audio_services_dispose_system_sound_id(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_280audio_services_play_system_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_282audio_services_play_alert_sound(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sound_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_284audio_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_286audio_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_288get_audio_services_no_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_290get_audio_services_unsupported_property_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_292get_audio_services_bad_property_size_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_294get_audio_services_bad_specifier_size_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_296get_audio_services_system_sound_unspecified_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_298get_audio_services_system_sound_client_timed_out_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_300get_audio_services_system_sound_exceeded_maximum_duration_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_302get_system_sound_id_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_304get_system_sound_id_flash_screen(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_306get_system_sound_id_vibrate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_308get_user_preferred_alert(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_310get_audio_services_property_is_ui_sound(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_312get_audio_services_property_complete_playback_if_app_dies(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_314test_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_316music_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_318music_device_sysex(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_unit, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_320music_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_322music_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_324create_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_326create_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_328get_music_note_event_use_group_instrument(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_330get_music_note_event_unused(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_332get_music_device_range(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_334get_music_device_midi_event_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_336get_music_device_sysex_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_338get_music_device_start_note_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_340get_music_device_stop_note_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_342get_music_device_midi_event_list_select(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_344midi_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_346midi_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_348midi_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_350midi_program_change(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_program); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_352midi_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_channel, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_354new_music_player(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_356dispose_music_player(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_358music_player_set_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_360music_player_get_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_362music_player_set_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player, double __pyx_v_time); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_364music_player_get_time(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_366music_player_preroll(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_368music_player_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_370music_player_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_372music_player_is_playing(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_374music_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_376music_player_get_play_rate_scalar(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_player); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_378new_music_sequence(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_380dispose_music_sequence(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_382music_sequence_new_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_384music_sequence_dispose_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence, long __pyx_v_track); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_386music_sequence_get_track_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_388music_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_390music_sequence_get_tempo_track(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_392music_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_394music_sequence_get_sequence_type(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_396music_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_398music_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_400music_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_402music_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_404get_music_event_type_null(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_406get_music_event_type_extended_note(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_408get_music_event_type_extended_tempo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_410get_music_event_type_user(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_412get_music_event_type_meta(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_414get_music_event_type_midi_note_message(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_416get_music_event_type_midi_channel_message(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_418get_music_event_type_midi_raw_data(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_420get_music_event_type_parameter(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_422get_music_event_type_au_preset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_424get_music_sequence_type_beats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_426get_music_sequence_type_seconds(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_428get_music_sequence_type_samples(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_430get_music_sequence_file_any_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_432get_music_sequence_file_midi_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_434get_music_sequence_file_imelody_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_436get_sequence_track_property_loop_info(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_438get_sequence_track_property_offset_time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_440get_sequence_track_property_mute_status(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_442get_sequence_track_property_solo_status(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_444get_sequence_track_property_automated_parameters(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_446get_sequence_track_property_track_length(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_448get_sequence_track_property_time_resolution(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_450create_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_452create_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_454midi_client_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_456midi_client_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_458midi_input_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_460midi_output_port_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_port_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_462midi_port_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_464midi_port_connect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_466midi_port_disconnect_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_port, long __pyx_v_source); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_468midi_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_470midi_get_device(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_device_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_472midi_device_get_number_of_entities(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_474midi_device_get_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, int __pyx_v_entity_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_476midi_entity_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_478midi_entity_get_source(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_source_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_480midi_entity_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_482midi_entity_get_destination(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity, int __pyx_v_dest_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_484midi_get_number_of_sources(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_486midi_get_source(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_source_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_488midi_get_number_of_destinations(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_490midi_get_destination(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dest_index); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_492midi_source_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_494midi_destination_create(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_client, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_496midi_endpoint_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_498midi_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_500midi_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_502midi_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_504midi_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_506midi_object_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_508midi_device_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_510midi_endpoint_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_512midi_entity_get_name(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_514midi_object_get_manufacturer(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_516midi_object_get_model(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_518midi_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_520get_midi_error_invalid_client(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_522get_midi_error_invalid_port(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_524get_midi_error_wrong_endpoint_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_526get_midi_error_no_connection(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_528get_midi_error_unknown_endpoint(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_530get_midi_error_unknown_property(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_532get_midi_error_wrong_property_type(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_534get_midi_error_no_current_setup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_536get_midi_error_message_send_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_538get_midi_error_server_start_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_540get_midi_error_setup_format_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_542get_midi_error_wrong_thread(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_544get_midi_error_object_not_found(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_546get_midi_error_id_not_unique(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_548get_midi_error_not_permitted(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_550get_midi_error_unknown_error(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_552get_midi_object_type_other(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_554get_midi_object_type_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_556get_midi_object_type_entity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_558get_midi_object_type_source(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_560get_midi_object_type_destination(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_562get_midi_object_type_external_device(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_564get_midi_object_type_external_entity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_566get_midi_object_type_external_source(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_568get_midi_object_type_external_destination(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_570get_midi_protocol_1_0(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_572get_midi_protocol_2_0(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_574get_midi_property_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_576get_midi_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_578get_midi_property_model(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_580get_midi_property_unique_id(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_582get_midi_property_device_id(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_584get_midi_property_receive_channels(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_586get_midi_property_transmit_channels(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_588get_midi_property_offline(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_590get_midi_property_private(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_592get_midi_property_driver_owner(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_594get_midi_property_display_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_596midi_message_type_for_up_word(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_word); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_598midi1_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_600midi1_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_602midi1_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_604midi1_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_606midi1_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_608midi1_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_610midi1_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_612midi2_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_614midi2_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_616midi2_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_618midi2_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_620midi2_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_622midi2_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_624get_midi_message_type_utility(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_626get_midi_message_type_system(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_628get_midi_message_type_channel_voice1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_630get_midi_message_type_sysex(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_632get_midi_message_type_channel_voice2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_634get_midi_message_type_data128(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_636get_midi_cv_status_note_off(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_638get_midi_cv_status_note_on(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_640get_midi_cv_status_poly_pressure(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_642get_midi_cv_status_control_change(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_644get_midi_cv_status_program_change(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_646get_midi_cv_status_channel_pressure(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_648get_midi_cv_status_pitch_bend(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_650midi_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_652midi_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_654midi_device_remove_entity(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device, long __pyx_v_entity); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_656midi_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_658midi_setup_add_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_660midi_setup_remove_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_662midi_setup_add_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_664midi_setup_remove_external_device(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_666midi_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_668midi_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_670midi_device_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_device); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_672midi_device_list_get_number_of_devices(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_674midi_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_676midi_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_678midi_device_list_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_dev_list); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_680midi_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_682midi_endpoint_get_ref_cons(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_endpoint); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_684midi_get_driver_io_runloop(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_686midi_get_driver_device_list(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_688midi_driver_enable_monitoring(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_driver, int __pyx_v_enabled); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_690midi_thru_connection_params_initialize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_692midi_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_694midi_thru_connection_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_696midi_thru_connection_get_params(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_connection); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_698midi_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_700midi_thru_connection_find(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_persistent_owner_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_702get_midi_transform_none(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_704get_midi_transform_filter_out(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_706get_midi_transform_map_control(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_708get_midi_transform_add(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_710get_midi_transform_scale(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_712get_midi_transform_min_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_714get_midi_transform_max_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_716get_midi_transform_map_value(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_718get_midi_control_type_7bit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_720get_midi_control_type_14bit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_722get_midi_control_type_7bit_rpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_724get_midi_control_type_14bit_rpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_726get_midi_control_type_7bit_nrpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_728get_midi_control_type_14bit_nrpn(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_730get_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_732au_graph_new(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_734au_graph_dispose(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_736au_graph_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_738au_graph_close(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_740au_graph_initialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_742au_graph_uninitialize(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_744au_graph_start(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_746au_graph_stop(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_748au_graph_is_open(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_750au_graph_is_initialized(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_752au_graph_is_running(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_754au_graph_add_node(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id, PyObject *__pyx_v_description); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_756au_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_758au_graph_get_node_count(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_760au_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_762au_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_764au_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_766au_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_768au_graph_clear_connections(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_770au_graph_update(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_772au_graph_get_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_774au_graph_get_max_cpu_load(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_graph_id); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_776get_au_graph_err_node_not_found(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_778get_au_graph_err_invalid_connection(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_780get_au_graph_err_output_node_err(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_782get_au_graph_err_cannot_do_in_current_context(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9coremusic_4capi_784get_au_graph_err_invalid_audio_unit(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_9coremusic_4capi_AudioPlayer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9coremusic_4capi_CoreAudioObject(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;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  PyObject *__pyx_type_9coremusic_4capi_AudioPlayer;
  PyObject *__pyx_type_9coremusic_4capi_CoreAudioObject;
  PyTypeObject *__pyx_ptype_9coremusic_4capi_AudioPlayer;
  PyTypeObject *__pyx_ptype_9coremusic_4capi_CoreAudioObject;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  PyObject *__pyx_tuple[17];
  PyObject *__pyx_codeobj_tab[408];
  PyObject *__pyx_string_tab[953];
  PyObject *__pyx_float_44100_0;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_8;
  PyObject *__pyx_int_16;
  PyObject *__pyx_int_24;
  PyObject *__pyx_int_127;
  PyObject *__pyx_int_255;
  PyObject *__pyx_int_neg_10860;
  PyObject *__pyx_int_neg_10861;
  PyObject *__pyx_int_neg_10862;
  PyObject *__pyx_int_neg_10863;
  PyObject *__pyx_int_neg_10864;
/* #### 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

/* 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_b_ __pyx_string_tab[0]
#define __pyx_kp_u_AUGraphAddNode_failed_with_statu __pyx_string_tab[1]
#define __pyx_kp_u_AUGraphClearConnections_failed_w __pyx_string_tab[2]
#define __pyx_kp_u_AUGraphClose_failed_with_status __pyx_string_tab[3]
#define __pyx_kp_u_AUGraphConnectNodeInput_failed_w __pyx_string_tab[4]
#define __pyx_kp_u_AUGraphDisconnectNodeInput_faile __pyx_string_tab[5]
#define __pyx_kp_u_AUGraphGetCPULoad_failed_with_st __pyx_string_tab[6]
#define __pyx_kp_u_AUGraphGetIndNode_failed_with_st __pyx_string_tab[7]
#define __pyx_kp_u_AUGraphGetMaxCPULoad_failed_with __pyx_string_tab[8]
#define __pyx_kp_u_AUGraphGetNodeCount_failed_with __pyx_string_tab[9]
#define __pyx_kp_u_AUGraphInitialize_failed_with_st __pyx_string_tab[10]
#define __pyx_kp_u_AUGraphIsInitialized_failed_with __pyx_string_tab[11]
#define __pyx_kp_u_AUGraphIsOpen_failed_with_status __pyx_string_tab[12]
#define __pyx_kp_u_AUGraphIsRunning_failed_with_sta __pyx_string_tab[13]
#define __pyx_kp_u_AUGraphNodeInfo_failed_with_stat __pyx_string_tab[14]
#define __pyx_kp_u_AUGraphOpen_failed_with_status __pyx_string_tab[15]
#define __pyx_kp_u_AUGraphRemoveNode_failed_with_st __pyx_string_tab[16]
#define __pyx_kp_u_AUGraphStart_failed_with_status __pyx_string_tab[17]
#define __pyx_kp_u_AUGraphStop_failed_with_status __pyx_string_tab[18]
#define __pyx_kp_u_AUGraphUninitialize_failed_with __pyx_string_tab[19]
#define __pyx_kp_u_AUGraphUpdate_failed_with_status __pyx_string_tab[20]
#define __pyx_kp_u_All_components_needed_for_real __pyx_string_tab[21]
#define __pyx_kp_u_All_low_level_CoreAudio_APIs_ar __pyx_string_tab[22]
#define __pyx_n_u_AssertionError __pyx_string_tab[23]
#define __pyx_kp_u_AudioComponentGetDescription_fai __pyx_string_tab[24]
#define __pyx_kp_u_AudioComponentInstanceDispose_fa __pyx_string_tab[25]
#define __pyx_kp_u_AudioComponentInstanceNew_failed __pyx_string_tab[26]
#define __pyx_kp_u_AudioComponent_discovery_and_in __pyx_string_tab[27]
#define __pyx_kp_u_AudioConverterConvertBuffer_fail __pyx_string_tab[28]
#define __pyx_kp_u_AudioConverterDispose_failed_wit __pyx_string_tab[29]
#define __pyx_kp_u_AudioConverterFillComplexBuffer __pyx_string_tab[30]
#define __pyx_kp_u_AudioConverterGetPropertyInfo_fa __pyx_string_tab[31]
#define __pyx_kp_u_AudioConverterGetProperty_failed __pyx_string_tab[32]
#define __pyx_kp_u_AudioConverterNew_failed_with_st __pyx_string_tab[33]
#define __pyx_kp_u_AudioConverterReset_failed_with __pyx_string_tab[34]
#define __pyx_kp_u_AudioConverterSetProperty_failed __pyx_string_tab[35]
#define __pyx_kp_u_AudioFileClose_failed_with_statu __pyx_string_tab[36]
#define __pyx_kp_u_AudioFileGetPropertyInfo_failed __pyx_string_tab[37]
#define __pyx_kp_u_AudioFileGetProperty_failed_with __pyx_string_tab[38]
#define __pyx_kp_u_AudioFileOpenURL_failed_with_sta __pyx_string_tab[39]
#define __pyx_kp_u_AudioFileReadPackets_failed_with __pyx_string_tab[40]
#define __pyx_kp_u_AudioFileStreamClose_failed_with __pyx_string_tab[41]
#define __pyx_kp_u_AudioFileStreamGetPropertyInfo_f __pyx_string_tab[42]
#define __pyx_kp_u_AudioFileStreamGetProperty_faile __pyx_string_tab[43]
#define __pyx_kp_u_AudioFileStreamOpen_failed_with __pyx_string_tab[44]
#define __pyx_kp_u_AudioFileStreamParseBytes_failed __pyx_string_tab[45]
#define __pyx_kp_u_AudioFileStreamSeek_failed_with __pyx_string_tab[46]
#define __pyx_kp_u_AudioObjectGetPropertyDataSize_f __pyx_string_tab[47]
#define __pyx_kp_u_AudioObjectGetPropertyData_faile __pyx_string_tab[48]
#define __pyx_kp_u_AudioOutputUnitStart_failed_with __pyx_string_tab[49]
#define __pyx_kp_u_AudioOutputUnitStop_failed_with __pyx_string_tab[50]
#define __pyx_n_u_AudioPlayer __pyx_string_tab[51]
#define __pyx_n_u_AudioPlayer___reduce_cython __pyx_string_tab[52]
#define __pyx_n_u_AudioPlayer___setstate_cython __pyx_string_tab[53]
#define __pyx_n_u_AudioPlayer_get_progress __pyx_string_tab[54]
#define __pyx_n_u_AudioPlayer_is_playing __pyx_string_tab[55]
#define __pyx_n_u_AudioPlayer_load_file __pyx_string_tab[56]
#define __pyx_kp_u_AudioPlayer_not_initialized_Call __pyx_string_tab[57]
#define __pyx_n_u_AudioPlayer_reset_playback __pyx_string_tab[58]
#define __pyx_n_u_AudioPlayer_set_looping __pyx_string_tab[59]
#define __pyx_n_u_AudioPlayer_setup_output __pyx_string_tab[60]
#define __pyx_n_u_AudioPlayer_start __pyx_string_tab[61]
#define __pyx_n_u_AudioPlayer_stop __pyx_string_tab[62]
#define __pyx_kp_u_AudioQueueAllocateBuffer_failed __pyx_string_tab[63]
#define __pyx_kp_u_AudioQueueDispose_failed_with_st __pyx_string_tab[64]
#define __pyx_kp_u_AudioQueueEnqueueBuffer_failed_w __pyx_string_tab[65]
#define __pyx_kp_u_AudioQueueNewOutput_failed_with __pyx_string_tab[66]
#define __pyx_kp_u_AudioQueueStart_failed_with_stat __pyx_string_tab[67]
#define __pyx_kp_u_AudioQueueStop_failed_with_statu __pyx_string_tab[68]
#define __pyx_kp_u_AudioServicesCreateSystemSoundID __pyx_string_tab[69]
#define __pyx_kp_u_AudioServicesDisposeSystemSoundI __pyx_string_tab[70]
#define __pyx_kp_u_AudioServicesGetPropertyInfo_fai __pyx_string_tab[71]
#define __pyx_kp_u_AudioServicesGetProperty_failed __pyx_string_tab[72]
#define __pyx_kp_u_AudioServicesSetProperty_failed __pyx_string_tab[73]
#define __pyx_kp_u_AudioUnitGetPropertyInfo_failed __pyx_string_tab[74]
#define __pyx_kp_u_AudioUnitGetProperty_failed_with __pyx_string_tab[75]
#define __pyx_kp_u_AudioUnitInitialize_failed_with __pyx_string_tab[76]
#define __pyx_kp_u_AudioUnitSetProperty_failed_with __pyx_string_tab[77]
#define __pyx_kp_u_AudioUnitUninitialize_failed_wit __pyx_string_tab[78]
#define __pyx_kp_u_AudioUnit_Callback_Infrastructur __pyx_string_tab[79]
#define __pyx_kp_u_AudioUnit_lifecycle_management __pyx_string_tab[80]
#define __pyx_kp_u_AudioUnit_property_setting_for __pyx_string_tab[81]
#define __pyx_kp_u_BPM_must_be_greater_than_zero __pyx_string_tab[82]
#define __pyx_kp_u_Callback_functions_can_be_imple __pyx_string_tab[83]
#define __pyx_kp_u_Callback_structure_definitions __pyx_string_tab[84]
#define __pyx_kp_u_Convert_fourcc_chars_to_an_int_f __pyx_string_tab[85]
#define __pyx_n_u_CoreAudioObject __pyx_string_tab[86]
#define __pyx_n_u_CoreAudioObject___reduce_cython __pyx_string_tab[87]
#define __pyx_n_u_CoreAudioObject___setstate_cytho __pyx_string_tab[88]
#define __pyx_n_u_CoreAudioObject__ensure_not_disp __pyx_string_tab[89]
#define __pyx_n_u_CoreAudioObject__set_object_id __pyx_string_tab[90]
#define __pyx_n_u_CoreAudioObject_dispose __pyx_string_tab[91]
#define __pyx_kp_u_Could_not_add_packet_to_packet_l __pyx_string_tab[92]
#define __pyx_kp_u_Could_not_allocate_buffer_for_pa __pyx_string_tab[93]
#define __pyx_kp_u_Could_not_allocate_buffer_for_pr __pyx_string_tab[94]
#define __pyx_kp_u_Could_not_allocate_buffer_for_st __pyx_string_tab[95]
#define __pyx_kp_u_Could_not_allocate_memory_for_no __pyx_string_tab[96]
#define __pyx_kp_u_Could_not_allocate_memory_for_pr __pyx_string_tab[97]
#define __pyx_kp_u_Could_not_allocate_packet_list __pyx_string_tab[98]
#define __pyx_kp_u_Could_not_convert_CFString_to_C __pyx_string_tab[99]
#define __pyx_kp_u_Could_not_create_CFString_from_n __pyx_string_tab[100]
#define __pyx_kp_u_Could_not_create_CFString_from_p __pyx_string_tab[101]
#define __pyx_kp_u_Could_not_create_CFString_from_p_2 __pyx_string_tab[102]
#define __pyx_kp_u_Could_not_create_CFString_from_v __pyx_string_tab[103]
#define __pyx_kp_u_Could_not_create_URL_for_file __pyx_string_tab[104]
#define __pyx_kp_u_Could_not_create_URL_from_file_p __pyx_string_tab[105]
#define __pyx_kp_u_Could_not_create_URL_from_file_p_2 __pyx_string_tab[106]
#define __pyx_kp_u_Could_not_get_maximum_packet_siz __pyx_string_tab[107]
#define __pyx_kp_u_Data_must_be_int_or_bytes __pyx_string_tab[108]
#define __pyx_kp_u_Destination_index __pyx_string_tab[109]
#define __pyx_kp_u_Device_index __pyx_string_tab[110]
#define __pyx_kp_u_DisposeAUGraph_failed_with_statu __pyx_string_tab[111]
#define __pyx_kp_u_DisposeMusicPlayer_failed_with_s __pyx_string_tab[112]
#define __pyx_kp_u_DisposeMusicSequence_failed_with __pyx_string_tab[113]
#define __pyx_kp_u_Entity_index __pyx_string_tab[114]
#define __pyx_kp_u_ExtAudioFileCreateWithURL_failed __pyx_string_tab[115]
#define __pyx_kp_u_ExtAudioFileDispose_failed_with __pyx_string_tab[116]
#define __pyx_kp_u_ExtAudioFileGetProperty_failed_w __pyx_string_tab[117]
#define __pyx_kp_u_ExtAudioFileOpenURL_failed_with __pyx_string_tab[118]
#define __pyx_kp_u_ExtAudioFileRead_failed_with_sta __pyx_string_tab[119]
#define __pyx_kp_u_ExtAudioFileSetProperty_failed_w __pyx_string_tab[120]
#define __pyx_kp_u_ExtAudioFileWrite_failed_with_st __pyx_string_tab[121]
#define __pyx_kp_u_Failed_to_allocate_AudioBufferLi __pyx_string_tab[122]
#define __pyx_kp_u_Failed_to_allocate_buffer __pyx_string_tab[123]
#define __pyx_kp_u_Failed_to_allocate_output_buffer __pyx_string_tab[124]
#define __pyx_kp_u_Failed_to_allocate_read_buffer __pyx_string_tab[125]
#define __pyx_kp_u_Failed_to_create_URL_from_path __pyx_string_tab[126]
#define __pyx_kp_u_Failed_to_get_device_at_index __pyx_string_tab[127]
#define __pyx_kp_u_Failed_to_load_audio_file __pyx_string_tab[128]
#define __pyx_kp_u_Failed_to_setup_audio_output __pyx_string_tab[129]
#define __pyx_kp_u_Failed_to_start_audio_output __pyx_string_tab[130]
#define __pyx_kp_u_Failed_to_stop_audio_output __pyx_string_tab[131]
#define __pyx_kp_u_For_actual_audio_playback_with_r __pyx_string_tab[132]
#define __pyx_kp_u_Format_configuration_and_proper __pyx_string_tab[133]
#define __pyx_kp_u_Hardware_audio_output_control __pyx_string_tab[134]
#define __pyx_n_u_IndexError __pyx_string_tab[135]
#define __pyx_kp_u_Invalid_connection_parameters_da __pyx_string_tab[136]
#define __pyx_kp_u_MIDIClientCreate_failed_with_sta __pyx_string_tab[137]
#define __pyx_kp_u_MIDIClientDispose_failed_with_st __pyx_string_tab[138]
#define __pyx_kp_u_MIDIDestinationCreate_failed_wit __pyx_string_tab[139]
#define __pyx_kp_u_MIDIDeviceAddEntity_failed_with __pyx_string_tab[140]
#define __pyx_kp_u_MIDIDeviceCreate_failed_with_sta __pyx_string_tab[141]
#define __pyx_kp_u_MIDIDeviceDispose_failed_with_st __pyx_string_tab[142]
#define __pyx_kp_u_MIDIDeviceListAddDevice_failed_w __pyx_string_tab[143]
#define __pyx_kp_u_MIDIDeviceListDispose_failed_wit __pyx_string_tab[144]
#define __pyx_kp_u_MIDIDeviceNewEntity_failed_with __pyx_string_tab[145]
#define __pyx_kp_u_MIDIDeviceRemoveEntity_failed_wi __pyx_string_tab[146]
#define __pyx_kp_u_MIDIDriverEnableMonitoring_faile __pyx_string_tab[147]
#define __pyx_kp_u_MIDIEndpointDispose_failed_with __pyx_string_tab[148]
#define __pyx_kp_u_MIDIEndpointGetRefCons_failed_wi __pyx_string_tab[149]
#define __pyx_kp_u_MIDIEndpointSetRefCons_failed_wi __pyx_string_tab[150]
#define __pyx_kp_u_MIDIEntityAddOrRemoveEndpoints_f __pyx_string_tab[151]
#define __pyx_kp_u_MIDIExternalDeviceCreate_failed __pyx_string_tab[152]
#define __pyx_kp_u_MIDIInputPortCreate_failed_with __pyx_string_tab[153]
#define __pyx_kp_u_MIDIObjectGetIntegerProperty_fai __pyx_string_tab[154]
#define __pyx_kp_u_MIDIObjectGetStringProperty_fail __pyx_string_tab[155]
#define __pyx_kp_u_MIDIObjectSetIntegerProperty_fai __pyx_string_tab[156]
#define __pyx_kp_u_MIDIObjectSetStringProperty_fail __pyx_string_tab[157]
#define __pyx_kp_u_MIDIOutputPortCreate_failed_with __pyx_string_tab[158]
#define __pyx_kp_u_MIDIPortConnectSource_failed_wit __pyx_string_tab[159]
#define __pyx_kp_u_MIDIPortDisconnectSource_failed __pyx_string_tab[160]
#define __pyx_kp_u_MIDIPortDispose_failed_with_stat __pyx_string_tab[161]
#define __pyx_kp_u_MIDISend_failed_with_status __pyx_string_tab[162]
#define __pyx_kp_u_MIDISetupAddDevice_failed_with_s __pyx_string_tab[163]
#define __pyx_kp_u_MIDISetupAddExternalDevice_faile __pyx_string_tab[164]
#define __pyx_kp_u_MIDISetupRemoveDevice_failed_wit __pyx_string_tab[165]
#define __pyx_kp_u_MIDISetupRemoveExternalDevice_fa __pyx_string_tab[166]
#define __pyx_kp_u_MIDISourceCreate_failed_with_sta __pyx_string_tab[167]
#define __pyx_kp_u_MIDIThruConnectionCreate_failed __pyx_string_tab[168]
#define __pyx_kp_u_MIDIThruConnectionDispose_failed __pyx_string_tab[169]
#define __pyx_kp_u_MIDIThruConnectionFind_failed_wi __pyx_string_tab[170]
#define __pyx_kp_u_MIDIThruConnectionGetParams_fail __pyx_string_tab[171]
#define __pyx_kp_u_MIDIThruConnectionSetParams_fail __pyx_string_tab[172]
#define __pyx_kp_u_MIDI_data_too_large_max_256_byte __pyx_string_tab[173]
#define __pyx_n_u_MemoryError __pyx_string_tab[174]
#define __pyx_kp_u_MusicDeviceMIDIEvent_failed_with __pyx_string_tab[175]
#define __pyx_kp_u_MusicDeviceStartNote_failed_with __pyx_string_tab[176]
#define __pyx_kp_u_MusicDeviceStopNote_failed_with __pyx_string_tab[177]
#define __pyx_kp_u_MusicDeviceSysEx_failed_with_sta __pyx_string_tab[178]
#define __pyx_kp_u_MusicPlayerGetPlayRateScalar_fai __pyx_string_tab[179]
#define __pyx_kp_u_MusicPlayerGetSequence_failed_wi __pyx_string_tab[180]
#define __pyx_kp_u_MusicPlayerGetTime_failed_with_s __pyx_string_tab[181]
#define __pyx_kp_u_MusicPlayerIsPlaying_failed_with __pyx_string_tab[182]
#define __pyx_kp_u_MusicPlayerPreroll_failed_with_s __pyx_string_tab[183]
#define __pyx_kp_u_MusicPlayerSetPlayRateScalar_fai __pyx_string_tab[184]
#define __pyx_kp_u_MusicPlayerSetSequence_failed_wi __pyx_string_tab[185]
#define __pyx_kp_u_MusicPlayerSetTime_failed_with_s __pyx_string_tab[186]
#define __pyx_kp_u_MusicPlayerStart_failed_with_sta __pyx_string_tab[187]
#define __pyx_kp_u_MusicPlayerStop_failed_with_stat __pyx_string_tab[188]
#define __pyx_kp_u_MusicSequenceDisposeTrack_failed __pyx_string_tab[189]
#define __pyx_kp_u_MusicSequenceFileLoad_failed_wit __pyx_string_tab[190]
#define __pyx_kp_u_MusicSequenceGetIndTrack_failed __pyx_string_tab[191]
#define __pyx_kp_u_MusicSequenceGetSequenceType_fai __pyx_string_tab[192]
#define __pyx_kp_u_MusicSequenceGetTempoTrack_faile __pyx_string_tab[193]
#define __pyx_kp_u_MusicSequenceGetTrackCount_faile __pyx_string_tab[194]
#define __pyx_kp_u_MusicSequenceNewTrack_failed_wit __pyx_string_tab[195]
#define __pyx_kp_u_MusicSequenceSetSequenceType_fai __pyx_string_tab[196]
#define __pyx_kp_u_MusicTrackNewExtendedTempoEvent __pyx_string_tab[197]
#define __pyx_kp_u_MusicTrackNewMIDIChannelEvent_fa __pyx_string_tab[198]
#define __pyx_kp_u_MusicTrackNewMIDINoteEvent_faile __pyx_string_tab[199]
#define __pyx_kp_u_NewAUGraph_failed_with_status __pyx_string_tab[200]
#define __pyx_kp_u_NewMusicPlayer_failed_with_statu __pyx_string_tab[201]
#define __pyx_kp_u_NewMusicSequence_failed_with_sta __pyx_string_tab[202]
#define __pyx_n_u_None __pyx_string_tab[203]
#define __pyx_kp_u_None __pyx_string_tab[204]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[205]
#define __pyx_kp_u_Or_use_higher_level_Python_audi __pyx_string_tab[206]
#define __pyx_kp_u_Real_time_audio_buffer_manageme __pyx_string_tab[207]
#define __pyx_n_u_RuntimeError __pyx_string_tab[208]
#define __pyx_kp_u_Scale_rate_must_be_greater_than __pyx_string_tab[209]
#define __pyx_kp_u_Source_index __pyx_string_tab[210]
#define __pyx_kp_u_The_AudioUnit_infrastructure_is __pyx_string_tab[211]
#define __pyx_n_u_TypeError __pyx_string_tab[212]
#define __pyx_n_u_ValueError __pyx_string_tab[213]
#define __pyx_kp_u__2 __pyx_string_tab[214]
#define __pyx_kp_u__3 __pyx_string_tab[215]
#define __pyx_n_u_actual_bytes __pyx_string_tab[216]
#define __pyx_n_u_actual_size __pyx_string_tab[217]
#define __pyx_kp_u_add_note __pyx_string_tab[218]
#define __pyx_n_u_address __pyx_string_tab[219]
#define __pyx_n_u_append __pyx_string_tab[220]
#define __pyx_n_u_argCount __pyx_string_tab[221]
#define __pyx_n_u_arg_count __pyx_string_tab[222]
#define __pyx_n_u_asbd __pyx_string_tab[223]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[224]
#define __pyx_n_u_attribute_data __pyx_string_tab[225]
#define __pyx_n_u_attribute_type __pyx_string_tab[226]
#define __pyx_n_u_au_graph_add_node __pyx_string_tab[227]
#define __pyx_n_u_au_graph_clear_connections __pyx_string_tab[228]
#define __pyx_n_u_au_graph_close __pyx_string_tab[229]
#define __pyx_n_u_au_graph_connect_node_input __pyx_string_tab[230]
#define __pyx_n_u_au_graph_disconnect_node_input __pyx_string_tab[231]
#define __pyx_n_u_au_graph_dispose __pyx_string_tab[232]
#define __pyx_n_u_au_graph_get_cpu_load __pyx_string_tab[233]
#define __pyx_n_u_au_graph_get_ind_node __pyx_string_tab[234]
#define __pyx_n_u_au_graph_get_max_cpu_load __pyx_string_tab[235]
#define __pyx_n_u_au_graph_get_node_count __pyx_string_tab[236]
#define __pyx_n_u_au_graph_initialize __pyx_string_tab[237]
#define __pyx_n_u_au_graph_is_initialized __pyx_string_tab[238]
#define __pyx_n_u_au_graph_is_open __pyx_string_tab[239]
#define __pyx_n_u_au_graph_is_running __pyx_string_tab[240]
#define __pyx_n_u_au_graph_new __pyx_string_tab[241]
#define __pyx_n_u_au_graph_node_info __pyx_string_tab[242]
#define __pyx_n_u_au_graph_open __pyx_string_tab[243]
#define __pyx_n_u_au_graph_remove_node __pyx_string_tab[244]
#define __pyx_n_u_au_graph_start __pyx_string_tab[245]
#define __pyx_n_u_au_graph_stop __pyx_string_tab[246]
#define __pyx_n_u_au_graph_uninitialize __pyx_string_tab[247]
#define __pyx_n_u_au_graph_update __pyx_string_tab[248]
#define __pyx_n_u_audio_component_copy_name __pyx_string_tab[249]
#define __pyx_n_u_audio_component_find_next __pyx_string_tab[250]
#define __pyx_n_u_audio_component_get_description __pyx_string_tab[251]
#define __pyx_n_u_audio_component_instance_dispose __pyx_string_tab[252]
#define __pyx_n_u_audio_component_instance_new __pyx_string_tab[253]
#define __pyx_n_u_audio_converter_convert_buffer __pyx_string_tab[254]
#define __pyx_n_u_audio_converter_dispose __pyx_string_tab[255]
#define __pyx_n_u_audio_converter_fill_complex_buf __pyx_string_tab[256]
#define __pyx_n_u_audio_converter_get_property __pyx_string_tab[257]
#define __pyx_n_u_audio_converter_new __pyx_string_tab[258]
#define __pyx_n_u_audio_converter_reset __pyx_string_tab[259]
#define __pyx_n_u_audio_converter_set_property __pyx_string_tab[260]
#define __pyx_n_u_audio_data __pyx_string_tab[261]
#define __pyx_n_u_audio_file __pyx_string_tab[262]
#define __pyx_n_u_audio_file_close __pyx_string_tab[263]
#define __pyx_n_u_audio_file_get_property __pyx_string_tab[264]
#define __pyx_n_u_audio_file_id __pyx_string_tab[265]
#define __pyx_n_u_audio_file_open_url __pyx_string_tab[266]
#define __pyx_n_u_audio_file_read_packets __pyx_string_tab[267]
#define __pyx_n_u_audio_file_stream_close __pyx_string_tab[268]
#define __pyx_n_u_audio_file_stream_get_property __pyx_string_tab[269]
#define __pyx_n_u_audio_file_stream_open __pyx_string_tab[270]
#define __pyx_n_u_audio_file_stream_parse_bytes __pyx_string_tab[271]
#define __pyx_n_u_audio_file_stream_seek __pyx_string_tab[272]
#define __pyx_n_u_audio_format __pyx_string_tab[273]
#define __pyx_n_u_audio_hardware_destroy_aggregate __pyx_string_tab[274]
#define __pyx_n_u_audio_hardware_get_default_input __pyx_string_tab[275]
#define __pyx_n_u_audio_hardware_get_default_outpu __pyx_string_tab[276]
#define __pyx_n_u_audio_hardware_get_devices __pyx_string_tab[277]
#define __pyx_n_u_audio_hardware_unload __pyx_string_tab[278]
#define __pyx_n_u_audio_object_get_property_data __pyx_string_tab[279]
#define __pyx_n_u_audio_object_get_property_string __pyx_string_tab[280]
#define __pyx_n_u_audio_object_show __pyx_string_tab[281]
#define __pyx_n_u_audio_output_unit_start __pyx_string_tab[282]
#define __pyx_n_u_audio_output_unit_stop __pyx_string_tab[283]
#define __pyx_n_u_audio_queue_allocate_buffer __pyx_string_tab[284]
#define __pyx_n_u_audio_queue_dispose __pyx_string_tab[285]
#define __pyx_n_u_audio_queue_enqueue_buffer __pyx_string_tab[286]
#define __pyx_n_u_audio_queue_new_output __pyx_string_tab[287]
#define __pyx_n_u_audio_queue_start __pyx_string_tab[288]
#define __pyx_n_u_audio_queue_stop __pyx_string_tab[289]
#define __pyx_n_u_audio_services_create_system_sou __pyx_string_tab[290]
#define __pyx_n_u_audio_services_dispose_system_so __pyx_string_tab[291]
#define __pyx_n_u_audio_services_get_property __pyx_string_tab[292]
#define __pyx_n_u_audio_services_play_alert_sound __pyx_string_tab[293]
#define __pyx_n_u_audio_services_play_system_sound __pyx_string_tab[294]
#define __pyx_n_u_audio_services_set_property __pyx_string_tab[295]
#define __pyx_n_u_audio_unit __pyx_string_tab[296]
#define __pyx_n_u_audio_unit_get_property __pyx_string_tab[297]
#define __pyx_n_u_audio_unit_id __pyx_string_tab[298]
#define __pyx_n_u_audio_unit_initialize __pyx_string_tab[299]
#define __pyx_n_u_audio_unit_set_property __pyx_string_tab[300]
#define __pyx_n_u_audio_unit_uninitialize __pyx_string_tab[301]
#define __pyx_n_u_bank_is_valid __pyx_string_tab[302]
#define __pyx_n_u_bank_lsb __pyx_string_tab[303]
#define __pyx_n_u_bank_msb __pyx_string_tab[304]
#define __pyx_n_u_bits_per_channel __pyx_string_tab[305]
#define __pyx_n_u_bool __pyx_string_tab[306]
#define __pyx_n_u_bpm __pyx_string_tab[307]
#define __pyx_n_u_buffer __pyx_string_tab[308]
#define __pyx_n_u_buffer_id __pyx_string_tab[309]
#define __pyx_n_u_buffer_list __pyx_string_tab[310]
#define __pyx_n_u_buffer_size __pyx_string_tab[311]
#define __pyx_n_u_byte1 __pyx_string_tab[312]
#define __pyx_n_u_byte2 __pyx_string_tab[313]
#define __pyx_n_u_byte3 __pyx_string_tab[314]
#define __pyx_n_u_byte4 __pyx_string_tab[315]
#define __pyx_n_u_byte5 __pyx_string_tab[316]
#define __pyx_n_u_byte6 __pyx_string_tab[317]
#define __pyx_n_u_byte_data __pyx_string_tab[318]
#define __pyx_n_u_byte_offset __pyx_string_tab[319]
#define __pyx_n_u_bytes __pyx_string_tab[320]
#define __pyx_n_u_bytes_per_frame __pyx_string_tab[321]
#define __pyx_n_u_bytes_per_packet __pyx_string_tab[322]
#define __pyx_n_u_bytes_used __pyx_string_tab[323]
#define __pyx_n_u_c_str __pyx_string_tab[324]
#define __pyx_n_u_callback_data __pyx_string_tab[325]
#define __pyx_n_u_cf_connection_list __pyx_string_tab[326]
#define __pyx_n_u_cf_manufacturer __pyx_string_tab[327]
#define __pyx_n_u_cf_model __pyx_string_tab[328]
#define __pyx_n_u_cf_name __pyx_string_tab[329]
#define __pyx_n_u_cf_owner_id __pyx_string_tab[330]
#define __pyx_n_u_cf_params __pyx_string_tab[331]
#define __pyx_n_u_cf_path __pyx_string_tab[332]
#define __pyx_n_u_cf_prop_name __pyx_string_tab[333]
#define __pyx_n_u_cf_value __pyx_string_tab[334]
#define __pyx_n_u_channel __pyx_string_tab[335]
#define __pyx_n_u_channelMap __pyx_string_tab[336]
#define __pyx_n_u_channelPressure __pyx_string_tab[337]
#define __pyx_n_u_channel_map __pyx_string_tab[338]
#define __pyx_n_u_channels_per_frame __pyx_string_tab[339]
#define __pyx_n_u_class __pyx_string_tab[340]
#define __pyx_n_u_client __pyx_string_tab[341]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[342]
#define __pyx_n_u_code __pyx_string_tab[343]
#define __pyx_n_u_codec_manufacturer __pyx_string_tab[344]
#define __pyx_n_u_component __pyx_string_tab[345]
#define __pyx_n_u_component_id __pyx_string_tab[346]
#define __pyx_n_u_connection __pyx_string_tab[347]
#define __pyx_n_u_connection_params __pyx_string_tab[348]
#define __pyx_n_u_connections __pyx_string_tab[349]
#define __pyx_n_u_controlTransforms __pyx_string_tab[350]
#define __pyx_n_u_controller __pyx_string_tab[351]
#define __pyx_n_u_controls __pyx_string_tab[352]
#define __pyx_kp_u_convert_int_to_fourcc_4_chars_in __pyx_string_tab[353]
#define __pyx_n_u_converter __pyx_string_tab[354]
#define __pyx_n_u_converter_id __pyx_string_tab[355]
#define __pyx_n_u_coremusic_capi __pyx_string_tab[356]
#define __pyx_n_u_count __pyx_string_tab[357]
#define __pyx_n_u_cpu_load __pyx_string_tab[358]
#define __pyx_n_u_create_midi_channel_message __pyx_string_tab[359]
#define __pyx_n_u_create_midi_note_message __pyx_string_tab[360]
#define __pyx_n_u_create_music_device_note_params __pyx_string_tab[361]
#define __pyx_n_u_create_music_device_std_note_par __pyx_string_tab[362]
#define __pyx_n_u_data __pyx_string_tab[363]
#define __pyx_n_u_data1 __pyx_string_tab[364]
#define __pyx_n_u_data2 __pyx_string_tab[365]
#define __pyx_n_u_data_length __pyx_string_tab[366]
#define __pyx_kp_u_data_must_be_bytes __pyx_string_tab[367]
#define __pyx_n_u_data_ptr __pyx_string_tab[368]
#define __pyx_n_u_data_size __pyx_string_tab[369]
#define __pyx_n_u_demonstrate_callback_infrastruct __pyx_string_tab[370]
#define __pyx_n_u_desc __pyx_string_tab[371]
#define __pyx_n_u_desc_dict __pyx_string_tab[372]
#define __pyx_n_u_description __pyx_string_tab[373]
#define __pyx_n_u_description_dict __pyx_string_tab[374]
#define __pyx_n_u_dest __pyx_string_tab[375]
#define __pyx_n_u_dest_format __pyx_string_tab[376]
#define __pyx_n_u_dest_index __pyx_string_tab[377]
#define __pyx_n_u_dest_input __pyx_string_tab[378]
#define __pyx_n_u_dest_node __pyx_string_tab[379]
#define __pyx_n_u_destination __pyx_string_tab[380]
#define __pyx_n_u_destinations __pyx_string_tab[381]
#define __pyx_n_u_dev_list __pyx_string_tab[382]
#define __pyx_n_u_device __pyx_string_tab[383]
#define __pyx_n_u_deviceID __pyx_string_tab[384]
#define __pyx_n_u_device_count __pyx_string_tab[385]
#define __pyx_n_u_device_id __pyx_string_tab[386]
#define __pyx_n_u_device_ids __pyx_string_tab[387]
#define __pyx_n_u_device_index __pyx_string_tab[388]
#define __pyx_n_u_devices __pyx_string_tab[389]
#define __pyx_n_u_dict __pyx_string_tab[390]
#define __pyx_kp_u_disable __pyx_string_tab[391]
#define __pyx_n_u_displayName __pyx_string_tab[392]
#define __pyx_n_u_dispose __pyx_string_tab[393]
#define __pyx_n_u_dispose_music_player __pyx_string_tab[394]
#define __pyx_n_u_dispose_music_sequence __pyx_string_tab[395]
#define __pyx_n_u_driver __pyx_string_tab[396]
#define __pyx_n_u_driverOwner __pyx_string_tab[397]
#define __pyx_n_u_dst_format __pyx_string_tab[398]
#define __pyx_n_u_duration __pyx_string_tab[399]
#define __pyx_n_u_element __pyx_string_tab[400]
#define __pyx_n_u_embedded __pyx_string_tab[401]
#define __pyx_kp_u_enable __pyx_string_tab[402]
#define __pyx_n_u_enabled __pyx_string_tab[403]
#define __pyx_n_u_endpoint __pyx_string_tab[404]
#define __pyx_n_u_endpointRef __pyx_string_tab[405]
#define __pyx_n_u_ensure_not_disposed __pyx_string_tab[406]
#define __pyx_n_u_entity __pyx_string_tab[407]
#define __pyx_n_u_entity_index __pyx_string_tab[408]
#define __pyx_n_u_enumerate __pyx_string_tab[409]
#define __pyx_n_u_ext_file __pyx_string_tab[410]
#define __pyx_n_u_ext_file_id __pyx_string_tab[411]
#define __pyx_n_u_extended_audio_file_create_with __pyx_string_tab[412]
#define __pyx_n_u_extended_audio_file_dispose __pyx_string_tab[413]
#define __pyx_n_u_extended_audio_file_get_property __pyx_string_tab[414]
#define __pyx_n_u_extended_audio_file_open_url __pyx_string_tab[415]
#define __pyx_n_u_extended_audio_file_read __pyx_string_tab[416]
#define __pyx_n_u_extended_audio_file_set_property __pyx_string_tab[417]
#define __pyx_n_u_extended_audio_file_write __pyx_string_tab[418]
#define __pyx_n_u_file_path __pyx_string_tab[419]
#define __pyx_n_u_file_type __pyx_string_tab[420]
#define __pyx_n_u_file_type_hint __pyx_string_tab[421]
#define __pyx_n_u_filterOutAllControls __pyx_string_tab[422]
#define __pyx_n_u_filterOutBeatClock __pyx_string_tab[423]
#define __pyx_n_u_filterOutMTC __pyx_string_tab[424]
#define __pyx_n_u_filterOutSysEx __pyx_string_tab[425]
#define __pyx_n_u_filterOutTuneRequest __pyx_string_tab[426]
#define __pyx_n_u_flags __pyx_string_tab[427]
#define __pyx_n_u_flags_mask __pyx_string_tab[428]
#define __pyx_n_u_float __pyx_string_tab[429]
#define __pyx_n_u_format __pyx_string_tab[430]
#define __pyx_n_u_format_flags __pyx_string_tab[431]
#define __pyx_n_u_format_id __pyx_string_tab[432]
#define __pyx_n_u_fourchar_to_int __pyx_string_tab[433]
#define __pyx_kp_u_fourchar_to_int_line_11 __pyx_string_tab[434]
#define __pyx_n_u_frames __pyx_string_tab[435]
#define __pyx_n_u_frames_per_packet __pyx_string_tab[436]
#define __pyx_n_u_frames_to_read __pyx_string_tab[437]
#define __pyx_n_u_func __pyx_string_tab[438]
#define __pyx_kp_u_gc __pyx_string_tab[439]
#define __pyx_n_u_get __pyx_string_tab[440]
#define __pyx_n_u_get_au_graph_err_cannot_do_in_cu __pyx_string_tab[441]
#define __pyx_n_u_get_au_graph_err_invalid_audio_u __pyx_string_tab[442]
#define __pyx_n_u_get_au_graph_err_invalid_connect __pyx_string_tab[443]
#define __pyx_n_u_get_au_graph_err_node_not_found __pyx_string_tab[444]
#define __pyx_n_u_get_au_graph_err_output_node_err __pyx_string_tab[445]
#define __pyx_n_u_get_audio_component_type_music_d __pyx_string_tab[446]
#define __pyx_n_u_get_audio_converter_property_cod __pyx_string_tab[447]
#define __pyx_n_u_get_audio_converter_property_max __pyx_string_tab[448]
#define __pyx_n_u_get_audio_converter_property_max_2 __pyx_string_tab[449]
#define __pyx_n_u_get_audio_converter_property_min __pyx_string_tab[450]
#define __pyx_n_u_get_audio_converter_property_min_2 __pyx_string_tab[451]
#define __pyx_n_u_get_audio_converter_property_sam __pyx_string_tab[452]
#define __pyx_n_u_get_audio_converter_quality_high __pyx_string_tab[453]
#define __pyx_n_u_get_audio_converter_quality_low __pyx_string_tab[454]
#define __pyx_n_u_get_audio_converter_quality_max __pyx_string_tab[455]
#define __pyx_n_u_get_audio_converter_quality_medi __pyx_string_tab[456]
#define __pyx_n_u_get_audio_converter_quality_min __pyx_string_tab[457]
#define __pyx_n_u_get_audio_device_property_availa __pyx_string_tab[458]
#define __pyx_n_u_get_audio_device_property_device __pyx_string_tab[459]
#define __pyx_n_u_get_audio_device_property_device_2 __pyx_string_tab[460]
#define __pyx_n_u_get_audio_device_property_is_hid __pyx_string_tab[461]
#define __pyx_n_u_get_audio_device_property_model __pyx_string_tab[462]
#define __pyx_n_u_get_audio_device_property_nomina __pyx_string_tab[463]
#define __pyx_n_u_get_audio_device_property_prefer __pyx_string_tab[464]
#define __pyx_n_u_get_audio_device_property_stream __pyx_string_tab[465]
#define __pyx_n_u_get_audio_device_property_transp __pyx_string_tab[466]
#define __pyx_n_u_get_audio_file_property_audio_da __pyx_string_tab[467]
#define __pyx_n_u_get_audio_file_property_data_for __pyx_string_tab[468]
#define __pyx_n_u_get_audio_file_property_estimate __pyx_string_tab[469]
#define __pyx_n_u_get_audio_file_property_maximum __pyx_string_tab[470]
#define __pyx_n_u_get_audio_file_read_permission __pyx_string_tab[471]
#define __pyx_n_u_get_audio_file_stream_error_bad __pyx_string_tab[472]
#define __pyx_n_u_get_audio_file_stream_error_data __pyx_string_tab[473]
#define __pyx_n_u_get_audio_file_stream_error_disc __pyx_string_tab[474]
#define __pyx_n_u_get_audio_file_stream_error_ille __pyx_string_tab[475]
#define __pyx_n_u_get_audio_file_stream_error_inva __pyx_string_tab[476]
#define __pyx_n_u_get_audio_file_stream_error_inva_2 __pyx_string_tab[477]
#define __pyx_n_u_get_audio_file_stream_error_not __pyx_string_tab[478]
#define __pyx_n_u_get_audio_file_stream_error_unsp __pyx_string_tab[479]
#define __pyx_n_u_get_audio_file_stream_error_unsu __pyx_string_tab[480]
#define __pyx_n_u_get_audio_file_stream_error_unsu_2 __pyx_string_tab[481]
#define __pyx_n_u_get_audio_file_stream_error_unsu_3 __pyx_string_tab[482]
#define __pyx_n_u_get_audio_file_stream_error_valu __pyx_string_tab[483]
#define __pyx_n_u_get_audio_file_stream_parse_flag __pyx_string_tab[484]
#define __pyx_n_u_get_audio_file_stream_property_a __pyx_string_tab[485]
#define __pyx_n_u_get_audio_file_stream_property_a_2 __pyx_string_tab[486]
#define __pyx_n_u_get_audio_file_stream_property_a_3 __pyx_string_tab[487]
#define __pyx_n_u_get_audio_file_stream_property_b __pyx_string_tab[488]
#define __pyx_n_u_get_audio_file_stream_property_b_2 __pyx_string_tab[489]
#define __pyx_n_u_get_audio_file_stream_property_c __pyx_string_tab[490]
#define __pyx_n_u_get_audio_file_stream_property_d __pyx_string_tab[491]
#define __pyx_n_u_get_audio_file_stream_property_d_2 __pyx_string_tab[492]
#define __pyx_n_u_get_audio_file_stream_property_f __pyx_string_tab[493]
#define __pyx_n_u_get_audio_file_stream_property_f_2 __pyx_string_tab[494]
#define __pyx_n_u_get_audio_file_stream_property_f_3 __pyx_string_tab[495]
#define __pyx_n_u_get_audio_file_stream_property_f_4 __pyx_string_tab[496]
#define __pyx_n_u_get_audio_file_stream_property_f_5 __pyx_string_tab[497]
#define __pyx_n_u_get_audio_file_stream_property_i __pyx_string_tab[498]
#define __pyx_n_u_get_audio_file_stream_property_m __pyx_string_tab[499]
#define __pyx_n_u_get_audio_file_stream_property_m_2 __pyx_string_tab[500]
#define __pyx_n_u_get_audio_file_stream_property_p __pyx_string_tab[501]
#define __pyx_n_u_get_audio_file_stream_property_p_2 __pyx_string_tab[502]
#define __pyx_n_u_get_audio_file_stream_property_p_3 __pyx_string_tab[503]
#define __pyx_n_u_get_audio_file_stream_property_p_4 __pyx_string_tab[504]
#define __pyx_n_u_get_audio_file_stream_property_r __pyx_string_tab[505]
#define __pyx_n_u_get_audio_file_stream_seek_flag __pyx_string_tab[506]
#define __pyx_n_u_get_audio_file_wave_type __pyx_string_tab[507]
#define __pyx_n_u_get_audio_format_linear_pcm __pyx_string_tab[508]
#define __pyx_n_u_get_audio_object_property_elemen __pyx_string_tab[509]
#define __pyx_n_u_get_audio_object_property_manufa __pyx_string_tab[510]
#define __pyx_n_u_get_audio_object_property_name __pyx_string_tab[511]
#define __pyx_n_u_get_audio_object_property_scope __pyx_string_tab[512]
#define __pyx_n_u_get_audio_object_property_scope_2 __pyx_string_tab[513]
#define __pyx_n_u_get_audio_object_property_scope_3 __pyx_string_tab[514]
#define __pyx_n_u_get_audio_services_bad_property __pyx_string_tab[515]
#define __pyx_n_u_get_audio_services_bad_specifier __pyx_string_tab[516]
#define __pyx_n_u_get_audio_services_no_error __pyx_string_tab[517]
#define __pyx_n_u_get_audio_services_property_comp __pyx_string_tab[518]
#define __pyx_n_u_get_audio_services_property_is_u __pyx_string_tab[519]
#define __pyx_n_u_get_audio_services_system_sound __pyx_string_tab[520]
#define __pyx_n_u_get_audio_services_system_sound_2 __pyx_string_tab[521]
#define __pyx_n_u_get_audio_services_system_sound_3 __pyx_string_tab[522]
#define __pyx_n_u_get_audio_services_unsupported_p __pyx_string_tab[523]
#define __pyx_n_u_get_audio_unit_manufacturer_appl __pyx_string_tab[524]
#define __pyx_n_u_get_audio_unit_property_set_rend __pyx_string_tab[525]
#define __pyx_n_u_get_audio_unit_property_stream_f __pyx_string_tab[526]
#define __pyx_n_u_get_audio_unit_scope_global __pyx_string_tab[527]
#define __pyx_n_u_get_audio_unit_scope_input __pyx_string_tab[528]
#define __pyx_n_u_get_audio_unit_scope_output __pyx_string_tab[529]
#define __pyx_n_u_get_audio_unit_subtype_default_o __pyx_string_tab[530]
#define __pyx_n_u_get_audio_unit_type_output __pyx_string_tab[531]
#define __pyx_n_u_get_extended_audio_file_property __pyx_string_tab[532]
#define __pyx_n_u_get_extended_audio_file_property_2 __pyx_string_tab[533]
#define __pyx_n_u_get_extended_audio_file_property_3 __pyx_string_tab[534]
#define __pyx_n_u_get_extended_audio_file_property_4 __pyx_string_tab[535]
#define __pyx_n_u_get_extended_audio_file_property_5 __pyx_string_tab[536]
#define __pyx_n_u_get_extended_audio_file_property_6 __pyx_string_tab[537]
#define __pyx_n_u_get_extended_audio_file_property_7 __pyx_string_tab[538]
#define __pyx_n_u_get_linear_pcm_format_flag_is_no __pyx_string_tab[539]
#define __pyx_n_u_get_linear_pcm_format_flag_is_pa __pyx_string_tab[540]
#define __pyx_n_u_get_linear_pcm_format_flag_is_si __pyx_string_tab[541]
#define __pyx_n_u_get_midi_control_type_14bit __pyx_string_tab[542]
#define __pyx_n_u_get_midi_control_type_14bit_nrpn __pyx_string_tab[543]
#define __pyx_n_u_get_midi_control_type_14bit_rpn __pyx_string_tab[544]
#define __pyx_n_u_get_midi_control_type_7bit __pyx_string_tab[545]
#define __pyx_n_u_get_midi_control_type_7bit_nrpn __pyx_string_tab[546]
#define __pyx_n_u_get_midi_control_type_7bit_rpn __pyx_string_tab[547]
#define __pyx_n_u_get_midi_cv_status_channel_press __pyx_string_tab[548]
#define __pyx_n_u_get_midi_cv_status_control_chang __pyx_string_tab[549]
#define __pyx_n_u_get_midi_cv_status_note_off __pyx_string_tab[550]
#define __pyx_n_u_get_midi_cv_status_note_on __pyx_string_tab[551]
#define __pyx_n_u_get_midi_cv_status_pitch_bend __pyx_string_tab[552]
#define __pyx_n_u_get_midi_cv_status_poly_pressure __pyx_string_tab[553]
#define __pyx_n_u_get_midi_cv_status_program_chang __pyx_string_tab[554]
#define __pyx_n_u_get_midi_error_id_not_unique __pyx_string_tab[555]
#define __pyx_n_u_get_midi_error_invalid_client __pyx_string_tab[556]
#define __pyx_n_u_get_midi_error_invalid_port __pyx_string_tab[557]
#define __pyx_n_u_get_midi_error_message_send_err __pyx_string_tab[558]
#define __pyx_n_u_get_midi_error_no_connection __pyx_string_tab[559]
#define __pyx_n_u_get_midi_error_no_current_setup __pyx_string_tab[560]
#define __pyx_n_u_get_midi_error_not_permitted __pyx_string_tab[561]
#define __pyx_n_u_get_midi_error_object_not_found __pyx_string_tab[562]
#define __pyx_n_u_get_midi_error_server_start_err __pyx_string_tab[563]
#define __pyx_n_u_get_midi_error_setup_format_err __pyx_string_tab[564]
#define __pyx_n_u_get_midi_error_unknown_endpoint __pyx_string_tab[565]
#define __pyx_n_u_get_midi_error_unknown_error __pyx_string_tab[566]
#define __pyx_n_u_get_midi_error_unknown_property __pyx_string_tab[567]
#define __pyx_n_u_get_midi_error_wrong_endpoint_ty __pyx_string_tab[568]
#define __pyx_n_u_get_midi_error_wrong_property_ty __pyx_string_tab[569]
#define __pyx_n_u_get_midi_error_wrong_thread __pyx_string_tab[570]
#define __pyx_n_u_get_midi_message_type_channel_vo __pyx_string_tab[571]
#define __pyx_n_u_get_midi_message_type_channel_vo_2 __pyx_string_tab[572]
#define __pyx_n_u_get_midi_message_type_data128 __pyx_string_tab[573]
#define __pyx_n_u_get_midi_message_type_sysex __pyx_string_tab[574]
#define __pyx_n_u_get_midi_message_type_system __pyx_string_tab[575]
#define __pyx_n_u_get_midi_message_type_utility __pyx_string_tab[576]
#define __pyx_n_u_get_midi_object_type_destination __pyx_string_tab[577]
#define __pyx_n_u_get_midi_object_type_device __pyx_string_tab[578]
#define __pyx_n_u_get_midi_object_type_entity __pyx_string_tab[579]
#define __pyx_n_u_get_midi_object_type_external_de __pyx_string_tab[580]
#define __pyx_n_u_get_midi_object_type_external_de_2 __pyx_string_tab[581]
#define __pyx_n_u_get_midi_object_type_external_en __pyx_string_tab[582]
#define __pyx_n_u_get_midi_object_type_external_so __pyx_string_tab[583]
#define __pyx_n_u_get_midi_object_type_other __pyx_string_tab[584]
#define __pyx_n_u_get_midi_object_type_source __pyx_string_tab[585]
#define __pyx_n_u_get_midi_property_device_id __pyx_string_tab[586]
#define __pyx_n_u_get_midi_property_display_name __pyx_string_tab[587]
#define __pyx_n_u_get_midi_property_driver_owner __pyx_string_tab[588]
#define __pyx_n_u_get_midi_property_manufacturer __pyx_string_tab[589]
#define __pyx_n_u_get_midi_property_model __pyx_string_tab[590]
#define __pyx_n_u_get_midi_property_name __pyx_string_tab[591]
#define __pyx_n_u_get_midi_property_offline __pyx_string_tab[592]
#define __pyx_n_u_get_midi_property_private __pyx_string_tab[593]
#define __pyx_n_u_get_midi_property_receive_channe __pyx_string_tab[594]
#define __pyx_n_u_get_midi_property_transmit_chann __pyx_string_tab[595]
#define __pyx_n_u_get_midi_property_unique_id __pyx_string_tab[596]
#define __pyx_n_u_get_midi_protocol_1_0 __pyx_string_tab[597]
#define __pyx_n_u_get_midi_protocol_2_0 __pyx_string_tab[598]
#define __pyx_n_u_get_midi_thru_connection_max_end __pyx_string_tab[599]
#define __pyx_n_u_get_midi_transform_add __pyx_string_tab[600]
#define __pyx_n_u_get_midi_transform_filter_out __pyx_string_tab[601]
#define __pyx_n_u_get_midi_transform_map_control __pyx_string_tab[602]
#define __pyx_n_u_get_midi_transform_map_value __pyx_string_tab[603]
#define __pyx_n_u_get_midi_transform_max_value __pyx_string_tab[604]
#define __pyx_n_u_get_midi_transform_min_value __pyx_string_tab[605]
#define __pyx_n_u_get_midi_transform_none __pyx_string_tab[606]
#define __pyx_n_u_get_midi_transform_scale __pyx_string_tab[607]
#define __pyx_n_u_get_music_device_midi_event_list __pyx_string_tab[608]
#define __pyx_n_u_get_music_device_midi_event_sele __pyx_string_tab[609]
#define __pyx_n_u_get_music_device_range __pyx_string_tab[610]
#define __pyx_n_u_get_music_device_start_note_sele __pyx_string_tab[611]
#define __pyx_n_u_get_music_device_stop_note_selec __pyx_string_tab[612]
#define __pyx_n_u_get_music_device_sysex_select __pyx_string_tab[613]
#define __pyx_n_u_get_music_event_type_au_preset __pyx_string_tab[614]
#define __pyx_n_u_get_music_event_type_extended_no __pyx_string_tab[615]
#define __pyx_n_u_get_music_event_type_extended_te __pyx_string_tab[616]
#define __pyx_n_u_get_music_event_type_meta __pyx_string_tab[617]
#define __pyx_n_u_get_music_event_type_midi_channe __pyx_string_tab[618]
#define __pyx_n_u_get_music_event_type_midi_note_m __pyx_string_tab[619]
#define __pyx_n_u_get_music_event_type_midi_raw_da __pyx_string_tab[620]
#define __pyx_n_u_get_music_event_type_null __pyx_string_tab[621]
#define __pyx_n_u_get_music_event_type_parameter __pyx_string_tab[622]
#define __pyx_n_u_get_music_event_type_user __pyx_string_tab[623]
#define __pyx_n_u_get_music_note_event_unused __pyx_string_tab[624]
#define __pyx_n_u_get_music_note_event_use_group_i __pyx_string_tab[625]
#define __pyx_n_u_get_music_sequence_file_any_type __pyx_string_tab[626]
#define __pyx_n_u_get_music_sequence_file_imelody __pyx_string_tab[627]
#define __pyx_n_u_get_music_sequence_file_midi_typ __pyx_string_tab[628]
#define __pyx_n_u_get_music_sequence_type_beats __pyx_string_tab[629]
#define __pyx_n_u_get_music_sequence_type_samples __pyx_string_tab[630]
#define __pyx_n_u_get_music_sequence_type_seconds __pyx_string_tab[631]
#define __pyx_n_u_get_progress __pyx_string_tab[632]
#define __pyx_n_u_get_sequence_track_property_auto __pyx_string_tab[633]
#define __pyx_n_u_get_sequence_track_property_loop __pyx_string_tab[634]
#define __pyx_n_u_get_sequence_track_property_mute __pyx_string_tab[635]
#define __pyx_n_u_get_sequence_track_property_offs __pyx_string_tab[636]
#define __pyx_n_u_get_sequence_track_property_solo __pyx_string_tab[637]
#define __pyx_n_u_get_sequence_track_property_time __pyx_string_tab[638]
#define __pyx_n_u_get_sequence_track_property_trac __pyx_string_tab[639]
#define __pyx_n_u_get_system_sound_id_flash_screen __pyx_string_tab[640]
#define __pyx_n_u_get_system_sound_id_user_preferr __pyx_string_tab[641]
#define __pyx_n_u_get_system_sound_id_vibrate __pyx_string_tab[642]
#define __pyx_n_u_get_user_preferred_alert __pyx_string_tab[643]
#define __pyx_n_u_getstate __pyx_string_tab[644]
#define __pyx_n_u_graph __pyx_string_tab[645]
#define __pyx_n_u_graph_id __pyx_string_tab[646]
#define __pyx_n_u_group __pyx_string_tab[647]
#define __pyx_n_u_group_id __pyx_string_tab[648]
#define __pyx_kp_u_has_been_disposed __pyx_string_tab[649]
#define __pyx_n_u_highNote __pyx_string_tab[650]
#define __pyx_n_u_highVelocity __pyx_string_tab[651]
#define __pyx_n_u_i __pyx_string_tab[652]
#define __pyx_n_u_immediate __pyx_string_tab[653]
#define __pyx_n_u_in_device_id __pyx_string_tab[654]
#define __pyx_n_u_index __pyx_string_tab[655]
#define __pyx_n_u_input_buffer __pyx_string_tab[656]
#define __pyx_n_u_input_data __pyx_string_tab[657]
#define __pyx_n_u_input_data_size __pyx_string_tab[658]
#define __pyx_n_u_input_packet_count __pyx_string_tab[659]
#define __pyx_n_u_input_ptr __pyx_string_tab[660]
#define __pyx_n_u_instance __pyx_string_tab[661]
#define __pyx_n_u_instance_id __pyx_string_tab[662]
#define __pyx_n_u_instrument_id __pyx_string_tab[663]
#define __pyx_n_u_int __pyx_string_tab[664]
#define __pyx_n_u_int_to_fourchar __pyx_string_tab[665]
#define __pyx_kp_u_int_to_fourchar_line_21 __pyx_string_tab[666]
#define __pyx_n_u_is_coroutine __pyx_string_tab[667]
#define __pyx_n_u_is_estimated __pyx_string_tab[668]
#define __pyx_n_u_is_initialized __pyx_string_tab[669]
#define __pyx_n_u_is_open __pyx_string_tab[670]
#define __pyx_n_u_is_playing __pyx_string_tab[671]
#define __pyx_n_u_is_running __pyx_string_tab[672]
#define __pyx_n_u_is_updated __pyx_string_tab[673]
#define __pyx_kp_u_isenabled __pyx_string_tab[674]
#define __pyx_n_u_keyPressure __pyx_string_tab[675]
#define __pyx_n_u_large_buffer __pyx_string_tab[676]
#define __pyx_n_u_length __pyx_string_tab[677]
#define __pyx_n_u_list __pyx_string_tab[678]
#define __pyx_n_u_load_file __pyx_string_tab[679]
#define __pyx_n_u_loop __pyx_string_tab[680]
#define __pyx_n_u_lowNote __pyx_string_tab[681]
#define __pyx_n_u_lowVelocity __pyx_string_tab[682]
#define __pyx_n_u_lsb __pyx_string_tab[683]
#define __pyx_n_u_main __pyx_string_tab[684]
#define __pyx_n_u_manufacturer __pyx_string_tab[685]
#define __pyx_n_u_manufacturer_bytes __pyx_string_tab[686]
#define __pyx_n_u_max_load __pyx_string_tab[687]
#define __pyx_n_u_max_packet_size __pyx_string_tab[688]
#define __pyx_n_u_max_size __pyx_string_tab[689]
#define __pyx_n_u_message __pyx_string_tab[690]
#define __pyx_n_u_midi1_up_channel_voice_message __pyx_string_tab[691]
#define __pyx_n_u_midi1_up_control_change __pyx_string_tab[692]
#define __pyx_n_u_midi1_up_note_off __pyx_string_tab[693]
#define __pyx_n_u_midi1_up_note_on __pyx_string_tab[694]
#define __pyx_n_u_midi1_up_pitch_bend __pyx_string_tab[695]
#define __pyx_n_u_midi1_up_sysex __pyx_string_tab[696]
#define __pyx_n_u_midi1_up_system_common __pyx_string_tab[697]
#define __pyx_n_u_midi2_channel_voice_message __pyx_string_tab[698]
#define __pyx_n_u_midi2_control_change __pyx_string_tab[699]
#define __pyx_n_u_midi2_note_off __pyx_string_tab[700]
#define __pyx_n_u_midi2_note_on __pyx_string_tab[701]
#define __pyx_n_u_midi2_pitch_bend __pyx_string_tab[702]
#define __pyx_n_u_midi2_program_change __pyx_string_tab[703]
#define __pyx_n_u_midi_client_create __pyx_string_tab[704]
#define __pyx_n_u_midi_client_dispose __pyx_string_tab[705]
#define __pyx_n_u_midi_control_change __pyx_string_tab[706]
#define __pyx_n_u_midi_destination_create __pyx_string_tab[707]
#define __pyx_n_u_midi_device_add_entity __pyx_string_tab[708]
#define __pyx_n_u_midi_device_create __pyx_string_tab[709]
#define __pyx_n_u_midi_device_dispose __pyx_string_tab[710]
#define __pyx_n_u_midi_device_get_entity __pyx_string_tab[711]
#define __pyx_n_u_midi_device_get_name __pyx_string_tab[712]
#define __pyx_n_u_midi_device_get_number_of_entiti __pyx_string_tab[713]
#define __pyx_n_u_midi_device_list_add_device __pyx_string_tab[714]
#define __pyx_n_u_midi_device_list_dispose __pyx_string_tab[715]
#define __pyx_n_u_midi_device_list_get_device __pyx_string_tab[716]
#define __pyx_n_u_midi_device_list_get_number_of_d __pyx_string_tab[717]
#define __pyx_n_u_midi_device_new_entity __pyx_string_tab[718]
#define __pyx_n_u_midi_device_remove_entity __pyx_string_tab[719]
#define __pyx_n_u_midi_driver_enable_monitoring __pyx_string_tab[720]
#define __pyx_n_u_midi_endpoint_dispose __pyx_string_tab[721]
#define __pyx_n_u_midi_endpoint_get_name __pyx_string_tab[722]
#define __pyx_n_u_midi_endpoint_get_ref_cons __pyx_string_tab[723]
#define __pyx_n_u_midi_endpoint_set_ref_cons __pyx_string_tab[724]
#define __pyx_n_u_midi_entity_add_or_remove_endpoi __pyx_string_tab[725]
#define __pyx_n_u_midi_entity_get_destination __pyx_string_tab[726]
#define __pyx_n_u_midi_entity_get_name __pyx_string_tab[727]
#define __pyx_n_u_midi_entity_get_number_of_destin __pyx_string_tab[728]
#define __pyx_n_u_midi_entity_get_number_of_source __pyx_string_tab[729]
#define __pyx_n_u_midi_entity_get_source __pyx_string_tab[730]
#define __pyx_n_u_midi_external_device_create __pyx_string_tab[731]
#define __pyx_n_u_midi_get_destination __pyx_string_tab[732]
#define __pyx_n_u_midi_get_device __pyx_string_tab[733]
#define __pyx_n_u_midi_get_driver_device_list __pyx_string_tab[734]
#define __pyx_n_u_midi_get_driver_io_runloop __pyx_string_tab[735]
#define __pyx_n_u_midi_get_number_of_destinations __pyx_string_tab[736]
#define __pyx_n_u_midi_get_number_of_devices __pyx_string_tab[737]
#define __pyx_n_u_midi_get_number_of_sources __pyx_string_tab[738]
#define __pyx_n_u_midi_get_source __pyx_string_tab[739]
#define __pyx_n_u_midi_input_port_create __pyx_string_tab[740]
#define __pyx_n_u_midi_message_type_for_up_word __pyx_string_tab[741]
#define __pyx_n_u_midi_note_off __pyx_string_tab[742]
#define __pyx_n_u_midi_note_on __pyx_string_tab[743]
#define __pyx_n_u_midi_object_get_integer_property __pyx_string_tab[744]
#define __pyx_n_u_midi_object_get_manufacturer __pyx_string_tab[745]
#define __pyx_n_u_midi_object_get_model __pyx_string_tab[746]
#define __pyx_n_u_midi_object_get_name __pyx_string_tab[747]
#define __pyx_n_u_midi_object_get_string_property __pyx_string_tab[748]
#define __pyx_n_u_midi_object_set_integer_property __pyx_string_tab[749]
#define __pyx_n_u_midi_object_set_string_property __pyx_string_tab[750]
#define __pyx_n_u_midi_output_port_create __pyx_string_tab[751]
#define __pyx_n_u_midi_pitch_bend __pyx_string_tab[752]
#define __pyx_n_u_midi_port_connect_source __pyx_string_tab[753]
#define __pyx_n_u_midi_port_disconnect_source __pyx_string_tab[754]
#define __pyx_n_u_midi_port_dispose __pyx_string_tab[755]
#define __pyx_n_u_midi_program_change __pyx_string_tab[756]
#define __pyx_n_u_midi_send_data __pyx_string_tab[757]
#define __pyx_n_u_midi_setup_add_device __pyx_string_tab[758]
#define __pyx_n_u_midi_setup_add_external_device __pyx_string_tab[759]
#define __pyx_n_u_midi_setup_remove_device __pyx_string_tab[760]
#define __pyx_n_u_midi_setup_remove_external_devic __pyx_string_tab[761]
#define __pyx_n_u_midi_source_create __pyx_string_tab[762]
#define __pyx_n_u_midi_thru_connection_create __pyx_string_tab[763]
#define __pyx_n_u_midi_thru_connection_dispose __pyx_string_tab[764]
#define __pyx_n_u_midi_thru_connection_find __pyx_string_tab[765]
#define __pyx_n_u_midi_thru_connection_get_params __pyx_string_tab[766]
#define __pyx_n_u_midi_thru_connection_params_init __pyx_string_tab[767]
#define __pyx_n_u_midi_thru_connection_set_params __pyx_string_tab[768]
#define __pyx_n_u_model __pyx_string_tab[769]
#define __pyx_n_u_model_bytes __pyx_string_tab[770]
#define __pyx_n_u_module __pyx_string_tab[771]
#define __pyx_n_u_msb __pyx_string_tab[772]
#define __pyx_n_u_msg __pyx_string_tab[773]
#define __pyx_n_u_music_device_midi_event __pyx_string_tab[774]
#define __pyx_n_u_music_device_start_note __pyx_string_tab[775]
#define __pyx_n_u_music_device_stop_note __pyx_string_tab[776]
#define __pyx_n_u_music_device_sysex __pyx_string_tab[777]
#define __pyx_n_u_music_player_get_play_rate_scala __pyx_string_tab[778]
#define __pyx_n_u_music_player_get_sequence __pyx_string_tab[779]
#define __pyx_n_u_music_player_get_time __pyx_string_tab[780]
#define __pyx_n_u_music_player_is_playing __pyx_string_tab[781]
#define __pyx_n_u_music_player_preroll __pyx_string_tab[782]
#define __pyx_n_u_music_player_set_play_rate_scala __pyx_string_tab[783]
#define __pyx_n_u_music_player_set_sequence __pyx_string_tab[784]
#define __pyx_n_u_music_player_set_time __pyx_string_tab[785]
#define __pyx_n_u_music_player_start __pyx_string_tab[786]
#define __pyx_n_u_music_player_stop __pyx_string_tab[787]
#define __pyx_n_u_music_sequence_dispose_track __pyx_string_tab[788]
#define __pyx_n_u_music_sequence_file_load __pyx_string_tab[789]
#define __pyx_n_u_music_sequence_get_ind_track __pyx_string_tab[790]
#define __pyx_n_u_music_sequence_get_sequence_type __pyx_string_tab[791]
#define __pyx_n_u_music_sequence_get_tempo_track __pyx_string_tab[792]
#define __pyx_n_u_music_sequence_get_track_count __pyx_string_tab[793]
#define __pyx_n_u_music_sequence_new_track __pyx_string_tab[794]
#define __pyx_n_u_music_sequence_set_sequence_type __pyx_string_tab[795]
#define __pyx_n_u_music_track_new_extended_tempo_e __pyx_string_tab[796]
#define __pyx_n_u_music_track_new_midi_channel_eve __pyx_string_tab[797]
#define __pyx_n_u_music_track_new_midi_note_event __pyx_string_tab[798]
#define __pyx_n_u_n __pyx_string_tab[799]
#define __pyx_n_u_name __pyx_string_tab[800]
#define __pyx_n_u_name_2 __pyx_string_tab[801]
#define __pyx_n_u_name_bytes __pyx_string_tab[802]
#define __pyx_n_u_name_ref __pyx_string_tab[803]
#define __pyx_n_u_new_music_player __pyx_string_tab[804]
#define __pyx_n_u_new_music_sequence __pyx_string_tab[805]
#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[806]
#define __pyx_n_u_node __pyx_string_tab[807]
#define __pyx_n_u_node_id __pyx_string_tab[808]
#define __pyx_n_u_note __pyx_string_tab[809]
#define __pyx_n_u_noteNumber __pyx_string_tab[810]
#define __pyx_n_u_note_instance_id __pyx_string_tab[811]
#define __pyx_n_u_note_number __pyx_string_tab[812]
#define __pyx_n_u_note_transform __pyx_string_tab[813]
#define __pyx_n_u_numControlTransforms __pyx_string_tab[814]
#define __pyx_n_u_numMaps __pyx_string_tab[815]
#define __pyx_n_u_num_bytes __pyx_string_tab[816]
#define __pyx_n_u_num_connections __pyx_string_tab[817]
#define __pyx_n_u_num_controls __pyx_string_tab[818]
#define __pyx_n_u_num_destination_endpoints __pyx_string_tab[819]
#define __pyx_n_u_num_dests __pyx_string_tab[820]
#define __pyx_n_u_num_devices __pyx_string_tab[821]
#define __pyx_n_u_num_entities __pyx_string_tab[822]
#define __pyx_n_u_num_frames __pyx_string_tab[823]
#define __pyx_n_u_num_packets __pyx_string_tab[824]
#define __pyx_n_u_num_source_endpoints __pyx_string_tab[825]
#define __pyx_n_u_num_sources __pyx_string_tab[826]
#define __pyx_n_u_obj __pyx_string_tab[827]
#define __pyx_n_u_object_id __pyx_string_tab[828]
#define __pyx_n_u_offline __pyx_string_tab[829]
#define __pyx_n_u_offset_sample_frame __pyx_string_tab[830]
#define __pyx_kp_u_out_of_bounds_0 __pyx_string_tab[831]
#define __pyx_kp_u_out_of_range_0 __pyx_string_tab[832]
#define __pyx_n_u_output_buffer __pyx_string_tab[833]
#define __pyx_n_u_output_buffer_list __pyx_string_tab[834]
#define __pyx_n_u_output_buffer_size __pyx_string_tab[835]
#define __pyx_n_u_output_data_packet_size __pyx_string_tab[836]
#define __pyx_n_u_output_data_size __pyx_string_tab[837]
#define __pyx_n_u_output_packet_count __pyx_string_tab[838]
#define __pyx_n_u_owner_id_bytes __pyx_string_tab[839]
#define __pyx_n_u_packet __pyx_string_tab[840]
#define __pyx_n_u_packet_count __pyx_string_tab[841]
#define __pyx_n_u_packet_offset __pyx_string_tab[842]
#define __pyx_n_u_param __pyx_string_tab[843]
#define __pyx_n_u_param_id __pyx_string_tab[844]
#define __pyx_n_u_params __pyx_string_tab[845]
#define __pyx_n_u_params_size __pyx_string_tab[846]
#define __pyx_n_u_path_bytes __pyx_string_tab[847]
#define __pyx_n_u_permissions __pyx_string_tab[848]
#define __pyx_n_u_persistent_owner_id __pyx_string_tab[849]
#define __pyx_n_u_pitch __pyx_string_tab[850]
#define __pyx_n_u_pitchBend __pyx_string_tab[851]
#define __pyx_n_u_pktlist __pyx_string_tab[852]
#define __pyx_n_u_pktlist_size __pyx_string_tab[853]
#define __pyx_n_u_player __pyx_string_tab[854]
#define __pyx_n_u_pop __pyx_string_tab[855]
#define __pyx_n_u_port __pyx_string_tab[856]
#define __pyx_n_u_port_name __pyx_string_tab[857]
#define __pyx_n_u_port_name_bytes __pyx_string_tab[858]
#define __pyx_n_u_previous __pyx_string_tab[859]
#define __pyx_n_u_previous_component_id __pyx_string_tab[860]
#define __pyx_n_u_print __pyx_string_tab[861]
#define __pyx_n_u_private __pyx_string_tab[862]
#define __pyx_n_u_program __pyx_string_tab[863]
#define __pyx_n_u_programChange __pyx_string_tab[864]
#define __pyx_n_u_prop_bytes __pyx_string_tab[865]
#define __pyx_n_u_prop_id __pyx_string_tab[866]
#define __pyx_n_u_prop_size __pyx_string_tab[867]
#define __pyx_n_u_property_id __pyx_string_tab[868]
#define __pyx_n_u_property_name __pyx_string_tab[869]
#define __pyx_n_u_property_selector __pyx_string_tab[870]
#define __pyx_n_u_protocol __pyx_string_tab[871]
#define __pyx_n_u_pyx_state __pyx_string_tab[872]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[873]
#define __pyx_n_u_qualname __pyx_string_tab[874]
#define __pyx_n_u_queue __pyx_string_tab[875]
#define __pyx_n_u_queue_id __pyx_string_tab[876]
#define __pyx_n_u_range __pyx_string_tab[877]
#define __pyx_n_u_receiveChannels __pyx_string_tab[878]
#define __pyx_n_u_reduce __pyx_string_tab[879]
#define __pyx_n_u_reduce_cython __pyx_string_tab[880]
#define __pyx_n_u_reduce_ex __pyx_string_tab[881]
#define __pyx_n_u_ref1 __pyx_string_tab[882]
#define __pyx_n_u_ref2 __pyx_string_tab[883]
#define __pyx_n_u_release_velocity __pyx_string_tab[884]
#define __pyx_n_u_reserved __pyx_string_tab[885]
#define __pyx_n_u_reset_playback __pyx_string_tab[886]
#define __pyx_n_u_result __pyx_string_tab[887]
#define __pyx_n_u_return __pyx_string_tab[888]
#define __pyx_n_u_runloop __pyx_string_tab[889]
#define __pyx_n_u_sample_rate __pyx_string_tab[890]
#define __pyx_n_u_scale_rate __pyx_string_tab[891]
#define __pyx_n_u_scope __pyx_string_tab[892]
#define __pyx_n_u_self __pyx_string_tab[893]
#define __pyx_kp_u_self_audio_output_cannot_be_conv __pyx_string_tab[894]
#define __pyx_n_u_seq __pyx_string_tab[895]
#define __pyx_n_u_sequence __pyx_string_tab[896]
#define __pyx_n_u_sequence_type __pyx_string_tab[897]
#define __pyx_n_u_set_looping __pyx_string_tab[898]
#define __pyx_n_u_set_name __pyx_string_tab[899]
#define __pyx_n_u_set_object_id __pyx_string_tab[900]
#define __pyx_n_u_setstate __pyx_string_tab[901]
#define __pyx_n_u_setstate_cython __pyx_string_tab[902]
#define __pyx_n_u_setup_output __pyx_string_tab[903]
#define __pyx_kp_u_should_be_four_characters_only __pyx_string_tab[904]
#define __pyx_n_u_sound_id __pyx_string_tab[905]
#define __pyx_n_u_source __pyx_string_tab[906]
#define __pyx_n_u_source_format __pyx_string_tab[907]
#define __pyx_n_u_source_format_dict __pyx_string_tab[908]
#define __pyx_n_u_source_index __pyx_string_tab[909]
#define __pyx_n_u_source_node __pyx_string_tab[910]
#define __pyx_n_u_source_output __pyx_string_tab[911]
#define __pyx_n_u_sources __pyx_string_tab[912]
#define __pyx_n_u_specifier __pyx_string_tab[913]
#define __pyx_n_u_specifier_value __pyx_string_tab[914]
#define __pyx_kp_u_src_coremusic_capi_pyx __pyx_string_tab[915]
#define __pyx_n_u_src_format __pyx_string_tab[916]
#define __pyx_n_u_start __pyx_string_tab[917]
#define __pyx_n_u_start_packet __pyx_string_tab[918]
#define __pyx_n_u_status __pyx_string_tab[919]
#define __pyx_n_u_status_result __pyx_string_tab[920]
#define __pyx_n_u_stop __pyx_string_tab[921]
#define __pyx_n_u_str __pyx_string_tab[922]
#define __pyx_n_u_stream __pyx_string_tab[923]
#define __pyx_n_u_stream_id __pyx_string_tab[924]
#define __pyx_n_u_string_ref __pyx_string_tab[925]
#define __pyx_kp_u_stringsource __pyx_string_tab[926]
#define __pyx_n_u_subtype __pyx_string_tab[927]
#define __pyx_n_u_system_sound_id __pyx_string_tab[928]
#define __pyx_n_u_test __pyx_string_tab[929]
#define __pyx_n_u_test_error __pyx_string_tab[930]
#define __pyx_n_u_time __pyx_string_tab[931]
#define __pyx_n_u_timestamp __pyx_string_tab[932]
#define __pyx_n_u_track __pyx_string_tab[933]
#define __pyx_n_u_track_count __pyx_string_tab[934]
#define __pyx_n_u_track_index __pyx_string_tab[935]
#define __pyx_n_u_transform __pyx_string_tab[936]
#define __pyx_n_u_transmitChannels __pyx_string_tab[937]
#define __pyx_n_u_tuple __pyx_string_tab[938]
#define __pyx_n_u_type __pyx_string_tab[939]
#define __pyx_n_u_uint_data __pyx_string_tab[940]
#define __pyx_n_u_uniqueID __pyx_string_tab[941]
#define __pyx_n_u_unit __pyx_string_tab[942]
#define __pyx_n_u_url __pyx_string_tab[943]
#define __pyx_n_u_url_ref __pyx_string_tab[944]
#define __pyx_n_u_value __pyx_string_tab[945]
#define __pyx_n_u_valueMaps __pyx_string_tab[946]
#define __pyx_n_u_value_bytes __pyx_string_tab[947]
#define __pyx_n_u_velocity __pyx_string_tab[948]
#define __pyx_n_u_velocity_transform __pyx_string_tab[949]
#define __pyx_n_u_version __pyx_string_tab[950]
#define __pyx_n_u_word __pyx_string_tab[951]
#define __pyx_n_u_writable __pyx_string_tab[952]
/* #### 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);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  #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_CoreAudioObject);
  Py_CLEAR(clear_module_state->__pyx_type_9coremusic_4capi_CoreAudioObject);
  for (int i=0; i<17; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<408; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<953; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  Py_CLEAR(clear_module_state->__pyx_float_44100_0);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_8);
  Py_CLEAR(clear_module_state->__pyx_int_16);
  Py_CLEAR(clear_module_state->__pyx_int_24);
  Py_CLEAR(clear_module_state->__pyx_int_127);
  Py_CLEAR(clear_module_state->__pyx_int_255);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10860);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10861);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10862);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10863);
  Py_CLEAR(clear_module_state->__pyx_int_neg_10864);
  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);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  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_CoreAudioObject);
  Py_VISIT(traverse_module_state->__pyx_type_9coremusic_4capi_CoreAudioObject);
  for (int i=0; i<17; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<408; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<953; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_float_44100_0);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_2);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_4);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_8);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_16);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_24);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_127);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_255);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_10860);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_10861);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_10862);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_10863);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_10864);
  return 0;
}
#endif
/* #### Code section: module_code ### */

/* "coremusic/capi.pyx":11
 * from libc.string cimport memcpy, memset
 * 
 * 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, 11, __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, 11, __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, 11, __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, 11, __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, 11, __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, 11, __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, 11, __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":17
 *    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, 17, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 4);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_mstate_global->__pyx_kp_u_should_be_four_characters_only, 0, 0);
      __PYX_ERR(0, 17, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 17, __pyx_L1_error)
  #endif

  /* "coremusic/capi.pyx":18
 *    """
 *    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); if (unlikely(__pyx_t_3 == (Py_UCS4)-1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_code, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 18, __pyx_L1_error)

  /* "coremusic/capi.pyx":19
 *    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); if (unlikely(__pyx_t_5 == (Py_UCS4)-1)) __PYX_ERR(0, 19, __pyx_L1_error)

  /* "coremusic/capi.pyx":18
 *    """
 *    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); if (unlikely(__pyx_t_6 == (Py_UCS4)-1)) __PYX_ERR(0, 19, __pyx_L1_error)

  /* "coremusic/capi.pyx":19
 *    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, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (!(likely(PyLong_CheckExact(__pyx_t_7)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_7))) __PYX_ERR(0, 19, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":11
 * from libc.string cimport memcpy, memset
 * 
 * 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":21
 *            (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, 21, __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, 21, __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, 21, __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, 21, __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, 21, __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, 21, __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, 21, __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":27
 *     'TEXT'
 *     """
 *     return (             # <<<<<<<<<<<<<<
 *           chr((n >> 24) & 255)
 *         + chr((n >> 16) & 255)
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":28
 *     """
 *     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, 28, __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, 28, __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, 28, __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, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "coremusic/capi.pyx":29
 *     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, 29, __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, 29, __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, 29, __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, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlaceSafe(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __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":30
 *           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, 30, __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, 30, __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, 30, __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, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlaceSafe(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 30, __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":31
 *         + 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, 31, __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, 31, __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, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlaceSafe(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __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":21
 *            (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":34
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     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)");
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, 34, __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, 34, __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, 34, __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, 34, __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, 34, __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, 34, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_object_show", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 34, __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":35
 * 
 * def audio_object_show(int object_id):
 *     ca.AudioObjectShow(object_id)             # <<<<<<<<<<<<<<
 * 
 * def audio_hardware_unload() -> int:
*/
  AudioObjectShow(__pyx_v_object_id);

  /* "coremusic/capi.pyx":34
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     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":37
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     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");
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":38
 * 
 * def audio_hardware_unload() -> int:
 *     return ca.AudioHardwareUnload()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(AudioHardwareUnload()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 38, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":37
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     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":41
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     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");
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, 41, __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, 41, __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, 41, __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, 41, __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, 41, __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, 41, __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, 41, __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":42
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:
 *     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, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 42, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":41
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     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":46
 * 
 * # 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, 46, __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, 46, __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, 46, __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, 46, __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, 46, __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, 46, __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, 46, __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, 46, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 46, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 46, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 46, __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, 46, __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, 46, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __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, 46, __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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_object_get_property_data", 0);

  /* "coremusic/capi.pyx":53
 *     """
 *     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":58
 *     cdef bytes result
 * 
 *     address.mSelector = property_selector             # <<<<<<<<<<<<<<
 *     address.mScope = scope
 *     address.mElement = element
*/
  __pyx_v_address.mSelector = __pyx_v_property_selector;

  /* "coremusic/capi.pyx":59
 * 
 *     address.mSelector = property_selector
 *     address.mScope = scope             # <<<<<<<<<<<<<<
 *     address.mElement = element
 * 
*/
  __pyx_v_address.mScope = __pyx_v_scope;

  /* "coremusic/capi.pyx":60
 *     address.mSelector = property_selector
 *     address.mScope = scope
 *     address.mElement = element             # <<<<<<<<<<<<<<
 * 
 *     # Get the data size
*/
  __pyx_v_address.mElement = __pyx_v_element;

  /* "coremusic/capi.pyx":63
 * 
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")
*/
  __pyx_v_status = AudioObjectGetPropertyDataSize(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), (&__pyx_v_data_size));

  /* "coremusic/capi.pyx":64
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":65
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     if data_size == 0:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioObjectGetPropertyDataSize_f, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __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, 65, __pyx_L1_error)

    /* "coremusic/capi.pyx":64
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(object_id, &address, 0, <void*>0, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":67
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_data_size == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":68
 * 
 *     if data_size == 0:
 *         return b''             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b_;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":67
 *         raise RuntimeError(f"AudioObjectGetPropertyDataSize failed with status: {status}")
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":71
 * 
 *     # 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":72
 *     # 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":73
 *     buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __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, 73, __pyx_L1_error)

    /* "coremusic/capi.pyx":72
 *     # Allocate buffer
 *     buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":75
 *         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":76
 * 
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
*/
    __pyx_v_status = AudioObjectGetPropertyData(__pyx_v_object_id, (&__pyx_v_address), 0, ((void *)0), (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":77
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":78
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Copy to Python bytes object
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioObjectGetPropertyData_faile, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __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, 78, __pyx_L7_error)

      /* "coremusic/capi.pyx":77
 *     try:
 *         status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":81
 * 
 *         # 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, 81, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":82
 *         # 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":84
 *         return result
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_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_3); __pyx_t_3 = 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_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_L1_error;
    }
    __pyx_L6_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":46
 * 
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":87
 * 
 * 
 * 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_13audio_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_12audio_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_13audio_object_get_property_string = {"audio_object_get_property_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_13audio_object_get_property_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_12audio_object_get_property_string};
static PyObject *__pyx_pw_9coremusic_4capi_13audio_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, 87, __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, 87, __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, 87, __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, 87, __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, 87, __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, 87, __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, 87, __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, 87, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 87, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 87, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 87, __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, 87, __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, 87, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __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, 87, __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_12audio_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_12audio_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;
  char __pyx_v_buffer[0x400];
  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;
  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;
  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("audio_object_get_property_string", 0);

  /* "coremusic/capi.pyx":94
 *     """
 *     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":103
 *     cdef char* large_buffer
 * 
 *     address.mSelector = property_selector             # <<<<<<<<<<<<<<
 *     address.mScope = scope
 *     address.mElement = element
*/
  __pyx_v_address.mSelector = __pyx_v_property_selector;

  /* "coremusic/capi.pyx":104
 * 
 *     address.mSelector = property_selector
 *     address.mScope = scope             # <<<<<<<<<<<<<<
 *     address.mElement = element
 * 
*/
  __pyx_v_address.mScope = __pyx_v_scope;

  /* "coremusic/capi.pyx":105
 *     address.mSelector = property_selector
 *     address.mScope = scope
 *     address.mElement = element             # <<<<<<<<<<<<<<
 * 
 *     # Get the CFStringRef
*/
  __pyx_v_address.mElement = __pyx_v_element;

  /* "coremusic/capi.pyx":108
 * 
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
*/
  __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":109
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":110
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     if string_ref == <cf.CFStringRef>0:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioObjectGetPropertyData_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __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, 110, __pyx_L1_error)

    /* "coremusic/capi.pyx":109
 *     # Get the CFStringRef
 *     status = ca.AudioObjectGetPropertyData(object_id, &address, 0, <void*>0, &data_size, &string_ref)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":112
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
 *     if string_ref == <cf.CFStringRef>0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_string_ref == ((CFStringRef)0));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":113
 * 
 *     if string_ref == <cf.CFStringRef>0:
 *         return b''             # <<<<<<<<<<<<<<
 * 
 *     # Extract the C string from the CFStringRef
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b_;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":112
 *         raise RuntimeError(f"AudioObjectGetPropertyData failed with status: {status}")
 * 
 *     if string_ref == <cf.CFStringRef>0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":116
 * 
 *     # Extract the C string from the CFStringRef
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         result = buffer
 *         return result
*/
  __pyx_t_1 = (CFStringGetCString(__pyx_v_string_ref, __pyx_v_buffer, (sizeof(__pyx_v_buffer)), kCFStringEncodingUTF8) != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":117
 *     # Extract the C string from the CFStringRef
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *         result = buffer             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":118
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):
 *         result = buffer
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     # Fallback: try to get length and allocate larger buffer
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":116
 * 
 *     # Extract the C string from the CFStringRef
 *     if cf.CFStringGetCString(string_ref, buffer, sizeof(buffer), cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         result = buffer
 *         return result
*/
  }

  /* "coremusic/capi.pyx":121
 * 
 *     # Fallback: try to get length and allocate larger buffer
 *     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":122
 *     # Fallback: try to get length and allocate larger buffer
 *     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":123
 *     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":125
 *     large_buffer = <char*>malloc(max_size + 1)
 * 
 *     if large_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_large_buffer == ((char *)0));
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":126
 * 
 *     if large_buffer == <char*>0:
 *         return b''             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b_;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":125
 *     large_buffer = <char*>malloc(max_size + 1)
 * 
 *     if large_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":128
 *         return b''
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":129
 * 
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             result = large_buffer
 *             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":130
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer             # <<<<<<<<<<<<<<
 *             return result
 *         else:
*/
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_large_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":131
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):
 *             result = large_buffer
 *             return result             # <<<<<<<<<<<<<<
 *         else:
 *             return b''
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L7_return;

      /* "coremusic/capi.pyx":129
 * 
 *     try:
 *         if cf.CFStringGetCString(string_ref, large_buffer, max_size + 1, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *             result = large_buffer
 *             return result
*/
    }

    /* "coremusic/capi.pyx":133
 *             return result
 *         else:
 *             return b''             # <<<<<<<<<<<<<<
 *     finally:
 *         free(large_buffer)
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_);
      __pyx_r = __pyx_mstate_global->__pyx_kp_b_;
      goto __pyx_L7_return;
    }
  }

  /* "coremusic/capi.pyx":135
 *             return b''
 *     finally:
 *         free(large_buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L8_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_3); __pyx_t_3 = 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_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_large_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_L7_return: {
      __pyx_t_16 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_large_buffer);
      __pyx_r = __pyx_t_16;
      __pyx_t_16 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":87
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":138
 * 
 * 
 * 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_15audio_hardware_get_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_14audio_hardware_get_devices, "audio_hardware_get_devices() -> list\n\nGet list of all audio device IDs");
static PyMethodDef __pyx_mdef_9coremusic_4capi_15audio_hardware_get_devices = {"audio_hardware_get_devices", (PyCFunction)__pyx_pw_9coremusic_4capi_15audio_hardware_get_devices, METH_NOARGS, __pyx_doc_9coremusic_4capi_14audio_hardware_get_devices};
static PyObject *__pyx_pw_9coremusic_4capi_15audio_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_14audio_hardware_get_devices(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_14audio_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":141
 *     """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":145
 *     cdef ca.AudioObjectID* device_ids
 *     cdef int device_count
 *     cdef list devices = []             # <<<<<<<<<<<<<<
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDevices
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_devices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":147
 *     cdef list devices = []
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDevices             # <<<<<<<<<<<<<<
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
*/
  __pyx_v_address.mSelector = kAudioHardwarePropertyDevices;

  /* "coremusic/capi.pyx":148
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDevices
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal             # <<<<<<<<<<<<<<
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
 * 
*/
  __pyx_v_address.mScope = 0;

  /* "coremusic/capi.pyx":149
 *     address.mSelector = ca.kAudioHardwarePropertyDevices
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain             # <<<<<<<<<<<<<<
 * 
 *     # Get the data size
*/
  __pyx_v_address.mElement = 0;

  /* "coremusic/capi.pyx":152
 * 
 *     # 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":153
 *     # 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":154
 *     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, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":153
 *     # Get the data size
 *     status = ca.AudioObjectGetPropertyDataSize(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":156
 *         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, 156, __pyx_L1_error)
  }
  __pyx_v_device_count = (__pyx_v_data_size / __pyx_t_3);

  /* "coremusic/capi.pyx":157
 * 
 *     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":158
 *     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, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":157
 * 
 *     device_count = data_size // sizeof(ca.AudioObjectID)
 *     if device_count == 0:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":161
 * 
 *     # 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":162
 *     # 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":163
 *     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, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":162
 *     # Allocate buffer
 *     device_ids = <ca.AudioObjectID*>malloc(data_size)
 *     if device_ids == NULL:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }

  /* "coremusic/capi.pyx":165
 *         return []
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, device_ids)
 *         if status == 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":166
 * 
 *     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":167
 *     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":168
 *         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":169
 *         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, 169, __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, 169, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "coremusic/capi.pyx":167
 *     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":171
 *                 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":173
 *         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":138
 * 
 * 
 * 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":176
 * 
 * 
 * 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_17audio_hardware_get_default_output_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_16audio_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_17audio_hardware_get_default_output_device = {"audio_hardware_get_default_output_device", (PyCFunction)__pyx_pw_9coremusic_4capi_17audio_hardware_get_default_output_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_16audio_hardware_get_default_output_device};
static PyObject *__pyx_pw_9coremusic_4capi_17audio_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_16audio_hardware_get_default_output_device(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_16audio_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":179
 *     """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":180
 *     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":183
 *     cdef cf.OSStatus status
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultOutputDevice             # <<<<<<<<<<<<<<
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
*/
  __pyx_v_address.mSelector = kAudioHardwarePropertyDefaultOutputDevice;

  /* "coremusic/capi.pyx":184
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultOutputDevice
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal             # <<<<<<<<<<<<<<
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
 * 
*/
  __pyx_v_address.mScope = 0;

  /* "coremusic/capi.pyx":185
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultOutputDevice
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain             # <<<<<<<<<<<<<<
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
*/
  __pyx_v_address.mElement = 0;

  /* "coremusic/capi.pyx":187
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
 * 
 *     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":188
 * 
 *     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":189
 *     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":188
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "coremusic/capi.pyx":191
 *         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, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyLong_CheckExact(__pyx_t_2)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(0, 191, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":176
 * 
 * 
 * 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":194
 * 
 * 
 * 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_19audio_hardware_get_default_input_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_18audio_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_19audio_hardware_get_default_input_device = {"audio_hardware_get_default_input_device", (PyCFunction)__pyx_pw_9coremusic_4capi_19audio_hardware_get_default_input_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_18audio_hardware_get_default_input_device};
static PyObject *__pyx_pw_9coremusic_4capi_19audio_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_18audio_hardware_get_default_input_device(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_18audio_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":197
 *     """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":198
 *     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":201
 *     cdef cf.OSStatus status
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultInputDevice             # <<<<<<<<<<<<<<
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
*/
  __pyx_v_address.mSelector = kAudioHardwarePropertyDefaultInputDevice;

  /* "coremusic/capi.pyx":202
 * 
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultInputDevice
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal             # <<<<<<<<<<<<<<
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
 * 
*/
  __pyx_v_address.mScope = 0;

  /* "coremusic/capi.pyx":203
 *     address.mSelector = ca.kAudioHardwarePropertyDefaultInputDevice
 *     address.mScope = 0  # kAudioObjectPropertyScopeGlobal
 *     address.mElement = 0  # kAudioObjectPropertyElementMain             # <<<<<<<<<<<<<<
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
*/
  __pyx_v_address.mElement = 0;

  /* "coremusic/capi.pyx":205
 *     address.mElement = 0  # kAudioObjectPropertyElementMain
 * 
 *     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":206
 * 
 *     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":207
 *     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":206
 * 
 *     status = ca.AudioObjectGetPropertyData(ca.kAudioObjectSystemObject, &address, 0, NULL, &data_size, &device_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "coremusic/capi.pyx":209
 *         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, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyLong_CheckExact(__pyx_t_2)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":194
 * 
 * 
 * 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":213
 * 
 * # 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_21audio_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_20audio_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_21audio_file_open_url = {"audio_file_open_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_21audio_file_open_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_20audio_file_open_url};
static PyObject *__pyx_pw_9coremusic_4capi_21audio_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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __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, 213, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_20audio_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_20audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_open_url", 0);

  /* "coremusic/capi.pyx":217
 *     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, 217, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":221
 *     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, 221, __pyx_L1_error)

  /* "coremusic/capi.pyx":222
 *         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, 222, __pyx_L1_error)

  /* "coremusic/capi.pyx":219
 *     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":226
 *     )
 * 
 *     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":227
 * 
 *     if not url_ref:
 *         raise ValueError("Could not create URL from file path")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioFileOpenURL(
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_6 = __pyx_builtin_ValueError; 
    __pyx_t_7 = 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(__pyx_t_6, __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_1)) __PYX_ERR(0, 227, __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, 227, __pyx_L1_error)

    /* "coremusic/capi.pyx":226
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  }

  /* "coremusic/capi.pyx":229
 *         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":236
 *     )
 * 
 *     cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":238
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileOpenURL failed with status: {status}")
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":239
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileOpenURL failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>audio_file
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_8 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileOpenURL_failed_with_sta, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __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;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __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, 239, __pyx_L1_error)

    /* "coremusic/capi.pyx":238
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileOpenURL failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":241
 *         raise RuntimeError(f"AudioFileOpenURL failed with status: {status}")
 * 
 *     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, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":213
 * 
 * # 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":244
 * 
 * 
 * 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_23audio_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_22audio_file_close, "audio_file_close(long audio_file_id)\n\nClose an audio file");
static PyMethodDef __pyx_mdef_9coremusic_4capi_23audio_file_close = {"audio_file_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_23audio_file_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_22audio_file_close};
static PyObject *__pyx_pw_9coremusic_4capi_23audio_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, 244, __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, 244, __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, 244, __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, 244, __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, 244, __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, 244, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_file_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 244, __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_22audio_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_22audio_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;
  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_close", 0);

  /* "coremusic/capi.pyx":246
 * 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":247
 *     """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(f"AudioFileClose failed with status: {status}")
*/
  __pyx_v_status = AudioFileClose(__pyx_v_audio_file);

  /* "coremusic/capi.pyx":248
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileClose failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":249
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileClose failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileClose_failed_with_statu, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __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, 249, __pyx_L1_error)

    /* "coremusic/capi.pyx":248
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
 *     cdef cf.OSStatus status = at.AudioFileClose(audio_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileClose failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":250
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileClose failed with status: {status}")
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":244
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":253
 * 
 * 
 * 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_25audio_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_24audio_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_25audio_file_get_property = {"audio_file_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_25audio_file_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_24audio_file_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_25audio_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, 253, __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, 253, __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, 253, __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, 253, __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, 253, __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, 253, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 253, __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, 253, __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, 253, __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, 253, __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_24audio_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_24audio_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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_get_property", 0);

  /* "coremusic/capi.pyx":255
 * 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":256
 *     """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":257
 *     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":260
 * 
 *     # 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":267
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileGetPropertyInfo failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":268
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileGetPropertyInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property data
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileGetPropertyInfo_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __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, 268, __pyx_L1_error)

    /* "coremusic/capi.pyx":267
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileGetPropertyInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":271
 * 
 *     # 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":272
 *     # 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":273
 *     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_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __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, 273, __pyx_L1_error)

    /* "coremusic/capi.pyx":272
 *     # 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":275
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioFileGetProperty(
 *             audio_file,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":276
 * 
 *     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":283
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":284
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioFileGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Return the data as bytes
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileGetProperty_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __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, 284, __pyx_L6_error)

      /* "coremusic/capi.pyx":283
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":287
 * 
 *         # 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, 287, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":290
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_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_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_L1_error;
    }
    __pyx_L5_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":253
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":293
 * 
 * 
 * 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_27audio_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_26audio_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_27audio_file_read_packets = {"audio_file_read_packets", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_27audio_file_read_packets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_26audio_file_read_packets};
static PyObject *__pyx_pw_9coremusic_4capi_27audio_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, 293, __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, 293, __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, 293, __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, 293, __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, 293, __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, 293, __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, 293, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 293, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 293, __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, 293, __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, 293, __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, 293, __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, 293, __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_26audio_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_26audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_read_packets", 0);

  /* "coremusic/capi.pyx":295
 * 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":296
 *     """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":297
 *     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":300
 * 
 *     # 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":301
 *     # 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":303
 *     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":310
 *     )
 * 
 *     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":311
 * 
 *     if status != 0:
 *         raise RuntimeError(f"Could not get maximum packet size: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_get_maximum_packet_siz, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __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, 311, __pyx_L1_error)

    /* "coremusic/capi.pyx":310
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Could not get maximum packet size: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":314
 * 
 *     # 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":315
 *     # 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":316
 *     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":317
 *     cdef char* buffer = <char*>malloc(buffer_size)
 *     if not buffer:
 *         raise MemoryError("Could not allocate buffer for packet data")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_pa};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __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, 317, __pyx_L1_error)

    /* "coremusic/capi.pyx":316
 *     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":319
 *         raise MemoryError("Could not allocate buffer for packet data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         num_bytes = buffer_size
 *         status = at.AudioFileReadPackets(
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":320
 * 
 *     try:
 *         num_bytes = buffer_size             # <<<<<<<<<<<<<<
 *         status = at.AudioFileReadPackets(
 *             audio_file,
*/
    __pyx_v_num_bytes = __pyx_v_buffer_size;

    /* "coremusic/capi.pyx":321
 *     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":331
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileReadPackets failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":332
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioFileReadPackets failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return buffer[:num_bytes], packet_count
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileReadPackets_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __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, 332, __pyx_L6_error)

      /* "coremusic/capi.pyx":331
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileReadPackets failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":334
 *             raise RuntimeError(f"AudioFileReadPackets failed with status: {status}")
 * 
 *         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, 334, __pyx_L6_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, 334, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L6_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, 334, __pyx_L6_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 334, __pyx_L6_error);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":337
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_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_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_L1_error;
    }
    __pyx_L5_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":293
 * 
 * 
 * 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_XDECREF(__pyx_t_6);
  __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":342
 * # 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":348
 *     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":354
 *     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_29audio_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_28audio_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_29audio_file_stream_open = {"audio_file_stream_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_29audio_file_stream_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_28audio_file_stream_open};
static PyObject *__pyx_pw_9coremusic_4capi_29audio_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, 354, __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, 354, __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, 354, __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, 354, __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, 354, __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_28audio_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_28audio_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;
  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_file_stream_open", 0);

  /* "coremusic/capi.pyx":362
 *         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, 362, __pyx_L1_error)

  /* "coremusic/capi.pyx":358
 *     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":366
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamOpen failed with status: {status}")
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":367
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamOpen failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>stream_id
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamOpen_failed_with, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __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, 367, __pyx_L1_error)

    /* "coremusic/capi.pyx":366
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamOpen failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":369
 *         raise RuntimeError(f"AudioFileStreamOpen failed with status: {status}")
 * 
 *     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, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":354
 *     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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":372
 * 
 * 
 * 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_31audio_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_30audio_file_stream_close, "audio_file_stream_close(long stream_id)\n\nClose an AudioFileStream parser");
static PyMethodDef __pyx_mdef_9coremusic_4capi_31audio_file_stream_close = {"audio_file_stream_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_31audio_file_stream_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_30audio_file_stream_close};
static PyObject *__pyx_pw_9coremusic_4capi_31audio_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, 372, __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, 372, __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, 372, __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, 372, __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, 372, __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, 372, __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, 372, __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_30audio_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_30audio_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;
  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_close", 0);

  /* "coremusic/capi.pyx":374
 * 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":375
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamClose failed with status: {status}")
*/
  __pyx_v_status = AudioFileStreamClose(__pyx_v_stream);

  /* "coremusic/capi.pyx":376
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamClose failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":377
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamClose failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamClose_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __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, 377, __pyx_L1_error)

    /* "coremusic/capi.pyx":376
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
 *     cdef cf.OSStatus status = at.AudioFileStreamClose(stream)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamClose failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":378
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamClose failed with status: {status}")
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":372
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":381
 * 
 * 
 * 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_33audio_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_32audio_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_33audio_file_stream_parse_bytes = {"audio_file_stream_parse_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_33audio_file_stream_parse_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_32audio_file_stream_parse_bytes};
static PyObject *__pyx_pw_9coremusic_4capi_33audio_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, 381, __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, 381, __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, 381, __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, 381, __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, 381, __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, 381, __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, 381, __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, 381, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 381, __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, 381, __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, 381, __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, 381, __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, 381, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_32audio_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_32audio_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;
  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_file_stream_parse_bytes", 0);

  /* "coremusic/capi.pyx":383
 * 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":384
 *     """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, 384, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 384, __pyx_L1_error)
  __pyx_v_data_ptr = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":385
 *     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, 385, __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, 385, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_2;

  /* "coremusic/capi.pyx":387
 *     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":394
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamParseBytes failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":395
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamParseBytes failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamParseBytes_failed, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __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, 395, __pyx_L1_error)

    /* "coremusic/capi.pyx":394
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamParseBytes failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":397
 *         raise RuntimeError(f"AudioFileStreamParseBytes failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":381
 * 
 * 
 * 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":400
 * 
 * 
 * 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_35audio_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_34audio_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_35audio_file_stream_get_property = {"audio_file_stream_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_35audio_file_stream_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_34audio_file_stream_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_35audio_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, 400, __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, 400, __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, 400, __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, 400, __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, 400, __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, 400, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 400, __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, 400, __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, 400, __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, 400, __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_34audio_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_34audio_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;
  AudioStreamBasicDescription *__pyx_v_desc;
  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;
  size_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_file_stream_get_property", 0);

  /* "coremusic/capi.pyx":402
 * 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":403
 *     """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":404
 *     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":407
 * 
 *     # 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":414
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamGetPropertyInfo failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":415
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamGetPropertyInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property data
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamGetPropertyInfo_f, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __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, 415, __pyx_L1_error)

    /* "coremusic/capi.pyx":414
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamGetPropertyInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":418
 * 
 *     # 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":419
 *     # 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":420
 *     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_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __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, 420, __pyx_L1_error)

    /* "coremusic/capi.pyx":419
 *     # 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":422
 *         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":424
 *     cdef cf.UInt32 actual_size = data_size
 *     cdef at.AudioStreamBasicDescription* asbd
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioFileStreamGetProperty(
 *             stream,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":425
 *     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":432
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileStreamGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":433
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioFileStreamGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Handle different property types
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamGetProperty_faile, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __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, 433, __pyx_L6_error)

      /* "coremusic/capi.pyx":432
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioFileStreamGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":436
 * 
 *         # Handle different property types
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:             # <<<<<<<<<<<<<<
 *             # Return AudioStreamBasicDescription as dict
 *             desc = <at.AudioStreamBasicDescription*>buffer
*/
    switch (__pyx_v_property_id) {
      case kAudioFileStreamProperty_DataFormat:

      /* "coremusic/capi.pyx":438
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:
 *             # Return AudioStreamBasicDescription as dict
 *             desc = <at.AudioStreamBasicDescription*>buffer             # <<<<<<<<<<<<<<
 *             return {
 *                 'sample_rate': desc.mSampleRate,
*/
      __pyx_v_desc = ((AudioStreamBasicDescription *)__pyx_v_buffer);

      /* "coremusic/capi.pyx":439
 *             # Return AudioStreamBasicDescription as dict
 *             desc = <at.AudioStreamBasicDescription*>buffer
 *             return {             # <<<<<<<<<<<<<<
 *                 'sample_rate': desc.mSampleRate,
 *                 'format_id': desc.mFormatID,
*/
      __Pyx_XDECREF(__pyx_r);

      /* "coremusic/capi.pyx":440
 *             desc = <at.AudioStreamBasicDescription*>buffer
 *             return {
 *                 'sample_rate': desc.mSampleRate,             # <<<<<<<<<<<<<<
 *                 'format_id': desc.mFormatID,
 *                 'format_flags': desc.mFormatFlags,
*/
      __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_desc->mSampleRate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":441
 *             return {
 *                 'sample_rate': desc.mSampleRate,
 *                 'format_id': desc.mFormatID,             # <<<<<<<<<<<<<<
 *                 'format_flags': desc.mFormatFlags,
 *                 'bytes_per_packet': desc.mBytesPerPacket,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mFormatID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":442
 *                 'sample_rate': desc.mSampleRate,
 *                 'format_id': desc.mFormatID,
 *                 'format_flags': desc.mFormatFlags,             # <<<<<<<<<<<<<<
 *                 'bytes_per_packet': desc.mBytesPerPacket,
 *                 'frames_per_packet': desc.mFramesPerPacket,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mFormatFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":443
 *                 'format_id': desc.mFormatID,
 *                 'format_flags': desc.mFormatFlags,
 *                 'bytes_per_packet': desc.mBytesPerPacket,             # <<<<<<<<<<<<<<
 *                 'frames_per_packet': desc.mFramesPerPacket,
 *                 'bytes_per_frame': desc.mBytesPerFrame,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mBytesPerPacket); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":444
 *                 'format_flags': desc.mFormatFlags,
 *                 'bytes_per_packet': desc.mBytesPerPacket,
 *                 'frames_per_packet': desc.mFramesPerPacket,             # <<<<<<<<<<<<<<
 *                 'bytes_per_frame': desc.mBytesPerFrame,
 *                 'channels_per_frame': desc.mChannelsPerFrame,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mFramesPerPacket); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":445
 *                 'bytes_per_packet': desc.mBytesPerPacket,
 *                 'frames_per_packet': desc.mFramesPerPacket,
 *                 'bytes_per_frame': desc.mBytesPerFrame,             # <<<<<<<<<<<<<<
 *                 'channels_per_frame': desc.mChannelsPerFrame,
 *                 'bits_per_channel': desc.mBitsPerChannel,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mBytesPerFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":446
 *                 'frames_per_packet': desc.mFramesPerPacket,
 *                 'bytes_per_frame': desc.mBytesPerFrame,
 *                 'channels_per_frame': desc.mChannelsPerFrame,             # <<<<<<<<<<<<<<
 *                 'bits_per_channel': desc.mBitsPerChannel,
 *                 'reserved': desc.mReserved
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mChannelsPerFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":447
 *                 'bytes_per_frame': desc.mBytesPerFrame,
 *                 'channels_per_frame': desc.mChannelsPerFrame,
 *                 'bits_per_channel': desc.mBitsPerChannel,             # <<<<<<<<<<<<<<
 *                 'reserved': desc.mReserved
 *             }
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mBitsPerChannel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "coremusic/capi.pyx":448
 *                 'channels_per_frame': desc.mChannelsPerFrame,
 *                 'bits_per_channel': desc.mBitsPerChannel,
 *                 'reserved': desc.mReserved             # <<<<<<<<<<<<<<
 *             }
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,
*/
      __pyx_t_4 = __Pyx_PyLong_From_UInt32(__pyx_v_desc->mReserved); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_reserved, __pyx_t_4) < (0)) __PYX_ERR(0, 440, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":436
 * 
 *         # Handle different property types
 *         if property_id == at.kAudioFileStreamProperty_DataFormat:             # <<<<<<<<<<<<<<
 *             # Return AudioStreamBasicDescription as dict
 *             desc = <at.AudioStreamBasicDescription*>buffer
*/
      break;
      case kAudioFileStreamProperty_ReadyToProducePackets:

      /* "coremusic/capi.pyx":450
 *                 'reserved': desc.mReserved
 *             }
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
*/
      case kAudioFileStreamProperty_FileFormat:

      /* "coremusic/capi.pyx":451
 *             }
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,
 *                            at.kAudioFileStreamProperty_FileFormat,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
 *                            at.kAudioFileStreamProperty_AudioDataPacketCount,
*/
      case kAudioFileStreamProperty_MaximumPacketSize:

      /* "coremusic/capi.pyx":452
 *         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":453
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
 *                            at.kAudioFileStreamProperty_AudioDataPacketCount,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_BitRate]:
 *             # Return scalar values
*/
      case kAudioFileStreamProperty_BitRate:

      /* "coremusic/capi.pyx":456
 *                            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":457
 *             # 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, 457, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L5_return;

        /* "coremusic/capi.pyx":456
 *                            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":459
 *                 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, 459, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L5_return;

        /* "coremusic/capi.pyx":458
 *             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":450
 *                 'reserved': desc.mReserved
 *             }
 *         elif property_id in [at.kAudioFileStreamProperty_ReadyToProducePackets,             # <<<<<<<<<<<<<<
 *                            at.kAudioFileStreamProperty_FileFormat,
 *                            at.kAudioFileStreamProperty_MaximumPacketSize,
*/
      break;
      case kAudioFileStreamProperty_AudioDataByteCount:

      /* "coremusic/capi.pyx":460
 *             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":463
 *                            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, 463, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":460
 *             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":466
 *         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, 466, __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":469
 * 
 *     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_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_3); __pyx_t_3 = 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_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_L1_error;
    }
    __pyx_L5_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;
    }
    __pyx_L7:;
  }

  /* "coremusic/capi.pyx":400
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":472
 * 
 * 
 * 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_37audio_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_36audio_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_37audio_file_stream_seek = {"audio_file_stream_seek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_37audio_file_stream_seek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_36audio_file_stream_seek};
static PyObject *__pyx_pw_9coremusic_4capi_37audio_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, 472, __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, 472, __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, 472, __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, 472, __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, 472, __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, 472, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 472, __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, 472, __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, 472, __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, 472, __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_36audio_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_36audio_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;
  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_seek", 0);

  /* "coremusic/capi.pyx":474
 * 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":475
 *     """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":477
 *     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":479
 *     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":486
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamSeek failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":487
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioFileStreamSeek failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioFileStreamSeek_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __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, 487, __pyx_L1_error)

    /* "coremusic/capi.pyx":486
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioFileStreamSeek failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":489
 *         raise RuntimeError(f"AudioFileStreamSeek failed with status: {status}")
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'byte_offset': byte_offset,
 *         'flags': flags,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":490
 * 
 *     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, 490, __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, 490, __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, 490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":491
 *     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, 491, __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, 490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":492
 *         'byte_offset': byte_offset,
 *         'flags': flags,
 *         'is_estimated': bool(flags & at.kAudioFileStreamSeekFlag_OffsetIsEstimated)             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_4 = __Pyx_PyLong_From_int((__pyx_v_flags & kAudioFileStreamSeekFlag_OffsetIsEstimated)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __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, 490, __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":472
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":500
 * # ============================================================================
 * 
 * def audio_converter_new(source_format: dict, dest_format: dict) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AudioConverter
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_39audio_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_38audio_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_39audio_converter_new = {"audio_converter_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_39audio_converter_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_38audio_converter_new};
static PyObject *__pyx_pw_9coremusic_4capi_39audio_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, 500, __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, 500, __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, 500, __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, 500, __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, 500, __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, 500, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 500, __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, 500, __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, 500, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest_format), (&PyDict_Type), 0, "dest_format", 2))) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_38audio_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_38audio_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
  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_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_new", 0);

  /* "coremusic/capi.pyx":515
 * 
 *     # Set up source format
 *     src_format.mSampleRate = source_format.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     src_format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     src_format.mFormatFlags = source_format.get('format_flags',
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_mstate_global->__pyx_float_44100_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __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, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mSampleRate = __pyx_t_2;

  /* "coremusic/capi.pyx":516
 *     # Set up source format
 *     src_format.mSampleRate = source_format.get('sample_rate', 44100.0)
 *     src_format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)             # <<<<<<<<<<<<<<
 *     src_format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
*/
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __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, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_src_format.mFormatID = __pyx_t_4;

  /* "coremusic/capi.pyx":518
 *     src_format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     src_format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)             # <<<<<<<<<<<<<<
 *     src_format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     src_format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
*/
  __pyx_t_3 = __Pyx_PyLong_From_int((kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "coremusic/capi.pyx":517
 *     src_format.mSampleRate = source_format.get('sample_rate', 44100.0)
 *     src_format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     src_format.mFormatFlags = source_format.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     src_format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __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, 517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mFormatFlags = __pyx_t_5;

  /* "coremusic/capi.pyx":519
 *     src_format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     src_format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     src_format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     src_format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __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, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mBytesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":520
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     src_format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     src_format.mFramesPerPacket = source_format.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     src_format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     src_format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __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, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mFramesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":521
 *     src_format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     src_format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     src_format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     src_format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     src_format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __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, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mBytesPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":522
 *     src_format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     src_format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     src_format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     src_format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
 *     src_format.mReserved = 0
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __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, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mChannelsPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":523
 *     src_format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     src_format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     src_format.mBitsPerChannel = source_format.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     src_format.mReserved = 0
 * 
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __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, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_src_format.mBitsPerChannel = __pyx_t_6;

  /* "coremusic/capi.pyx":524
 *     src_format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     src_format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
 *     src_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     # Set up destination format
*/
  __pyx_v_src_format.mReserved = 0;

  /* "coremusic/capi.pyx":527
 * 
 *     # Set up destination format
 *     dst_format.mSampleRate = dest_format.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     dst_format.mFormatID = dest_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     dst_format.mFormatFlags = dest_format.get('format_flags',
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_mstate_global->__pyx_float_44100_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __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, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mSampleRate = __pyx_t_2;

  /* "coremusic/capi.pyx":528
 *     # Set up destination format
 *     dst_format.mSampleRate = dest_format.get('sample_rate', 44100.0)
 *     dst_format.mFormatID = dest_format.get('format_id', ca.kAudioFormatLinearPCM)             # <<<<<<<<<<<<<<
 *     dst_format.mFormatFlags = dest_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
*/
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __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, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_dst_format.mFormatID = __pyx_t_4;

  /* "coremusic/capi.pyx":530
 *     dst_format.mFormatID = dest_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     dst_format.mFormatFlags = dest_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)             # <<<<<<<<<<<<<<
 *     dst_format.mBytesPerPacket = dest_format.get('bytes_per_packet', 4)
 *     dst_format.mFramesPerPacket = dest_format.get('frames_per_packet', 1)
*/
  __pyx_t_3 = __Pyx_PyLong_From_int((kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "coremusic/capi.pyx":529
 *     dst_format.mSampleRate = dest_format.get('sample_rate', 44100.0)
 *     dst_format.mFormatID = dest_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     dst_format.mFormatFlags = dest_format.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     dst_format.mBytesPerPacket = dest_format.get('bytes_per_packet', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __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, 529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mFormatFlags = __pyx_t_5;

  /* "coremusic/capi.pyx":531
 *     dst_format.mFormatFlags = dest_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     dst_format.mBytesPerPacket = dest_format.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     dst_format.mFramesPerPacket = dest_format.get('frames_per_packet', 1)
 *     dst_format.mBytesPerFrame = dest_format.get('bytes_per_frame', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __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, 531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mBytesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":532
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     dst_format.mBytesPerPacket = dest_format.get('bytes_per_packet', 4)
 *     dst_format.mFramesPerPacket = dest_format.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     dst_format.mBytesPerFrame = dest_format.get('bytes_per_frame', 4)
 *     dst_format.mChannelsPerFrame = dest_format.get('channels_per_frame', 2)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __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, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mFramesPerPacket = __pyx_t_6;

  /* "coremusic/capi.pyx":533
 *     dst_format.mBytesPerPacket = dest_format.get('bytes_per_packet', 4)
 *     dst_format.mFramesPerPacket = dest_format.get('frames_per_packet', 1)
 *     dst_format.mBytesPerFrame = dest_format.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     dst_format.mChannelsPerFrame = dest_format.get('channels_per_frame', 2)
 *     dst_format.mBitsPerChannel = dest_format.get('bits_per_channel', 16)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __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, 533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mBytesPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":534
 *     dst_format.mFramesPerPacket = dest_format.get('frames_per_packet', 1)
 *     dst_format.mBytesPerFrame = dest_format.get('bytes_per_frame', 4)
 *     dst_format.mChannelsPerFrame = dest_format.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     dst_format.mBitsPerChannel = dest_format.get('bits_per_channel', 16)
 *     dst_format.mReserved = 0
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __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, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mChannelsPerFrame = __pyx_t_6;

  /* "coremusic/capi.pyx":535
 *     dst_format.mBytesPerFrame = dest_format.get('bytes_per_frame', 4)
 *     dst_format.mChannelsPerFrame = dest_format.get('channels_per_frame', 2)
 *     dst_format.mBitsPerChannel = dest_format.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     dst_format.mReserved = 0
 * 
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_dest_format, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __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, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dst_format.mBitsPerChannel = __pyx_t_6;

  /* "coremusic/capi.pyx":536
 *     dst_format.mChannelsPerFrame = dest_format.get('channels_per_frame', 2)
 *     dst_format.mBitsPerChannel = dest_format.get('bits_per_channel', 16)
 *     dst_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
*/
  __pyx_v_dst_format.mReserved = 0;

  /* "coremusic/capi.pyx":538
 *     dst_format.mReserved = 0
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterNew failed with status: {status}")
*/
  __pyx_v_status = AudioConverterNew((&__pyx_v_src_format), (&__pyx_v_dst_format), (&__pyx_v_converter));

  /* "coremusic/capi.pyx":539
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterNew failed with status: {status}")
 * 
*/
  __pyx_t_7 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_7)) {

    /* "coremusic/capi.pyx":540
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterNew failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>converter
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_8 = __pyx_builtin_RuntimeError; 
    __pyx_t_9 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterNew_failed_with_st, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __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, 540, __pyx_L1_error)

    /* "coremusic/capi.pyx":539
 * 
 *     cdef cf.OSStatus status = at.AudioConverterNew(&src_format, &dst_format, &converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterNew failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":542
 *         raise RuntimeError(f"AudioConverterNew failed with status: {status}")
 * 
 *     return <long>converter             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_long(((long)__pyx_v_converter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":500
 * # ============================================================================
 * 
 * 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_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":545
 * 
 * 
 * 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_41audio_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_40audio_converter_dispose, "audio_converter_dispose(long converter_id)\n\nDispose of an AudioConverter");
static PyMethodDef __pyx_mdef_9coremusic_4capi_41audio_converter_dispose = {"audio_converter_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_41audio_converter_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_40audio_converter_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_41audio_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, 545, __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, 545, __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, 545, __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, 545, __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, 545, __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, 545, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 545, __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_40audio_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_40audio_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;
  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_dispose", 0);

  /* "coremusic/capi.pyx":547
 * 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":548
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterDispose failed with status: {status}")
*/
  __pyx_v_status = AudioConverterDispose(__pyx_v_converter);

  /* "coremusic/capi.pyx":549
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":550
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterDispose_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __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, 550, __pyx_L1_error)

    /* "coremusic/capi.pyx":549
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterDispose(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":545
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":553
 * 
 * 
 * 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_43audio_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_42audio_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_43audio_converter_convert_buffer = {"audio_converter_convert_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_43audio_converter_convert_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_42audio_converter_convert_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_43audio_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, 553, __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, 553, __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, 553, __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, 553, __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, 553, __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, 553, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 553, __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, 553, __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, 553, __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, 553, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_42audio_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_42audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  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;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_convert_buffer", 0);

  /* "coremusic/capi.pyx":563
 *         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":564
 *     """
 *     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, 564, __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, 564, __pyx_L1_error)
  __pyx_v_input_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":565
 *     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":566
 *     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, 566, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_input_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 566, __pyx_L1_error)
  __pyx_v_input_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":567
 *     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":570
 *     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":571
 * 
 *     if output_buffer == <char*>0:
 *         raise MemoryError("Failed to allocate output buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_6 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 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(__pyx_t_6, __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, 571, __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, 571, __pyx_L1_error)

    /* "coremusic/capi.pyx":570
 *     cdef cf.OSStatus status
 * 
 *     if output_buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate output buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":573
 *         raise MemoryError("Failed to allocate output buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioConverterConvertBuffer(
 *             converter,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":574
 * 
 *     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":582
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterConvertBuffer failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":583
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioConverterConvertBuffer failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         result = output_buffer[:output_data_size]
*/
      __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_8 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 583, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterConvertBuffer_fail, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 583, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __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;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __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, 583, __pyx_L5_error)

      /* "coremusic/capi.pyx":582
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterConvertBuffer failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":585
 *             raise RuntimeError(f"AudioConverterConvertBuffer failed with status: {status}")
 * 
 *         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, 585, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_result = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":586
 * 
 *         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":588
 *         return result
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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;
      {
        free(__pyx_v_output_buffer);
      }
      __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_19 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_output_buffer);
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":553
 * 
 * 
 * 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":591
 * 
 * 
 * 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_45audio_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_44audio_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_45audio_converter_get_property = {"audio_converter_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_45audio_converter_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_44audio_converter_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_45audio_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, 591, __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, 591, __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, 591, __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, 591, __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, 591, __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, 591, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 591, __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, 591, __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, 591, __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, 591, __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_44audio_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_44audio_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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_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;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_converter_get_property", 0);

  /* "coremusic/capi.pyx":601
 *         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":602
 *     """
 *     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":606
 * 
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")
*/
  __pyx_v_status = AudioConverterGetPropertyInfo(__pyx_v_converter, __pyx_v_property_id, (&__pyx_v_data_size), NULL);

  /* "coremusic/capi.pyx":607
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":608
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     if data_size == 0:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterGetPropertyInfo_fa, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __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, 608, __pyx_L1_error)

    /* "coremusic/capi.pyx":607
 *     # Get property size
 *     status = at.AudioConverterGetPropertyInfo(converter, property_id, &data_size, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":610
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  __pyx_t_1 = (__pyx_v_data_size == 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":611
 * 
 *     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_);
    __pyx_r = __pyx_mstate_global->__pyx_kp_b_;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":610
 *         raise RuntimeError(f"AudioConverterGetPropertyInfo failed with status: {status}")
 * 
 *     if data_size == 0:             # <<<<<<<<<<<<<<
 *         return b''
 * 
*/
  }

  /* "coremusic/capi.pyx":613
 *         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":614
 * 
 *     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":615
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __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, 615, __pyx_L1_error)

    /* "coremusic/capi.pyx":614
 * 
 *     cdef char* buffer = <char*>malloc(data_size)
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":617
 *         raise MemoryError("Failed to allocate buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":618
 * 
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"AudioConverterGetProperty failed with status: {status}")
*/
    __pyx_v_status = AudioConverterGetProperty(__pyx_v_converter, __pyx_v_property_id, (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":619
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":620
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(f"AudioConverterGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         result = buffer[:data_size]
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterGetProperty_failed, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __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, 620, __pyx_L7_error)

      /* "coremusic/capi.pyx":619
 *     try:
 *         status = at.AudioConverterGetProperty(converter, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":622
 *             raise RuntimeError(f"AudioConverterGetProperty failed with status: {status}")
 * 
 *         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, 622, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":623
 * 
 *         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":625
 *         return result
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_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_3); __pyx_t_3 = 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_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_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":591
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":628
 * 
 * 
 * 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_47audio_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_46audio_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_47audio_converter_set_property = {"audio_converter_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_47audio_converter_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_46audio_converter_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_47audio_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, 628, __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, 628, __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, 628, __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, 628, __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, 628, __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, 628, __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, 628, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 628, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 628, __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, 628, __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, 628, __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, 628, __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, 628, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_46audio_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_46audio_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;
  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_converter_set_property", 0);

  /* "coremusic/capi.pyx":636
 *         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":637
 *     """
 *     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, 637, __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, 637, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":638
 *     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, 638, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":640
 *     cdef char* buffer = <char*><bytes>data
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterSetProperty failed with status: {status}")
*/
  __pyx_v_status = AudioConverterSetProperty(__pyx_v_converter, __pyx_v_property_id, __pyx_v_data_size, __pyx_v_buffer);

  /* "coremusic/capi.pyx":641
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterSetProperty failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":642
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterSetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterSetProperty_failed, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __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, 642, __pyx_L1_error)

    /* "coremusic/capi.pyx":641
 * 
 *     cdef cf.OSStatus status = at.AudioConverterSetProperty(converter, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterSetProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":628
 * 
 * 
 * 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":645
 * 
 * 
 * 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_49audio_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_48audio_converter_reset, "audio_converter_reset(long converter_id)\n\nReset an AudioConverter to its initial state");
static PyMethodDef __pyx_mdef_9coremusic_4capi_49audio_converter_reset = {"audio_converter_reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_49audio_converter_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_48audio_converter_reset};
static PyObject *__pyx_pw_9coremusic_4capi_49audio_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, 645, __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, 645, __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, 645, __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, 645, __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, 645, __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, 645, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_converter_reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 645, __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_48audio_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_48audio_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;
  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_reset", 0);

  /* "coremusic/capi.pyx":647
 * 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":648
 *     """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(f"AudioConverterReset failed with status: {status}")
*/
  __pyx_v_status = AudioConverterReset(__pyx_v_converter);

  /* "coremusic/capi.pyx":649
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterReset failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":650
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:
 *         raise RuntimeError(f"AudioConverterReset failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterReset_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __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, 650, __pyx_L1_error)

    /* "coremusic/capi.pyx":649
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
 *     cdef cf.OSStatus status = at.AudioConverterReset(converter)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioConverterReset failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":645
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":666
 * 
 * 
 * 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":691
 *     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":692
 * 
 *     if user_data == NULL:
 *         return -50  # paramErr             # <<<<<<<<<<<<<<
 * 
 *     data = <AudioConverterCallbackData*>user_data
*/
    __pyx_r = -50;
    goto __pyx_L0;

    /* "coremusic/capi.pyx":691
 *     cdef cf.UInt32 offset
 * 
 *     if user_data == NULL:             # <<<<<<<<<<<<<<
 *         return -50  # paramErr
 * 
*/
  }

  /* "coremusic/capi.pyx":694
 *         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":695
 * 
 *     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":698
 * 
 *     # 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":699
 *     # 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":700
 *     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":701
 *     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":699
 *     # 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":703
 *         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":704
 * 
 *     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":707
 * 
 *     # 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":710
 * 
 *     # 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":713
 * 
 *     # 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":714
 *     # 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":715
 *     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":716
 *         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":717
 *         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":713
 * 
 *     # 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":720
 * 
 *     # 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":721
 *     # 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":723
 *     num_packets[0] = packets_to_provide
 * 
 *     return 0  # noErr             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":666
 * 
 * 
 * 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":726
 * 
 * 
 * def audio_converter_fill_complex_buffer(             # <<<<<<<<<<<<<<
 *     long converter_id,
 *     bytes input_data,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_51audio_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_50audio_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_51audio_converter_fill_complex_buffer = {"audio_converter_fill_complex_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_51audio_converter_fill_complex_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_50audio_converter_fill_complex_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_51audio_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, 726, __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, 726, __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, 726, __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, 726, __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, 726, __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, 726, __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, 726, __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, 726, __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, 726, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 726, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 726, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 726, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 726, __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, 727, __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, 729, __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, 730, __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, 726, __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, 728, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format_dict), (&PyDict_Type), 1, "source_format_dict", 1))) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_50audio_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_50audio_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;
  Float64 __pyx_t_5;
  AudioFormatID __pyx_t_6;
  AudioFormatFlags __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  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;
  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("audio_converter_fill_complex_buffer", 0);

  /* "coremusic/capi.pyx":755
 *         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":758
 *     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":766
 * 
 *     # 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, 766, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_input_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 766, __pyx_L1_error)
  __pyx_v_input_ptr = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":769
 * 
 *     # 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":770
 *     # 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, 770, __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, 770, __pyx_L1_error)
  __pyx_v_callback_data.input_buffer_size = __pyx_t_2;

  /* "coremusic/capi.pyx":771
 *     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":772
 *     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":773
 *     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
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 773, __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, 773, __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, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.packet_size = __pyx_t_4;

  /* "coremusic/capi.pyx":776
 * 
 *     # Fill source format structure
 *     callback_data.source_format.mSampleRate = source_format_dict['sample_rate']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mFormatID = source_format_dict['format_id']
 *     callback_data.source_format.mFormatFlags = source_format_dict['format_flags']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 776, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_sample_rate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == ((Float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mSampleRate = __pyx_t_5;

  /* "coremusic/capi.pyx":777
 *     # Fill source format structure
 *     callback_data.source_format.mSampleRate = source_format_dict['sample_rate']
 *     callback_data.source_format.mFormatID = source_format_dict['format_id']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mFormatFlags = source_format_dict['format_flags']
 *     callback_data.source_format.mBytesPerPacket = source_format_dict['bytes_per_packet']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 777, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_format_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_6 == ((AudioFormatID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mFormatID = __pyx_t_6;

  /* "coremusic/capi.pyx":778
 *     callback_data.source_format.mSampleRate = source_format_dict['sample_rate']
 *     callback_data.source_format.mFormatID = source_format_dict['format_id']
 *     callback_data.source_format.mFormatFlags = source_format_dict['format_flags']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mBytesPerPacket = source_format_dict['bytes_per_packet']
 *     callback_data.source_format.mFramesPerPacket = source_format_dict['frames_per_packet']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 778, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_format_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyLong_As_UInt32(__pyx_t_3); if (unlikely((__pyx_t_7 == ((AudioFormatFlags)-1)) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mFormatFlags = __pyx_t_7;

  /* "coremusic/capi.pyx":779
 *     callback_data.source_format.mFormatID = source_format_dict['format_id']
 *     callback_data.source_format.mFormatFlags = source_format_dict['format_flags']
 *     callback_data.source_format.mBytesPerPacket = source_format_dict['bytes_per_packet']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mFramesPerPacket = source_format_dict['frames_per_packet']
 *     callback_data.source_format.mBytesPerFrame = source_format_dict['bytes_per_frame']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 779, __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, 779, __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, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mBytesPerPacket = __pyx_t_4;

  /* "coremusic/capi.pyx":780
 *     callback_data.source_format.mFormatFlags = source_format_dict['format_flags']
 *     callback_data.source_format.mBytesPerPacket = source_format_dict['bytes_per_packet']
 *     callback_data.source_format.mFramesPerPacket = source_format_dict['frames_per_packet']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mBytesPerFrame = source_format_dict['bytes_per_frame']
 *     callback_data.source_format.mChannelsPerFrame = source_format_dict['channels_per_frame']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 780, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_frames_per_packet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __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, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mFramesPerPacket = __pyx_t_4;

  /* "coremusic/capi.pyx":781
 *     callback_data.source_format.mBytesPerPacket = source_format_dict['bytes_per_packet']
 *     callback_data.source_format.mFramesPerPacket = source_format_dict['frames_per_packet']
 *     callback_data.source_format.mBytesPerFrame = source_format_dict['bytes_per_frame']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mChannelsPerFrame = source_format_dict['channels_per_frame']
 *     callback_data.source_format.mBitsPerChannel = source_format_dict['bits_per_channel']
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 781, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_bytes_per_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __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, 781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mBytesPerFrame = __pyx_t_4;

  /* "coremusic/capi.pyx":782
 *     callback_data.source_format.mFramesPerPacket = source_format_dict['frames_per_packet']
 *     callback_data.source_format.mBytesPerFrame = source_format_dict['bytes_per_frame']
 *     callback_data.source_format.mChannelsPerFrame = source_format_dict['channels_per_frame']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mBitsPerChannel = source_format_dict['bits_per_channel']
 *     callback_data.source_format.mReserved = 0
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 782, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_channels_per_frame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __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, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mChannelsPerFrame = __pyx_t_4;

  /* "coremusic/capi.pyx":783
 *     callback_data.source_format.mBytesPerFrame = source_format_dict['bytes_per_frame']
 *     callback_data.source_format.mChannelsPerFrame = source_format_dict['channels_per_frame']
 *     callback_data.source_format.mBitsPerChannel = source_format_dict['bits_per_channel']             # <<<<<<<<<<<<<<
 *     callback_data.source_format.mReserved = 0
 * 
*/
  if (unlikely(__pyx_v_source_format_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 783, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_source_format_dict, __pyx_mstate_global->__pyx_n_u_bits_per_channel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __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, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_callback_data.source_format.mBitsPerChannel = __pyx_t_4;

  /* "coremusic/capi.pyx":784
 *     callback_data.source_format.mChannelsPerFrame = source_format_dict['channels_per_frame']
 *     callback_data.source_format.mBitsPerChannel = source_format_dict['bits_per_channel']
 *     callback_data.source_format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     # Allocate output buffer (estimate size generously)
*/
  __pyx_v_callback_data.source_format.mReserved = 0;

  /* "coremusic/capi.pyx":788
 *     # 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, 788, __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, 788, __pyx_L1_error)
  __pyx_v_output_buffer_size = (__pyx_t_2 * 4);

  /* "coremusic/capi.pyx":789
 *     # 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":790
 *     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_8 = (__pyx_v_output_buffer == NULL);
  if (unlikely(__pyx_t_8)) {

    /* "coremusic/capi.pyx":791
 *     output_buffer = <char*>malloc(output_buffer_size)
 *     if output_buffer == NULL:
 *         raise MemoryError("Failed to allocate output buffer")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate and initialize AudioBufferList
*/
    __pyx_t_9 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_10 = __pyx_builtin_MemoryError; 
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_output_buffer};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __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, 791, __pyx_L1_error)

    /* "coremusic/capi.pyx":790
 *     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":794
 * 
 *     # 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":795
 *     # 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_8 = (__pyx_v_output_buffer_list == NULL);
  if (unlikely(__pyx_t_8)) {

    /* "coremusic/capi.pyx":796
 *     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":797
 *     if output_buffer_list == NULL:
 *         free(output_buffer)
 *         raise MemoryError("Failed to allocate AudioBufferList")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_10 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_9 = __pyx_builtin_MemoryError; 
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_AudioBufferLi};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __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, 797, __pyx_L1_error)

    /* "coremusic/capi.pyx":795
 *     # 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":799
 *         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":800
 * 
 *     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":801
 *     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":802
 *         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":803
 *         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":806
 * 
 *         # 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":815
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterFillComplexBuffer failed with status: {status}")
 * 
*/
    __pyx_t_8 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_8)) {

      /* "coremusic/capi.pyx":816
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioConverterFillComplexBuffer failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Extract result
*/
      __pyx_t_9 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_10 = __pyx_builtin_RuntimeError; 
      __pyx_t_12 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 816, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 816, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioConverterFillComplexBuffer, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 816, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_12};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 816, __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, 816, __pyx_L6_error)

      /* "coremusic/capi.pyx":815
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioConverterFillComplexBuffer failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":819
 * 
 *         # 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":820
 *         # 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, 820, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":822
 *         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, 822, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 822, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 822, __pyx_L6_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 822, __pyx_L6_error);
    __pyx_t_3 = 0;
    __pyx_r = ((PyObject*)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":825
 * 
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 *         free(output_buffer_list)
 * 
*/
  /*finally:*/ {
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      __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_XGOTREF(__pyx_t_22);
      __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        free(__pyx_v_output_buffer);

        /* "coremusic/capi.pyx":826
 *     finally:
 *         free(output_buffer)
 *         free(output_buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        free(__pyx_v_output_buffer_list);
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L5_return: {
      __pyx_t_23 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":825
 * 
 *     finally:
 *         free(output_buffer)             # <<<<<<<<<<<<<<
 *         free(output_buffer_list)
 * 
*/
      free(__pyx_v_output_buffer);

      /* "coremusic/capi.pyx":826
 *     finally:
 *         free(output_buffer)
 *         free(output_buffer_list)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      free(__pyx_v_output_buffer_list);
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":726
 * 
 * 
 * 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __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":830
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_53get_audio_converter_property_min_input_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_52get_audio_converter_property_min_input_buffer_size, "get_audio_converter_property_min_input_buffer_size() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_53get_audio_converter_property_min_input_buffer_size = {"get_audio_converter_property_min_input_buffer_size", (PyCFunction)__pyx_pw_9coremusic_4capi_53get_audio_converter_property_min_input_buffer_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_52get_audio_converter_property_min_input_buffer_size};
static PyObject *__pyx_pw_9coremusic_4capi_53get_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_52get_audio_converter_property_min_input_buffer_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_52get_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":831
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:
 *     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, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 831, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":830
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     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":833
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_55get_audio_converter_property_min_output_buffer_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_54get_audio_converter_property_min_output_buffer_size, "get_audio_converter_property_min_output_buffer_size() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_55get_audio_converter_property_min_output_buffer_size = {"get_audio_converter_property_min_output_buffer_size", (PyCFunction)__pyx_pw_9coremusic_4capi_55get_audio_converter_property_min_output_buffer_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_54get_audio_converter_property_min_output_buffer_size};
static PyObject *__pyx_pw_9coremusic_4capi_55get_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_54get_audio_converter_property_min_output_buffer_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_54get_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":834
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:
 *     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, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 834, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":833
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     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":836
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_57get_audio_converter_property_max_input_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_56get_audio_converter_property_max_input_packet_size, "get_audio_converter_property_max_input_packet_size() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_57get_audio_converter_property_max_input_packet_size = {"get_audio_converter_property_max_input_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_57get_audio_converter_property_max_input_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_56get_audio_converter_property_max_input_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_57get_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_56get_audio_converter_property_max_input_packet_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_56get_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":837
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:
 *     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, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 837, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":836
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     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":839
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_59get_audio_converter_property_max_output_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_58get_audio_converter_property_max_output_packet_size, "get_audio_converter_property_max_output_packet_size() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_59get_audio_converter_property_max_output_packet_size = {"get_audio_converter_property_max_output_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_59get_audio_converter_property_max_output_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_58get_audio_converter_property_max_output_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_59get_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_58get_audio_converter_property_max_output_packet_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_58get_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":840
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:
 *     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, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 840, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":839
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     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":842
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_61get_audio_converter_property_sample_rate_converter_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_60get_audio_converter_property_sample_rate_converter_quality, "get_audio_converter_property_sample_rate_converter_quality() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_61get_audio_converter_property_sample_rate_converter_quality = {"get_audio_converter_property_sample_rate_converter_quality", (PyCFunction)__pyx_pw_9coremusic_4capi_61get_audio_converter_property_sample_rate_converter_quality, METH_NOARGS, __pyx_doc_9coremusic_4capi_60get_audio_converter_property_sample_rate_converter_quality};
static PyObject *__pyx_pw_9coremusic_4capi_61get_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_60get_audio_converter_property_sample_rate_converter_quality(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_60get_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":843
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:
 *     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, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 843, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":842
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     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":845
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterCodecQuality
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_63get_audio_converter_property_codec_quality(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_62get_audio_converter_property_codec_quality, "get_audio_converter_property_codec_quality() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_63get_audio_converter_property_codec_quality = {"get_audio_converter_property_codec_quality", (PyCFunction)__pyx_pw_9coremusic_4capi_63get_audio_converter_property_codec_quality, METH_NOARGS, __pyx_doc_9coremusic_4capi_62get_audio_converter_property_codec_quality};
static PyObject *__pyx_pw_9coremusic_4capi_63get_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_62get_audio_converter_property_codec_quality(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_62get_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":846
 * 
 * def get_audio_converter_property_codec_quality() -> int:
 *     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, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 846, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":845
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     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":848
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Max
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_65get_audio_converter_quality_max(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_64get_audio_converter_quality_max, "get_audio_converter_quality_max() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_65get_audio_converter_quality_max = {"get_audio_converter_quality_max", (PyCFunction)__pyx_pw_9coremusic_4capi_65get_audio_converter_quality_max, METH_NOARGS, __pyx_doc_9coremusic_4capi_64get_audio_converter_quality_max};
static PyObject *__pyx_pw_9coremusic_4capi_65get_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_64get_audio_converter_quality_max(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_64get_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":849
 * 
 * def get_audio_converter_quality_max() -> int:
 *     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, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 849, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":848
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     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":851
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_High
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_67get_audio_converter_quality_high(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_66get_audio_converter_quality_high, "get_audio_converter_quality_high() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_67get_audio_converter_quality_high = {"get_audio_converter_quality_high", (PyCFunction)__pyx_pw_9coremusic_4capi_67get_audio_converter_quality_high, METH_NOARGS, __pyx_doc_9coremusic_4capi_66get_audio_converter_quality_high};
static PyObject *__pyx_pw_9coremusic_4capi_67get_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_66get_audio_converter_quality_high(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_66get_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":852
 * 
 * def get_audio_converter_quality_high() -> int:
 *     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, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 852, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":851
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     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":854
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Medium
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_69get_audio_converter_quality_medium(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_68get_audio_converter_quality_medium, "get_audio_converter_quality_medium() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_69get_audio_converter_quality_medium = {"get_audio_converter_quality_medium", (PyCFunction)__pyx_pw_9coremusic_4capi_69get_audio_converter_quality_medium, METH_NOARGS, __pyx_doc_9coremusic_4capi_68get_audio_converter_quality_medium};
static PyObject *__pyx_pw_9coremusic_4capi_69get_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_68get_audio_converter_quality_medium(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_68get_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":855
 * 
 * def get_audio_converter_quality_medium() -> int:
 *     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, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 855, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":854
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     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":857
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Low
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_71get_audio_converter_quality_low(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_70get_audio_converter_quality_low, "get_audio_converter_quality_low() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_71get_audio_converter_quality_low = {"get_audio_converter_quality_low", (PyCFunction)__pyx_pw_9coremusic_4capi_71get_audio_converter_quality_low, METH_NOARGS, __pyx_doc_9coremusic_4capi_70get_audio_converter_quality_low};
static PyObject *__pyx_pw_9coremusic_4capi_71get_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_70get_audio_converter_quality_low(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_70get_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":858
 * 
 * def get_audio_converter_quality_low() -> int:
 *     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, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 858, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":857
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     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":860
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Min
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_73get_audio_converter_quality_min(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_72get_audio_converter_quality_min, "get_audio_converter_quality_min() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_73get_audio_converter_quality_min = {"get_audio_converter_quality_min", (PyCFunction)__pyx_pw_9coremusic_4capi_73get_audio_converter_quality_min, METH_NOARGS, __pyx_doc_9coremusic_4capi_72get_audio_converter_quality_min};
static PyObject *__pyx_pw_9coremusic_4capi_73get_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_72get_audio_converter_quality_min(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_72get_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":861
 * 
 * def get_audio_converter_quality_min() -> int:
 *     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, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 861, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":860
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     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":868
 * # ============================================================================
 * 
 * def extended_audio_file_open_url(str file_path) -> int:             # <<<<<<<<<<<<<<
 *     """Open an audio file with ExtendedAudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_75extended_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_74extended_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_75extended_audio_file_open_url = {"extended_audio_file_open_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_75extended_audio_file_open_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_74extended_audio_file_open_url};
static PyObject *__pyx_pw_9coremusic_4capi_75extended_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, 868, __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, 868, __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, 868, __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, 868, __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, 868, __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, 868, __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, 868, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_74extended_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_74extended_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;
  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("extended_audio_file_open_url", 0);

  /* "coremusic/capi.pyx":877
 *         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, 877, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __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, 877, __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":878
 *     """
 *     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":881
 *     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":882
 * 
 *     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":883
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_create_URL_from_path, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __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_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __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, 883, __pyx_L1_error)

    /* "coremusic/capi.pyx":881
 *     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":885
 *         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":887
 *     cdef cf.OSStatus status = at.ExtAudioFileOpenURL(url, &ext_file)
 * 
 *     cf.CFRelease(url)             # <<<<<<<<<<<<<<
 *     cf.CFRelease(cf_path)
 * 
*/
  CFRelease(__pyx_v_url);

  /* "coremusic/capi.pyx":888
 * 
 *     cf.CFRelease(url)
 *     cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_cf_path);

  /* "coremusic/capi.pyx":890
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileOpenURL failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":891
 * 
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileOpenURL failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>ext_file
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_7 = __pyx_builtin_RuntimeError; 
    __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileOpenURL_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __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, 891, __pyx_L1_error)

    /* "coremusic/capi.pyx":890
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileOpenURL failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":893
 *         raise RuntimeError(f"ExtAudioFileOpenURL failed with status: {status}")
 * 
 *     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, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":868
 * # ============================================================================
 * 
 * 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_XDECREF(__pyx_t_7);
  __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":896
 * 
 * 
 * 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_77extended_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_76extended_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_77extended_audio_file_create_with_url = {"extended_audio_file_create_with_url", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_77extended_audio_file_create_with_url, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_76extended_audio_file_create_with_url};
static PyObject *__pyx_pw_9coremusic_4capi_77extended_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, 896, __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, 896, __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, 896, __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, 896, __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, 896, __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, 896, __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, 896, __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, 896, __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, 896, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 896, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 896, __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, 896, __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, 897, __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, 896, __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, 896, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source_format), (&PyDict_Type), 0, "source_format", 2))) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_76extended_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_76extended_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
  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;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  Float64 __pyx_t_9;
  AudioFormatID __pyx_t_10;
  AudioFormatFlags __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_create_with_url", 0);

  /* "coremusic/capi.pyx":909
 *         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.AudioStreamBasicDescription format
*/
  if (unlikely(__pyx_v_file_path == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 909, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __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, 909, __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":910
 *     """
 *     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.AudioStreamBasicDescription format
 *     cdef at.ExtAudioFileRef ext_file
*/
  __pyx_v_url = CFURLCreateWithFileSystemPath(NULL, __pyx_v_cf_path, kCFURLPOSIXPathStyle, 0);

  /* "coremusic/capi.pyx":914
 *     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":915
 * 
 *     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":916
 *     if url == NULL:
 *         cf.CFRelease(cf_path)
 *         raise ValueError(f"Failed to create URL from path: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *     # Set up audio format
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_create_URL_from_path, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __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_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __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, 916, __pyx_L1_error)

    /* "coremusic/capi.pyx":914
 *     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":919
 * 
 *     # Set up audio format
 *     format.mSampleRate = source_format.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = source_format.get('format_flags',
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_mstate_global->__pyx_float_44100_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_9 == ((Float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mSampleRate = __pyx_t_9;

  /* "coremusic/capi.pyx":920
 *     # Set up audio format
 *     format.mSampleRate = source_format.get('sample_rate', 44100.0)
 *     format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)             # <<<<<<<<<<<<<<
 *     format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
*/
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __Pyx_PyLong_As_UInt32(__pyx_t_5); if (unlikely((__pyx_t_10 == ((AudioFormatID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_format.mFormatID = __pyx_t_10;

  /* "coremusic/capi.pyx":922
 *     format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)             # <<<<<<<<<<<<<<
 *     format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
*/
  __pyx_t_5 = __Pyx_PyLong_From_int((kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "coremusic/capi.pyx":921
 *     format.mSampleRate = source_format.get('sample_rate', 44100.0)
 *     format.mFormatID = source_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = source_format.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_11 == ((AudioFormatFlags)-1)) && PyErr_Occurred())) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mFormatFlags = __pyx_t_11;

  /* "coremusic/capi.pyx":923
 *     format.mFormatFlags = source_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBytesPerPacket = __pyx_t_12;

  /* "coremusic/capi.pyx":924
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = source_format.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mFramesPerPacket = __pyx_t_12;

  /* "coremusic/capi.pyx":925
 *     format.mBytesPerPacket = source_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBytesPerFrame = __pyx_t_12;

  /* "coremusic/capi.pyx":926
 *     format.mFramesPerPacket = source_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
 *     format.mReserved = 0
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mChannelsPerFrame = __pyx_t_12;

  /* "coremusic/capi.pyx":927
 *     format.mBytesPerFrame = source_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = source_format.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     format.mReserved = 0
 * 
*/
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_source_format, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_12 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBitsPerChannel = __pyx_t_12;

  /* "coremusic/capi.pyx":928
 *     format.mChannelsPerFrame = source_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = source_format.get('bits_per_channel', 16)
 *     format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileCreateWithURL(
*/
  __pyx_v_format.mReserved = 0;

  /* "coremusic/capi.pyx":930
 *     format.mReserved = 0
 * 
 *     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":939
 *     )
 * 
 *     cf.CFRelease(url)             # <<<<<<<<<<<<<<
 *     cf.CFRelease(cf_path)
 * 
*/
  CFRelease(__pyx_v_url);

  /* "coremusic/capi.pyx":940
 * 
 *     cf.CFRelease(url)
 *     cf.CFRelease(cf_path)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_cf_path);

  /* "coremusic/capi.pyx":942
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileCreateWithURL failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":943
 * 
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileCreateWithURL failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>ext_file
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_7 = __pyx_builtin_RuntimeError; 
    __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileCreateWithURL_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __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, 943, __pyx_L1_error)

    /* "coremusic/capi.pyx":942
 *     cf.CFRelease(cf_path)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileCreateWithURL failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":945
 *         raise RuntimeError(f"ExtAudioFileCreateWithURL failed with status: {status}")
 * 
 *     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, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 945, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":896
 * 
 * 
 * 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_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":948
 * 
 * 
 * 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_79extended_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_78extended_audio_file_dispose, "extended_audio_file_dispose(long ext_file_id)\n\nDispose of an ExtendedAudioFile");
static PyMethodDef __pyx_mdef_9coremusic_4capi_79extended_audio_file_dispose = {"extended_audio_file_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_79extended_audio_file_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_78extended_audio_file_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_79extended_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, 948, __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, 948, __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, 948, __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, 948, __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, 948, __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, 948, __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, 948, __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_78extended_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_78extended_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;
  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_dispose", 0);

  /* "coremusic/capi.pyx":950
 * 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":951
 *     """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(f"ExtAudioFileDispose failed with status: {status}")
*/
  __pyx_v_status = ExtAudioFileDispose(__pyx_v_ext_file);

  /* "coremusic/capi.pyx":952
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":953
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileDispose_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __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, 953, __pyx_L1_error)

    /* "coremusic/capi.pyx":952
 *     cdef at.ExtAudioFileRef ext_file = <at.ExtAudioFileRef>ext_file_id
 *     cdef cf.OSStatus status = at.ExtAudioFileDispose(ext_file)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":948
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":956
 * 
 * 
 * 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_81extended_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_80extended_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_81extended_audio_file_read = {"extended_audio_file_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_81extended_audio_file_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_80extended_audio_file_read};
static PyObject *__pyx_pw_9coremusic_4capi_81extended_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, 956, __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, 956, __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, 956, __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, 956, __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, 956, __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, 956, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 956, __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, 956, __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, 956, __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, 956, __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_80extended_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_80extended_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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  UInt32 __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;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extended_audio_file_read", 0);

  /* "coremusic/capi.pyx":966
 *         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":967
 *     """
 *     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":968
 *     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":969
 *     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":973
 *     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":974
 * 
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate read buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_4 = __pyx_builtin_MemoryError; 
    __pyx_t_5 = 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(__pyx_t_4, __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, 974, __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, 974, __pyx_L1_error)

    /* "coremusic/capi.pyx":973
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate read buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":976
 *         raise MemoryError("Failed to allocate read buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         buffer_list.mNumberBuffers = 1
 *         buffer_list.mBuffers[0].mNumberChannels = 2
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":977
 * 
 *     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":978
 *     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":979
 *         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":980
 *         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":982
 *         buffer_list.mBuffers[0].mData = buffer
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"ExtAudioFileRead failed with status: {status}")
*/
    __pyx_v_status = ExtAudioFileRead(__pyx_v_ext_file, (&__pyx_v_frames_to_read), (&__pyx_v_buffer_list));

    /* "coremusic/capi.pyx":983
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"ExtAudioFileRead failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":984
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:
 *             raise RuntimeError(f"ExtAudioFileRead failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_3 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 984, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileRead_failed_with_sta, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 984, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __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, 984, __pyx_L5_error)

      /* "coremusic/capi.pyx":983
 * 
 *         status = at.ExtAudioFileRead(ext_file, &frames_to_read, &buffer_list)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"ExtAudioFileRead failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":986
 *             raise RuntimeError(f"ExtAudioFileRead failed with status: {status}")
 * 
 *         actual_size = buffer_list.mBuffers[0].mDataByteSize             # <<<<<<<<<<<<<<
 *         result = buffer[:actual_size]
 *         return (result, frames_to_read)
*/
    __pyx_t_8 = (__pyx_v_buffer_list.mBuffers[0]).mDataByteSize;
    __pyx_v_actual_size = __pyx_t_8;

    /* "coremusic/capi.pyx":987
 * 
 *         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, 987, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":988
 *         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, 988, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 988, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 988, __pyx_L5_error);
    __pyx_t_2 = 0;
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":990
 *         return (result, frames_to_read)
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_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_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;
      {
        free(__pyx_v_buffer);
      }
      __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_18 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":956
 * 
 * 
 * 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":993
 * 
 * 
 * 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_83extended_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_82extended_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_83extended_audio_file_write = {"extended_audio_file_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_83extended_audio_file_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_82extended_audio_file_write};
static PyObject *__pyx_pw_9coremusic_4capi_83extended_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, 993, __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, 993, __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, 993, __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, 993, __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, 993, __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, 993, __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, 993, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 993, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 993, __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, 993, __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, 993, __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, 993, __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, 993, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_82extended_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_82extended_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;
  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("extended_audio_file_write", 0);

  /* "coremusic/capi.pyx":1001
 *         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":1002
 *     """
 *     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":1003
 *     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, 1003, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_audio_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_1);

  /* "coremusic/capi.pyx":1004
 *     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, 1004, __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, 1004, __pyx_L1_error)
  __pyx_v_buffer_size = __pyx_t_2;

  /* "coremusic/capi.pyx":1007
 * 
 *     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":1008
 *     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":1009
 *     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":1010
 *     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":1012
 *     buffer_list.mBuffers[0].mData = buffer
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileWrite failed with status: {status}")
*/
  __pyx_v_status = ExtAudioFileWrite(__pyx_v_ext_file, __pyx_v_frames, (&__pyx_v_buffer_list));

  /* "coremusic/capi.pyx":1013
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileWrite failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1014
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileWrite failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileWrite_failed_with_st, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __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, 1014, __pyx_L1_error)

    /* "coremusic/capi.pyx":1013
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileWrite(ext_file, frames, &buffer_list)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileWrite failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":993
 * 
 * 
 * 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1017
 * 
 * 
 * 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_85extended_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_84extended_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_85extended_audio_file_get_property = {"extended_audio_file_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_85extended_audio_file_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_84extended_audio_file_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_85extended_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, 1017, __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, 1017, __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, 1017, __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, 1017, __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, 1017, __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, 1017, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1017, __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, 1017, __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, 1017, __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, 1017, __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_84extended_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_84extended_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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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("extended_audio_file_get_property", 0);

  /* "coremusic/capi.pyx":1027
 *         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":1028
 *     """
 *     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":1029
 *     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":1032
 *     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":1033
 * 
 *     if buffer == <char*>0:
 *         raise MemoryError("Failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_4 = __pyx_builtin_MemoryError; 
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_allocate_buffer};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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, 1033, __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, 1033, __pyx_L1_error)

    /* "coremusic/capi.pyx":1032
 *     cdef cf.OSStatus status
 * 
 *     if buffer == <char*>0:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Failed to allocate buffer")
 * 
*/
  }

  /* "coremusic/capi.pyx":1035
 *         raise MemoryError("Failed to allocate buffer")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1036
 * 
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"ExtAudioFileGetProperty failed with status: {status}")
*/
    __pyx_v_status = ExtAudioFileGetProperty(__pyx_v_ext_file, __pyx_v_property_id, (&__pyx_v_data_size), __pyx_v_buffer);

    /* "coremusic/capi.pyx":1037
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"ExtAudioFileGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":1038
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:
 *             raise RuntimeError(f"ExtAudioFileGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         result = buffer[:data_size]
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_3 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1038, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1038, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileGetProperty_failed_w, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1038, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __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, 1038, __pyx_L5_error)

      /* "coremusic/capi.pyx":1037
 *     try:
 *         status = at.ExtAudioFileGetProperty(ext_file, property_id, &data_size, buffer)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"ExtAudioFileGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":1040
 *             raise RuntimeError(f"ExtAudioFileGetProperty failed with status: {status}")
 * 
 *         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, 1040, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":1041
 * 
 *         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":1043
 *         return result
 *     finally:
 *         free(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_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_6); __pyx_t_6 = 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_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_buffer);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1017
 * 
 * 
 * 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1046
 * 
 * 
 * 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_87extended_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_86extended_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_87extended_audio_file_set_property = {"extended_audio_file_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_87extended_audio_file_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_86extended_audio_file_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_87extended_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, 1046, __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, 1046, __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, 1046, __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, 1046, __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, 1046, __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, 1046, __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, 1046, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1046, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1046, __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, 1046, __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, 1046, __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, 1046, __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, 1046, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_86extended_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_86extended_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;
  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("extended_audio_file_set_property", 0);

  /* "coremusic/capi.pyx":1054
 *         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":1055
 *     """
 *     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, 1055, __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, 1055, __pyx_L1_error)
  __pyx_v_data_size = __pyx_t_1;

  /* "coremusic/capi.pyx":1056
 *     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, 1056, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L1_error)
  __pyx_v_buffer = ((char *)__pyx_t_2);

  /* "coremusic/capi.pyx":1058
 *     cdef char* buffer = <char*><bytes>data
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileSetProperty failed with status: {status}")
*/
  __pyx_v_status = ExtAudioFileSetProperty(__pyx_v_ext_file, __pyx_v_property_id, __pyx_v_data_size, __pyx_v_buffer);

  /* "coremusic/capi.pyx":1059
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileSetProperty failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1060
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:
 *         raise RuntimeError(f"ExtAudioFileSetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ExtAudioFileSetProperty_failed_w, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __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, 1060, __pyx_L1_error)

    /* "coremusic/capi.pyx":1059
 * 
 *     cdef cf.OSStatus status = at.ExtAudioFileSetProperty(ext_file, property_id, data_size, buffer)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"ExtAudioFileSetProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1046
 * 
 * 
 * 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1064
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_89get_extended_audio_file_property_file_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_88get_extended_audio_file_property_file_data_format, "get_extended_audio_file_property_file_data_format() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_89get_extended_audio_file_property_file_data_format = {"get_extended_audio_file_property_file_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_89get_extended_audio_file_property_file_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_88get_extended_audio_file_property_file_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_89get_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_88get_extended_audio_file_property_file_data_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_88get_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":1065
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:
 *     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, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1065, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1064
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     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":1067
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_91get_extended_audio_file_property_client_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_90get_extended_audio_file_property_client_data_format, "get_extended_audio_file_property_client_data_format() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_91get_extended_audio_file_property_client_data_format = {"get_extended_audio_file_property_client_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_91get_extended_audio_file_property_client_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_90get_extended_audio_file_property_client_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_91get_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_90get_extended_audio_file_property_client_data_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_90get_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":1068
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:
 *     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, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1068, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1067
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     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":1070
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_93get_extended_audio_file_property_file_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_92get_extended_audio_file_property_file_channel_layout, "get_extended_audio_file_property_file_channel_layout() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_93get_extended_audio_file_property_file_channel_layout = {"get_extended_audio_file_property_file_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_93get_extended_audio_file_property_file_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_92get_extended_audio_file_property_file_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_93get_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_92get_extended_audio_file_property_file_channel_layout(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_92get_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":1071
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:
 *     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, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1071, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1070
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     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":1073
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_95get_extended_audio_file_property_client_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_94get_extended_audio_file_property_client_channel_layout, "get_extended_audio_file_property_client_channel_layout() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_95get_extended_audio_file_property_client_channel_layout = {"get_extended_audio_file_property_client_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_95get_extended_audio_file_property_client_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_94get_extended_audio_file_property_client_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_95get_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_94get_extended_audio_file_property_client_channel_layout(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_94get_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":1074
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:
 *     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, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1074, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1073
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     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":1076
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_97get_extended_audio_file_property_codec_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_96get_extended_audio_file_property_codec_manufacturer, "get_extended_audio_file_property_codec_manufacturer() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_97get_extended_audio_file_property_codec_manufacturer = {"get_extended_audio_file_property_codec_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_97get_extended_audio_file_property_codec_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_96get_extended_audio_file_property_codec_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_97get_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_96get_extended_audio_file_property_codec_manufacturer(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_96get_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":1077
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:
 *     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, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1077, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1076
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     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":1079
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_AudioFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_99get_extended_audio_file_property_audio_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_98get_extended_audio_file_property_audio_file, "get_extended_audio_file_property_audio_file() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_99get_extended_audio_file_property_audio_file = {"get_extended_audio_file_property_audio_file", (PyCFunction)__pyx_pw_9coremusic_4capi_99get_extended_audio_file_property_audio_file, METH_NOARGS, __pyx_doc_9coremusic_4capi_98get_extended_audio_file_property_audio_file};
static PyObject *__pyx_pw_9coremusic_4capi_99get_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_98get_extended_audio_file_property_audio_file(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_98get_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":1080
 * 
 * def get_extended_audio_file_property_audio_file() -> int:
 *     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, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1080, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1079
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     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":1082
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileLengthFrames
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_101get_extended_audio_file_property_file_length_frames(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_100get_extended_audio_file_property_file_length_frames, "get_extended_audio_file_property_file_length_frames() -> int");
static PyMethodDef __pyx_mdef_9coremusic_4capi_101get_extended_audio_file_property_file_length_frames = {"get_extended_audio_file_property_file_length_frames", (PyCFunction)__pyx_pw_9coremusic_4capi_101get_extended_audio_file_property_file_length_frames, METH_NOARGS, __pyx_doc_9coremusic_4capi_100get_extended_audio_file_property_file_length_frames};
static PyObject *__pyx_pw_9coremusic_4capi_101get_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_100get_extended_audio_file_property_file_length_frames(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_100get_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":1083
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:
 *     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, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1083, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1082
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     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":1087
 * 
 * # 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":1091
 *     # 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":1087
 * 
 * # 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":1094
 * 
 * 
 * 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_103audio_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_102audio_queue_new_output, "audio_queue_new_output(audio_format)\n\nCreate a new audio output queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_103audio_queue_new_output = {"audio_queue_new_output", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_103audio_queue_new_output, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_102audio_queue_new_output};
static PyObject *__pyx_pw_9coremusic_4capi_103audio_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, 1094, __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, 1094, __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, 1094, __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, 1094, __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, 1094, __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, 1094, __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_102audio_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_102audio_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;
  PyObject *__pyx_t_2 = NULL;
  Float64 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  AudioFormatID __pyx_t_6;
  AudioFormatFlags __pyx_t_7;
  UInt32 __pyx_t_8;
  int __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_RefNannySetupContext("audio_queue_new_output", 0);

  /* "coremusic/capi.pyx":1100
 * 
 *     # Set up the audio format
 *     format.mSampleRate = audio_format.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = audio_format.get('format_flags',
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == ((Float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_format.mSampleRate = __pyx_t_3;

  /* "coremusic/capi.pyx":1101
 *     # Set up the audio format
 *     format.mSampleRate = audio_format.get('sample_rate', 44100.0)
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)             # <<<<<<<<<<<<<<
 *     format.mFormatFlags = audio_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
*/
  __pyx_t_1 = __pyx_v_audio_format;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(kAudioFormatLinearPCM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_format_id, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_6 == ((AudioFormatID)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_format.mFormatID = __pyx_t_6;

  /* "coremusic/capi.pyx":1102
 *     format.mSampleRate = audio_format.get('sample_rate', 44100.0)
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = audio_format.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
*/
  __pyx_t_4 = __pyx_v_audio_format;
  __Pyx_INCREF(__pyx_t_4);

  /* "coremusic/capi.pyx":1103
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = audio_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)             # <<<<<<<<<<<<<<
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
*/
  __pyx_t_1 = __Pyx_PyLong_From_int((kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_format_flags, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }

  /* "coremusic/capi.pyx":1102
 *     format.mSampleRate = audio_format.get('sample_rate', 44100.0)
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = audio_format.get('format_flags',             # <<<<<<<<<<<<<<
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
*/
  __pyx_t_7 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_7 == ((AudioFormatFlags)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_format.mFormatFlags = __pyx_t_7;

  /* "coremusic/capi.pyx":1104
 *     format.mFormatFlags = audio_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_8 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBytesPerPacket = __pyx_t_8;

  /* "coremusic/capi.pyx":1105
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_8 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_format.mFramesPerPacket = __pyx_t_8;

  /* "coremusic/capi.pyx":1106
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_8 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBytesPerFrame = __pyx_t_8;

  /* "coremusic/capi.pyx":1107
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)
 *     format.mReserved = 0
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[4], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyLong_As_UInt32(__pyx_t_2); if (unlikely((__pyx_t_8 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_format.mChannelsPerFrame = __pyx_t_8;

  /* "coremusic/capi.pyx":1108
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     format.mReserved = 0
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_audio_format, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[5], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyLong_As_UInt32(__pyx_t_1); if (unlikely((__pyx_t_8 == ((UInt32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_format.mBitsPerChannel = __pyx_t_8;

  /* "coremusic/capi.pyx":1109
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)
 *     format.mReserved = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioQueueNewOutput(
*/
  __pyx_v_format.mReserved = 0;

  /* "coremusic/capi.pyx":1111
 *     format.mReserved = 0
 * 
 *     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":1121
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueNewOutput failed with status: {status}")
 * 
*/
  __pyx_t_9 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_9)) {

    /* "coremusic/capi.pyx":1122
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueNewOutput failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>queue
*/
    __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_10 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueNewOutput_failed_with, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__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_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __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, 1122, __pyx_L1_error)

    /* "coremusic/capi.pyx":1121
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueNewOutput failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1124
 *         raise RuntimeError(f"AudioQueueNewOutput failed with status: {status}")
 * 
 *     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, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1094
 * 
 * 
 * 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_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __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":1127
 * 
 * 
 * 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_105audio_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_104audio_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_105audio_queue_allocate_buffer = {"audio_queue_allocate_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_105audio_queue_allocate_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_104audio_queue_allocate_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_105audio_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, 1127, __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, 1127, __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, 1127, __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, 1127, __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, 1127, __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, 1127, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1127, __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, 1127, __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, 1127, __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, 1127, __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_104audio_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_104audio_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;
  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_queue_allocate_buffer", 0);

  /* "coremusic/capi.pyx":1129
 * 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":1132
 *     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":1138
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueAllocateBuffer failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1139
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueAllocateBuffer failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>buffer
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueAllocateBuffer_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __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, 1139, __pyx_L1_error)

    /* "coremusic/capi.pyx":1138
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueAllocateBuffer failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1141
 *         raise RuntimeError(f"AudioQueueAllocateBuffer failed with status: {status}")
 * 
 *     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, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1127
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1144
 * 
 * 
 * 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_107audio_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_106audio_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_107audio_queue_enqueue_buffer = {"audio_queue_enqueue_buffer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_107audio_queue_enqueue_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_106audio_queue_enqueue_buffer};
static PyObject *__pyx_pw_9coremusic_4capi_107audio_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, 1144, __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, 1144, __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, 1144, __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, 1144, __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, 1144, __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, 1144, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1144, __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, 1144, __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, 1144, __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, 1144, __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_106audio_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_106audio_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;
  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_queue_enqueue_buffer", 0);

  /* "coremusic/capi.pyx":1146
 * 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":1147
 *     """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":1149
 *     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":1151
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueEnqueueBuffer failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1152
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueEnqueueBuffer failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueEnqueueBuffer_failed_w, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __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, 1152, __pyx_L1_error)

    /* "coremusic/capi.pyx":1151
 *     cdef cf.OSStatus status = at.AudioQueueEnqueueBuffer(queue, buffer, 0, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueEnqueueBuffer failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1154
 *         raise RuntimeError(f"AudioQueueEnqueueBuffer failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1144
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1157
 * 
 * 
 * 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_109audio_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_108audio_queue_start, "audio_queue_start(long queue_id)\n\nStart an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_109audio_queue_start = {"audio_queue_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_109audio_queue_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_108audio_queue_start};
static PyObject *__pyx_pw_9coremusic_4capi_109audio_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, 1157, __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, 1157, __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, 1157, __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, 1157, __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, 1157, __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, 1157, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_queue_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1157, __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_108audio_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_108audio_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;
  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_queue_start", 0);

  /* "coremusic/capi.pyx":1159
 * 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":1161
 *     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":1163
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueStart failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1164
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueStart failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueStart_failed_with_stat, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __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, 1164, __pyx_L1_error)

    /* "coremusic/capi.pyx":1163
 *     cdef cf.OSStatus status = at.AudioQueueStart(queue, NULL)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueStart failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1166
 *         raise RuntimeError(f"AudioQueueStart failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1157
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1169
 * 
 * 
 * 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_111audio_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_110audio_queue_stop, "audio_queue_stop(long queue_id, bool immediate=True)\n\nStop an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_111audio_queue_stop = {"audio_queue_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_111audio_queue_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_110audio_queue_stop};
static PyObject *__pyx_pw_9coremusic_4capi_111audio_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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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, 1169, __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_110audio_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_110audio_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;
  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_queue_stop", 0);

  /* "coremusic/capi.pyx":1171
 * 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":1173
 *     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":1175
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueStop failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1176
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueStop failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueStop_failed_with_statu, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __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, 1176, __pyx_L1_error)

    /* "coremusic/capi.pyx":1175
 *     cdef cf.OSStatus status = at.AudioQueueStop(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueStop failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1178
 *         raise RuntimeError(f"AudioQueueStop failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1169
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1181
 * 
 * 
 * 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_113audio_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_112audio_queue_dispose, "audio_queue_dispose(long queue_id, bool immediate=True)\n\nDispose of an audio queue");
static PyMethodDef __pyx_mdef_9coremusic_4capi_113audio_queue_dispose = {"audio_queue_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_113audio_queue_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_112audio_queue_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_113audio_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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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, 1181, __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_112audio_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_112audio_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;
  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_queue_dispose", 0);

  /* "coremusic/capi.pyx":1183
 * 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":1185
 *     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":1187
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1188
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioQueueDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioQueueDispose_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __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, 1188, __pyx_L1_error)

    /* "coremusic/capi.pyx":1187
 *     cdef cf.OSStatus status = at.AudioQueueDispose(queue, immediate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioQueueDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1190
 *         raise RuntimeError(f"AudioQueueDispose failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1181
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1194
 * 
 * # Constant getter functions
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     return ca.kAudioFormatLinearPCM
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_115get_audio_format_linear_pcm(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_114get_audio_format_linear_pcm, "get_audio_format_linear_pcm()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_115get_audio_format_linear_pcm = {"get_audio_format_linear_pcm", (PyCFunction)__pyx_pw_9coremusic_4capi_115get_audio_format_linear_pcm, METH_NOARGS, __pyx_doc_9coremusic_4capi_114get_audio_format_linear_pcm};
static PyObject *__pyx_pw_9coremusic_4capi_115get_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_114get_audio_format_linear_pcm(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_114get_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":1195
 * # Constant getter functions
 * def get_audio_format_linear_pcm():
 *     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, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1194
 * 
 * # Constant getter functions
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     return ca.kAudioFormatLinearPCM
 * 
*/

  /* 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":1197
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_117get_linear_pcm_format_flag_is_signed_integer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_116get_linear_pcm_format_flag_is_signed_integer, "get_linear_pcm_format_flag_is_signed_integer()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_117get_linear_pcm_format_flag_is_signed_integer = {"get_linear_pcm_format_flag_is_signed_integer", (PyCFunction)__pyx_pw_9coremusic_4capi_117get_linear_pcm_format_flag_is_signed_integer, METH_NOARGS, __pyx_doc_9coremusic_4capi_116get_linear_pcm_format_flag_is_signed_integer};
static PyObject *__pyx_pw_9coremusic_4capi_117get_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_116get_linear_pcm_format_flag_is_signed_integer(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_116get_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":1198
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():
 *     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, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1197
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     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":1200
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_119get_linear_pcm_format_flag_is_packed(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_118get_linear_pcm_format_flag_is_packed, "get_linear_pcm_format_flag_is_packed()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_119get_linear_pcm_format_flag_is_packed = {"get_linear_pcm_format_flag_is_packed", (PyCFunction)__pyx_pw_9coremusic_4capi_119get_linear_pcm_format_flag_is_packed, METH_NOARGS, __pyx_doc_9coremusic_4capi_118get_linear_pcm_format_flag_is_packed};
static PyObject *__pyx_pw_9coremusic_4capi_119get_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_118get_linear_pcm_format_flag_is_packed(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_118get_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":1201
 * 
 * def get_linear_pcm_format_flag_is_packed():
 *     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, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1200
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     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":1203
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileWAVEType
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_121get_audio_file_wave_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_120get_audio_file_wave_type, "get_audio_file_wave_type()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_121get_audio_file_wave_type = {"get_audio_file_wave_type", (PyCFunction)__pyx_pw_9coremusic_4capi_121get_audio_file_wave_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_120get_audio_file_wave_type};
static PyObject *__pyx_pw_9coremusic_4capi_121get_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_120get_audio_file_wave_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_120get_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":1204
 * 
 * def get_audio_file_wave_type():
 *     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, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1203
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     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":1206
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileReadPermission
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_123get_audio_file_read_permission(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_122get_audio_file_read_permission, "get_audio_file_read_permission()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_123get_audio_file_read_permission = {"get_audio_file_read_permission", (PyCFunction)__pyx_pw_9coremusic_4capi_123get_audio_file_read_permission, METH_NOARGS, __pyx_doc_9coremusic_4capi_122get_audio_file_read_permission};
static PyObject *__pyx_pw_9coremusic_4capi_123get_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_122get_audio_file_read_permission(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_122get_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":1207
 * 
 * def get_audio_file_read_permission():
 *     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, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1206
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     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":1209
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyDataFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_125get_audio_file_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_124get_audio_file_property_data_format, "get_audio_file_property_data_format()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_125get_audio_file_property_data_format = {"get_audio_file_property_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_125get_audio_file_property_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_124get_audio_file_property_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_125get_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_124get_audio_file_property_data_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_124get_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":1210
 * 
 * def get_audio_file_property_data_format():
 *     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, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1209
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     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":1212
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_127get_audio_file_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_126get_audio_file_property_maximum_packet_size, "get_audio_file_property_maximum_packet_size()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_127get_audio_file_property_maximum_packet_size = {"get_audio_file_property_maximum_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_127get_audio_file_property_maximum_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_126get_audio_file_property_maximum_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_127get_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_126get_audio_file_property_maximum_packet_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_126get_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":1213
 * 
 * def get_audio_file_property_maximum_packet_size():
 *     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, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1212
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     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":1215
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_129get_audio_file_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_128get_audio_file_property_audio_data_packet_count, "get_audio_file_property_audio_data_packet_count()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_129get_audio_file_property_audio_data_packet_count = {"get_audio_file_property_audio_data_packet_count", (PyCFunction)__pyx_pw_9coremusic_4capi_129get_audio_file_property_audio_data_packet_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_128get_audio_file_property_audio_data_packet_count};
static PyObject *__pyx_pw_9coremusic_4capi_129get_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_128get_audio_file_property_audio_data_packet_count(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_128get_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":1216
 * 
 * def get_audio_file_property_audio_data_packet_count():
 *     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, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1215
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     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":1218
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyEstimatedDuration
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_131get_audio_file_property_estimated_duration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_130get_audio_file_property_estimated_duration, "get_audio_file_property_estimated_duration()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_131get_audio_file_property_estimated_duration = {"get_audio_file_property_estimated_duration", (PyCFunction)__pyx_pw_9coremusic_4capi_131get_audio_file_property_estimated_duration, METH_NOARGS, __pyx_doc_9coremusic_4capi_130get_audio_file_property_estimated_duration};
static PyObject *__pyx_pw_9coremusic_4capi_131get_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_130get_audio_file_property_estimated_duration(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_130get_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":1219
 * 
 * def get_audio_file_property_estimated_duration():
 *     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, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1218
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     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":1222
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyName
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_133get_audio_object_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_132get_audio_object_property_name, "get_audio_object_property_name()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_133get_audio_object_property_name = {"get_audio_object_property_name", (PyCFunction)__pyx_pw_9coremusic_4capi_133get_audio_object_property_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_132get_audio_object_property_name};
static PyObject *__pyx_pw_9coremusic_4capi_133get_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_132get_audio_object_property_name(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_132get_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":1223
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():
 *     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, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1222
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     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":1225
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyManufacturer
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_135get_audio_object_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_134get_audio_object_property_manufacturer, "get_audio_object_property_manufacturer()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_135get_audio_object_property_manufacturer = {"get_audio_object_property_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_135get_audio_object_property_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_134get_audio_object_property_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_135get_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_134get_audio_object_property_manufacturer(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_134get_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":1226
 * 
 * def get_audio_object_property_manufacturer():
 *     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, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1225
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     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":1228
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_137get_audio_device_property_device_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_136get_audio_device_property_device_uid, "get_audio_device_property_device_uid()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_137get_audio_device_property_device_uid = {"get_audio_device_property_device_uid", (PyCFunction)__pyx_pw_9coremusic_4capi_137get_audio_device_property_device_uid, METH_NOARGS, __pyx_doc_9coremusic_4capi_136get_audio_device_property_device_uid};
static PyObject *__pyx_pw_9coremusic_4capi_137get_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_136get_audio_device_property_device_uid(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_136get_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":1229
 * 
 * def get_audio_device_property_device_uid():
 *     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, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1228
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     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":1231
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyModelUID
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_139get_audio_device_property_model_uid(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_138get_audio_device_property_model_uid, "get_audio_device_property_model_uid()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_139get_audio_device_property_model_uid = {"get_audio_device_property_model_uid", (PyCFunction)__pyx_pw_9coremusic_4capi_139get_audio_device_property_model_uid, METH_NOARGS, __pyx_doc_9coremusic_4capi_138get_audio_device_property_model_uid};
static PyObject *__pyx_pw_9coremusic_4capi_139get_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_138get_audio_device_property_model_uid(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_138get_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":1232
 * 
 * def get_audio_device_property_model_uid():
 *     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, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1231
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     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":1234
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyTransportType
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_141get_audio_device_property_transport_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_140get_audio_device_property_transport_type, "get_audio_device_property_transport_type()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_141get_audio_device_property_transport_type = {"get_audio_device_property_transport_type", (PyCFunction)__pyx_pw_9coremusic_4capi_141get_audio_device_property_transport_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_140get_audio_device_property_transport_type};
static PyObject *__pyx_pw_9coremusic_4capi_141get_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_140get_audio_device_property_transport_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_140get_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":1235
 * 
 * def get_audio_device_property_transport_type():
 *     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, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1234
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     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":1237
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_143get_audio_device_property_device_is_alive(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_142get_audio_device_property_device_is_alive, "get_audio_device_property_device_is_alive()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_143get_audio_device_property_device_is_alive = {"get_audio_device_property_device_is_alive", (PyCFunction)__pyx_pw_9coremusic_4capi_143get_audio_device_property_device_is_alive, METH_NOARGS, __pyx_doc_9coremusic_4capi_142get_audio_device_property_device_is_alive};
static PyObject *__pyx_pw_9coremusic_4capi_143get_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_142get_audio_device_property_device_is_alive(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_142get_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":1238
 * 
 * def get_audio_device_property_device_is_alive():
 *     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, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1237
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     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":1240
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_145get_audio_device_property_nominal_sample_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_144get_audio_device_property_nominal_sample_rate, "get_audio_device_property_nominal_sample_rate()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_145get_audio_device_property_nominal_sample_rate = {"get_audio_device_property_nominal_sample_rate", (PyCFunction)__pyx_pw_9coremusic_4capi_145get_audio_device_property_nominal_sample_rate, METH_NOARGS, __pyx_doc_9coremusic_4capi_144get_audio_device_property_nominal_sample_rate};
static PyObject *__pyx_pw_9coremusic_4capi_145get_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_144get_audio_device_property_nominal_sample_rate(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_144get_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":1241
 * 
 * def get_audio_device_property_nominal_sample_rate():
 *     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, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1240
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     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":1243
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_147get_audio_device_property_available_nominal_sample_rates(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_146get_audio_device_property_available_nominal_sample_rates, "get_audio_device_property_available_nominal_sample_rates()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_147get_audio_device_property_available_nominal_sample_rates = {"get_audio_device_property_available_nominal_sample_rates", (PyCFunction)__pyx_pw_9coremusic_4capi_147get_audio_device_property_available_nominal_sample_rates, METH_NOARGS, __pyx_doc_9coremusic_4capi_146get_audio_device_property_available_nominal_sample_rates};
static PyObject *__pyx_pw_9coremusic_4capi_147get_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_146get_audio_device_property_available_nominal_sample_rates(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_146get_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":1244
 * 
 * def get_audio_device_property_available_nominal_sample_rates():
 *     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, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1243
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     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":1246
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyIsHidden
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_149get_audio_device_property_is_hidden(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_148get_audio_device_property_is_hidden, "get_audio_device_property_is_hidden()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_149get_audio_device_property_is_hidden = {"get_audio_device_property_is_hidden", (PyCFunction)__pyx_pw_9coremusic_4capi_149get_audio_device_property_is_hidden, METH_NOARGS, __pyx_doc_9coremusic_4capi_148get_audio_device_property_is_hidden};
static PyObject *__pyx_pw_9coremusic_4capi_149get_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_148get_audio_device_property_is_hidden(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_148get_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":1247
 * 
 * def get_audio_device_property_is_hidden():
 *     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, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1246
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     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":1249
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_151get_audio_device_property_preferred_channels_for_stereo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_150get_audio_device_property_preferred_channels_for_stereo, "get_audio_device_property_preferred_channels_for_stereo()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_151get_audio_device_property_preferred_channels_for_stereo = {"get_audio_device_property_preferred_channels_for_stereo", (PyCFunction)__pyx_pw_9coremusic_4capi_151get_audio_device_property_preferred_channels_for_stereo, METH_NOARGS, __pyx_doc_9coremusic_4capi_150get_audio_device_property_preferred_channels_for_stereo};
static PyObject *__pyx_pw_9coremusic_4capi_151get_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_150get_audio_device_property_preferred_channels_for_stereo(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_150get_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":1250
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():
 *     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, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1249
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     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":1252
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyStreamConfiguration
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_153get_audio_device_property_stream_configuration(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_152get_audio_device_property_stream_configuration, "get_audio_device_property_stream_configuration()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_153get_audio_device_property_stream_configuration = {"get_audio_device_property_stream_configuration", (PyCFunction)__pyx_pw_9coremusic_4capi_153get_audio_device_property_stream_configuration, METH_NOARGS, __pyx_doc_9coremusic_4capi_152get_audio_device_property_stream_configuration};
static PyObject *__pyx_pw_9coremusic_4capi_153get_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_152get_audio_device_property_stream_configuration(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_152get_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":1253
 * 
 * def get_audio_device_property_stream_configuration():
 *     return ca.kAudioDevicePropertyStreamConfiguration             # <<<<<<<<<<<<<<
 * 
 * # AudioObject scope constants
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From___pyx_anon_enum(kAudioDevicePropertyStreamConfiguration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1252
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     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":1256
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_155get_audio_object_property_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_154get_audio_object_property_scope_global, "get_audio_object_property_scope_global()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_155get_audio_object_property_scope_global = {"get_audio_object_property_scope_global", (PyCFunction)__pyx_pw_9coremusic_4capi_155get_audio_object_property_scope_global, METH_NOARGS, __pyx_doc_9coremusic_4capi_154get_audio_object_property_scope_global};
static PyObject *__pyx_pw_9coremusic_4capi_155get_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_154get_audio_object_property_scope_global(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_154get_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":1257
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():
 *     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, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1256
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     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":1259
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeInput
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_157get_audio_object_property_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_156get_audio_object_property_scope_input, "get_audio_object_property_scope_input()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_157get_audio_object_property_scope_input = {"get_audio_object_property_scope_input", (PyCFunction)__pyx_pw_9coremusic_4capi_157get_audio_object_property_scope_input, METH_NOARGS, __pyx_doc_9coremusic_4capi_156get_audio_object_property_scope_input};
static PyObject *__pyx_pw_9coremusic_4capi_157get_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_156get_audio_object_property_scope_input(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_156get_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":1260
 * 
 * def get_audio_object_property_scope_input():
 *     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, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1259
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     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":1262
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_159get_audio_object_property_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_158get_audio_object_property_scope_output, "get_audio_object_property_scope_output()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_159get_audio_object_property_scope_output = {"get_audio_object_property_scope_output", (PyCFunction)__pyx_pw_9coremusic_4capi_159get_audio_object_property_scope_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_158get_audio_object_property_scope_output};
static PyObject *__pyx_pw_9coremusic_4capi_159get_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_158get_audio_object_property_scope_output(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_158get_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":1263
 * 
 * def get_audio_object_property_scope_output():
 *     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, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1262
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     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":1265
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyElementMain
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_161get_audio_object_property_element_main(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_160get_audio_object_property_element_main, "get_audio_object_property_element_main()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_161get_audio_object_property_element_main = {"get_audio_object_property_element_main", (PyCFunction)__pyx_pw_9coremusic_4capi_161get_audio_object_property_element_main, METH_NOARGS, __pyx_doc_9coremusic_4capi_160get_audio_object_property_element_main};
static PyObject *__pyx_pw_9coremusic_4capi_161get_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_160get_audio_object_property_element_main(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_160get_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":1266
 * 
 * def get_audio_object_property_element_main():
 *     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, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1265
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     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":1270
 * 
 * # 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_163audio_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_162audio_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_163audio_component_find_next = {"audio_component_find_next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_163audio_component_find_next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_162audio_component_find_next};
static PyObject *__pyx_pw_9coremusic_4capi_163audio_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, 1270, __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, 1270, __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, 1270, __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, 1270, __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, 1270, __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, 1270, __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, 1270, __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, 1270, __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, 1270, __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_162audio_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_162audio_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":1282
 *     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":1284
 *     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":1285
 * 
 *     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":1284
 *     cdef at.AudioComponent previous = NULL
 * 
 *     if previous_component_id != 0:             # <<<<<<<<<<<<<<
 *         previous = <at.AudioComponent>previous_component_id
 * 
*/
  }

  /* "coremusic/capi.pyx":1287
 *         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, 1287, __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, 1287, __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, 1287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentType = __pyx_t_4;

  /* "coremusic/capi.pyx":1288
 * 
 *     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, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[7], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __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, 1288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_desc.componentSubType = __pyx_t_4;

  /* "coremusic/capi.pyx":1289
 *     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, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[8], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1289, __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, 1289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentManufacturer = __pyx_t_4;

  /* "coremusic/capi.pyx":1290
 *     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, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[9], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __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, 1290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_desc.componentFlags = __pyx_t_4;

  /* "coremusic/capi.pyx":1291
 *     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, 1291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[10], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __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, 1291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc.componentFlagsMask = __pyx_t_4;

  /* "coremusic/capi.pyx":1293
 *     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":1295
 *     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":1296
 * 
 *     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":1295
 *     component = at.AudioComponentFindNext(previous, &desc)
 * 
 *     if component == NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <long>component
*/
  }

  /* "coremusic/capi.pyx":1297
 *     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, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1270
 * 
 * # 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":1300
 * 
 * 
 * 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_165audio_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_164audio_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_165audio_component_instance_new = {"audio_component_instance_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_165audio_component_instance_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_164audio_component_instance_new};
static PyObject *__pyx_pw_9coremusic_4capi_165audio_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, 1300, __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, 1300, __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, 1300, __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, 1300, __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, 1300, __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, 1300, __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, 1300, __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_164audio_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_164audio_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;
  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_component_instance_new", 0);

  /* "coremusic/capi.pyx":1302
 * 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":1305
 *     cdef at.AudioComponentInstance instance
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentInstanceNew failed with status: {status}")
*/
  __pyx_v_status = AudioComponentInstanceNew(__pyx_v_component, (&__pyx_v_instance));

  /* "coremusic/capi.pyx":1306
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentInstanceNew failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1307
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentInstanceNew failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>instance
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioComponentInstanceNew_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __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, 1307, __pyx_L1_error)

    /* "coremusic/capi.pyx":1306
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceNew(component, &instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentInstanceNew failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1309
 *         raise RuntimeError(f"AudioComponentInstanceNew failed with status: {status}")
 * 
 *     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, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1300
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1312
 * 
 * 
 * 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_167audio_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_166audio_component_instance_dispose, "audio_component_instance_dispose(long instance_id)\n\nDispose of an audio component instance");
static PyMethodDef __pyx_mdef_9coremusic_4capi_167audio_component_instance_dispose = {"audio_component_instance_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_167audio_component_instance_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_166audio_component_instance_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_167audio_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, 1312, __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, 1312, __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, 1312, __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, 1312, __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, 1312, __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, 1312, __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, 1312, __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_166audio_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_166audio_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;
  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_component_instance_dispose", 0);

  /* "coremusic/capi.pyx":1314
 * 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":1316
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentInstanceDispose failed with status: {status}")
*/
  __pyx_v_status = AudioComponentInstanceDispose(__pyx_v_instance);

  /* "coremusic/capi.pyx":1317
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentInstanceDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1318
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentInstanceDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioComponentInstanceDispose_fa, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __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, 1318, __pyx_L1_error)

    /* "coremusic/capi.pyx":1317
 * 
 *     cdef cf.OSStatus status = at.AudioComponentInstanceDispose(instance)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentInstanceDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1320
 *         raise RuntimeError(f"AudioComponentInstanceDispose failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1312
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1323
 * 
 * 
 * def audio_component_copy_name(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the name of an audio component
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_169audio_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_168audio_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_169audio_component_copy_name = {"audio_component_copy_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_169audio_component_copy_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_168audio_component_copy_name};
static PyObject *__pyx_pw_9coremusic_4capi_169audio_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, 1323, __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, 1323, __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, 1323, __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, 1323, __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, 1323, __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, 1323, __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, 1323, __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_168audio_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_168audio_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;
  char __pyx_v_buffer[0x100];
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_component_copy_name", 0);

  /* "coremusic/capi.pyx":1332
 *         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":1333
 *     """
 *     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":1335
 *     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":1336
 * 
 *     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":1337
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0 or name_ref == NULL:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     # Convert CFString to Python string
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "coremusic/capi.pyx":1336
 * 
 *     cdef cf.OSStatus status = at.AudioComponentCopyName(component, &name_ref)
 *     if status != 0 or name_ref == NULL:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  }

  /* "coremusic/capi.pyx":1341
 *     # Convert CFString to Python string
 *     cdef char buffer[256]
 *     cdef str name = None             # <<<<<<<<<<<<<<
 * 
 *     if cf.CFStringGetCString(name_ref, buffer, 256, cf.kCFStringEncodingUTF8):
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_name = ((PyObject*)Py_None);

  /* "coremusic/capi.pyx":1343
 *     cdef str name = None
 * 
 *     if cf.CFStringGetCString(name_ref, buffer, 256, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         name = buffer.decode('utf-8')
 * 
*/
  __pyx_t_1 = (CFStringGetCString(__pyx_v_name_ref, __pyx_v_buffer, 0x100, kCFStringEncodingUTF8) != 0);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1344
 * 
 *     if cf.CFStringGetCString(name_ref, buffer, 256, cf.kCFStringEncodingUTF8):
 *         name = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     cf.CFRelease(name_ref)
*/
    __pyx_t_3 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1344, __pyx_L1_error)
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_3, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "coremusic/capi.pyx":1343
 *     cdef str name = None
 * 
 *     if cf.CFStringGetCString(name_ref, buffer, 256, cf.kCFStringEncodingUTF8):             # <<<<<<<<<<<<<<
 *         name = buffer.decode('utf-8')
 * 
*/
  }

  /* "coremusic/capi.pyx":1346
 *         name = buffer.decode('utf-8')
 * 
 *     cf.CFRelease(name_ref)             # <<<<<<<<<<<<<<
 *     return name
 * 
*/
  CFRelease(__pyx_v_name_ref);

  /* "coremusic/capi.pyx":1347
 * 
 *     cf.CFRelease(name_ref)
 *     return name             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_name);
  __pyx_r = __pyx_v_name;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1323
 * 
 * 
 * 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_4);
  __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":1350
 * 
 * 
 * def audio_component_get_description(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the description of an audio component
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_171audio_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_170audio_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_171audio_component_get_description = {"audio_component_get_description", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_171audio_component_get_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_170audio_component_get_description};
static PyObject *__pyx_pw_9coremusic_4capi_171audio_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, 1350, __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, 1350, __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, 1350, __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, 1350, __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, 1350, __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, 1350, __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, 1350, __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_170audio_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_170audio_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;
  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_component_get_description", 0);

  /* "coremusic/capi.pyx":1360
 *               '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":1363
 *     cdef at.AudioComponentDescription desc
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentGetDescription failed with status: {status}")
*/
  __pyx_v_status = AudioComponentGetDescription(__pyx_v_component, (&__pyx_v_desc));

  /* "coremusic/capi.pyx":1364
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentGetDescription failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1365
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:
 *         raise RuntimeError(f"AudioComponentGetDescription failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return {
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioComponentGetDescription_fai, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __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, 1365, __pyx_L1_error)

    /* "coremusic/capi.pyx":1364
 * 
 *     cdef cf.OSStatus status = at.AudioComponentGetDescription(component, &desc)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioComponentGetDescription failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1367
 *         raise RuntimeError(f"AudioComponentGetDescription failed with status: {status}")
 * 
 *     return {             # <<<<<<<<<<<<<<
 *         'type': desc.componentType,
 *         'subtype': desc.componentSubType,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":1368
 * 
 *     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, 1368, __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, 1368, __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, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1369
 *     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, 1369, __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, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1370
 *         '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, 1370, __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, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1371
 *         '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, 1371, __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, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":1372
 *         '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, 1372, __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, 1368, __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":1350
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1377
 * 
 * # 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_173audio_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_172audio_unit_initialize, "audio_unit_initialize(long audio_unit_id)\n\nInitialize an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_173audio_unit_initialize = {"audio_unit_initialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_173audio_unit_initialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_172audio_unit_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_173audio_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, 1377, __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, 1377, __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, 1377, __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, 1377, __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, 1377, __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, 1377, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_initialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1377, __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_172audio_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_172audio_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;
  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_initialize", 0);

  /* "coremusic/capi.pyx":1379
 * 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":1381
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitInitialize failed with status: {status}")
*/
  __pyx_v_status = AudioUnitInitialize(__pyx_v_unit);

  /* "coremusic/capi.pyx":1382
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitInitialize failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1383
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitInitialize failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); 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_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitInitialize_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __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, 1383, __pyx_L1_error)

    /* "coremusic/capi.pyx":1382
 * 
 *     cdef cf.OSStatus status = at.AudioUnitInitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitInitialize failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1385
 *         raise RuntimeError(f"AudioUnitInitialize failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1377
 * 
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1388
 * 
 * 
 * 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_175audio_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_174audio_unit_uninitialize, "audio_unit_uninitialize(long audio_unit_id)\n\nUninitialize an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_175audio_unit_uninitialize = {"audio_unit_uninitialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_175audio_unit_uninitialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_174audio_unit_uninitialize};
static PyObject *__pyx_pw_9coremusic_4capi_175audio_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, 1388, __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, 1388, __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, 1388, __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, 1388, __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, 1388, __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, 1388, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_uninitialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1388, __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_174audio_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_174audio_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;
  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_uninitialize", 0);

  /* "coremusic/capi.pyx":1390
 * 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":1392
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitUninitialize failed with status: {status}")
*/
  __pyx_v_status = AudioUnitUninitialize(__pyx_v_unit);

  /* "coremusic/capi.pyx":1393
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitUninitialize failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1394
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitUninitialize failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitUninitialize_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __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, 1394, __pyx_L1_error)

    /* "coremusic/capi.pyx":1393
 * 
 *     cdef cf.OSStatus status = at.AudioUnitUninitialize(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitUninitialize failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1396
 *         raise RuntimeError(f"AudioUnitUninitialize failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1388
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1399
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, 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_177audio_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_176audio_unit_set_property, "audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, data)\n\nSet a property on an audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_177audio_unit_set_property = {"audio_unit_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_177audio_unit_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_176audio_unit_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_177audio_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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1399, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1399, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1399, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1399, __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, 1399, __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, 1399, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L3_error)
    __pyx_v_data = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("audio_unit_set_property", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1399, __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:;
  __pyx_r = __pyx_pf_9coremusic_4capi_176audio_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 */
  for (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_176audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_set_property", 0);

  /* "coremusic/capi.pyx":1401
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, 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":1404
 *     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":1410
 *                                          <at.AudioUnitScope>scope,
 *                                          <at.AudioUnitElement>element,
 *                                          <const char*>data,             # <<<<<<<<<<<<<<
 *                                          <cf.UInt32>len(data))
 *     else:
*/
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L1_error)

    /* "coremusic/capi.pyx":1411
 *                                          <at.AudioUnitElement>element,
 *                                          <const char*>data,
 *                                          <cf.UInt32>len(data))             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("data must be bytes")
*/
    __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1411, __pyx_L1_error)

    /* "coremusic/capi.pyx":1406
 *     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":1404
 *     cdef cf.OSStatus status
 * 
 *     if isinstance(data, bytes):             # <<<<<<<<<<<<<<
 *         # Handle raw bytes data
 *         status = at.AudioUnitSetProperty(unit,
*/
    goto __pyx_L3;
  }

  /* "coremusic/capi.pyx":1413
 *                                          <cf.UInt32>len(data))
 *     else:
 *         raise ValueError("data must be bytes")             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  /*else*/ {
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_6 = __pyx_builtin_ValueError; 
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_data_must_be_bytes};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __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, 1413, __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, 1413, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "coremusic/capi.pyx":1415
 *         raise ValueError("data must be bytes")
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitSetProperty failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1416
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitSetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_8 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitSetProperty_failed_with, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __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;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __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, 1416, __pyx_L1_error)

    /* "coremusic/capi.pyx":1415
 *         raise ValueError("data must be bytes")
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitSetProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1418
 *         raise RuntimeError(f"AudioUnitSetProperty failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1399
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":1421
 * 
 * 
 * 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_179audio_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_178audio_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_179audio_unit_get_property = {"audio_unit_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_179audio_unit_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_178audio_unit_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_179audio_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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1421, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1421, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1421, __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, 1421, __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, 1421, __pyx_L3_error)
    __pyx_v_scope = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_scope == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1421, __pyx_L3_error)
    __pyx_v_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1421, __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, 1421, __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_178audio_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_178audio_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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_unit_get_property", 0);

  /* "coremusic/capi.pyx":1423
 * 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":1424
 *     """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":1425
 *     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":1429
 * 
 *     # 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":1435
 *                                          &data_size,
 *                                          &writable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitGetPropertyInfo failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1436
 *                                          &writable)
 *     if status != 0:
 *         raise RuntimeError(f"AudioUnitGetPropertyInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get the property
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitGetPropertyInfo_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __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, 1436, __pyx_L1_error)

    /* "coremusic/capi.pyx":1435
 *                                          &data_size,
 *                                          &writable)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioUnitGetPropertyInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1439
 * 
 *     # 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":1440
 *     # 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":1441
 *     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_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __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, 1441, __pyx_L1_error)

    /* "coremusic/capi.pyx":1440
 *     # 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":1443
 *         raise MemoryError("Could not allocate buffer for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioUnitGetProperty(unit,
 *                                          <at.AudioUnitPropertyID>property_id,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1444
 * 
 *     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":1451
 *                                          &data_size)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioUnitGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":1452
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioUnitGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return buffer[:data_size]
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1452, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioUnitGetProperty_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __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, 1452, __pyx_L6_error)

      /* "coremusic/capi.pyx":1451
 *                                          &data_size)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioUnitGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":1454
 *             raise RuntimeError(f"AudioUnitGetProperty failed with status: {status}")
 * 
 *         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, 1454, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":1457
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_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_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_L1_error;
    }
    __pyx_L5_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":1421
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1460
 * 
 * 
 * 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_181audio_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_180audio_output_unit_start, "audio_output_unit_start(long audio_unit_id)\n\nStart an output audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_181audio_output_unit_start = {"audio_output_unit_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_181audio_output_unit_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_180audio_output_unit_start};
static PyObject *__pyx_pw_9coremusic_4capi_181audio_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, 1460, __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, 1460, __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, 1460, __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, 1460, __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, 1460, __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, 1460, __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, 1460, __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_180audio_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_180audio_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;
  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_output_unit_start", 0);

  /* "coremusic/capi.pyx":1462
 * 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":1464
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioOutputUnitStart failed with status: {status}")
*/
  __pyx_v_status = AudioOutputUnitStart(__pyx_v_unit);

  /* "coremusic/capi.pyx":1465
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioOutputUnitStart failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1466
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:
 *         raise RuntimeError(f"AudioOutputUnitStart failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioOutputUnitStart_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __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, 1466, __pyx_L1_error)

    /* "coremusic/capi.pyx":1465
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStart(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioOutputUnitStart failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1468
 *         raise RuntimeError(f"AudioOutputUnitStart failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1460
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1471
 * 
 * 
 * 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_183audio_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_182audio_output_unit_stop, "audio_output_unit_stop(long audio_unit_id)\n\nStop an output audio unit");
static PyMethodDef __pyx_mdef_9coremusic_4capi_183audio_output_unit_stop = {"audio_output_unit_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_183audio_output_unit_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_182audio_output_unit_stop};
static PyObject *__pyx_pw_9coremusic_4capi_183audio_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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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_182audio_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_182audio_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;
  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_output_unit_stop", 0);

  /* "coremusic/capi.pyx":1473
 * 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":1475
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AudioOutputUnitStop failed with status: {status}")
*/
  __pyx_v_status = AudioOutputUnitStop(__pyx_v_unit);

  /* "coremusic/capi.pyx":1476
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioOutputUnitStop failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1477
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:
 *         raise RuntimeError(f"AudioOutputUnitStop failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioOutputUnitStop_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __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, 1477, __pyx_L1_error)

    /* "coremusic/capi.pyx":1476
 * 
 *     cdef cf.OSStatus status = at.AudioOutputUnitStop(unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioOutputUnitStop failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1479
 *         raise RuntimeError(f"AudioOutputUnitStop failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1471
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1483
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitType_Output
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_185get_audio_unit_type_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_184get_audio_unit_type_output, "get_audio_unit_type_output()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_185get_audio_unit_type_output = {"get_audio_unit_type_output", (PyCFunction)__pyx_pw_9coremusic_4capi_185get_audio_unit_type_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_184get_audio_unit_type_output};
static PyObject *__pyx_pw_9coremusic_4capi_185get_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_184get_audio_unit_type_output(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_184get_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":1484
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():
 *     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, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1483
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     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":1486
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitType_MusicDevice
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_187get_audio_component_type_music_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_186get_audio_component_type_music_device, "get_audio_component_type_music_device()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_187get_audio_component_type_music_device = {"get_audio_component_type_music_device", (PyCFunction)__pyx_pw_9coremusic_4capi_187get_audio_component_type_music_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_186get_audio_component_type_music_device};
static PyObject *__pyx_pw_9coremusic_4capi_187get_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_186get_audio_component_type_music_device(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_186get_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":1487
 * 
 * def get_audio_component_type_music_device():
 *     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, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1486
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     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":1489
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_189get_audio_unit_subtype_default_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_188get_audio_unit_subtype_default_output, "get_audio_unit_subtype_default_output()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_189get_audio_unit_subtype_default_output = {"get_audio_unit_subtype_default_output", (PyCFunction)__pyx_pw_9coremusic_4capi_189get_audio_unit_subtype_default_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_188get_audio_unit_subtype_default_output};
static PyObject *__pyx_pw_9coremusic_4capi_189get_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_188get_audio_unit_subtype_default_output(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_188get_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":1490
 * 
 * def get_audio_unit_subtype_default_output():
 *     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, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1489
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     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":1492
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitManufacturer_Apple
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_191get_audio_unit_manufacturer_apple(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_190get_audio_unit_manufacturer_apple, "get_audio_unit_manufacturer_apple()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_191get_audio_unit_manufacturer_apple = {"get_audio_unit_manufacturer_apple", (PyCFunction)__pyx_pw_9coremusic_4capi_191get_audio_unit_manufacturer_apple, METH_NOARGS, __pyx_doc_9coremusic_4capi_190get_audio_unit_manufacturer_apple};
static PyObject *__pyx_pw_9coremusic_4capi_191get_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_190get_audio_unit_manufacturer_apple(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_190get_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":1493
 * 
 * def get_audio_unit_manufacturer_apple():
 *     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, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1492
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     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":1495
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitProperty_StreamFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_193get_audio_unit_property_stream_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_192get_audio_unit_property_stream_format, "get_audio_unit_property_stream_format()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_193get_audio_unit_property_stream_format = {"get_audio_unit_property_stream_format", (PyCFunction)__pyx_pw_9coremusic_4capi_193get_audio_unit_property_stream_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_192get_audio_unit_property_stream_format};
static PyObject *__pyx_pw_9coremusic_4capi_193get_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_192get_audio_unit_property_stream_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_192get_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":1496
 * 
 * def get_audio_unit_property_stream_format():
 *     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, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1495
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     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":1498
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_195get_audio_unit_property_set_render_callback(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_194get_audio_unit_property_set_render_callback, "get_audio_unit_property_set_render_callback()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_195get_audio_unit_property_set_render_callback = {"get_audio_unit_property_set_render_callback", (PyCFunction)__pyx_pw_9coremusic_4capi_195get_audio_unit_property_set_render_callback, METH_NOARGS, __pyx_doc_9coremusic_4capi_194get_audio_unit_property_set_render_callback};
static PyObject *__pyx_pw_9coremusic_4capi_195get_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_194get_audio_unit_property_set_render_callback(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_194get_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":1499
 * 
 * def get_audio_unit_property_set_render_callback():
 *     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, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1498
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     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":1501
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Input
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_197get_audio_unit_scope_input(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_196get_audio_unit_scope_input, "get_audio_unit_scope_input()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_197get_audio_unit_scope_input = {"get_audio_unit_scope_input", (PyCFunction)__pyx_pw_9coremusic_4capi_197get_audio_unit_scope_input, METH_NOARGS, __pyx_doc_9coremusic_4capi_196get_audio_unit_scope_input};
static PyObject *__pyx_pw_9coremusic_4capi_197get_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_196get_audio_unit_scope_input(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_196get_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":1502
 * 
 * def get_audio_unit_scope_input():
 *     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, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1501
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     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":1504
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Output
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_199get_audio_unit_scope_output(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_198get_audio_unit_scope_output, "get_audio_unit_scope_output()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_199get_audio_unit_scope_output = {"get_audio_unit_scope_output", (PyCFunction)__pyx_pw_9coremusic_4capi_199get_audio_unit_scope_output, METH_NOARGS, __pyx_doc_9coremusic_4capi_198get_audio_unit_scope_output};
static PyObject *__pyx_pw_9coremusic_4capi_199get_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_198get_audio_unit_scope_output(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_198get_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":1505
 * 
 * def get_audio_unit_scope_output():
 *     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, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1504
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     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":1507
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Global
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_201get_audio_unit_scope_global(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_200get_audio_unit_scope_global, "get_audio_unit_scope_global()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_201get_audio_unit_scope_global = {"get_audio_unit_scope_global", (PyCFunction)__pyx_pw_9coremusic_4capi_201get_audio_unit_scope_global, METH_NOARGS, __pyx_doc_9coremusic_4capi_200get_audio_unit_scope_global};
static PyObject *__pyx_pw_9coremusic_4capi_201get_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_200get_audio_unit_scope_global(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_200get_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":1508
 * 
 * def get_audio_unit_scope_global():
 *     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, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1507
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     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":1510
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_203get_linear_pcm_format_flag_is_non_interleaved(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_202get_linear_pcm_format_flag_is_non_interleaved, "get_linear_pcm_format_flag_is_non_interleaved()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_203get_linear_pcm_format_flag_is_non_interleaved = {"get_linear_pcm_format_flag_is_non_interleaved", (PyCFunction)__pyx_pw_9coremusic_4capi_203get_linear_pcm_format_flag_is_non_interleaved, METH_NOARGS, __pyx_doc_9coremusic_4capi_202get_linear_pcm_format_flag_is_non_interleaved};
static PyObject *__pyx_pw_9coremusic_4capi_203get_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_202get_linear_pcm_format_flag_is_non_interleaved(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_202get_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":1511
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():
 *     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, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1510
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     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":1529
 * 
 * 
 * def demonstrate_callback_infrastructure():             # <<<<<<<<<<<<<<
 *     """
 *     Demonstrate that we have all the infrastructure needed for audio callbacks.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_205demonstrate_callback_infrastructure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_204demonstrate_callback_infrastructure, "demonstrate_callback_infrastructure()\n\nDemonstrate that we have all the infrastructure needed for audio callbacks.\nThis shows the complete AudioUnit setup that would be needed for real playback.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_205demonstrate_callback_infrastructure = {"demonstrate_callback_infrastructure", (PyCFunction)__pyx_pw_9coremusic_4capi_205demonstrate_callback_infrastructure, METH_NOARGS, __pyx_doc_9coremusic_4capi_204demonstrate_callback_infrastructure};
static PyObject *__pyx_pw_9coremusic_4capi_205demonstrate_callback_infrastructure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("demonstrate_callback_infrastructure (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9coremusic_4capi_204demonstrate_callback_infrastructure(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_204demonstrate_callback_infrastructure(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("demonstrate_callback_infrastructure", 0);

  /* "coremusic/capi.pyx":1534
 *     This shows the complete AudioUnit setup that would be needed for real playback.
 *     """
 *     print("AudioUnit Callback Infrastructure Demonstration")             # <<<<<<<<<<<<<<
 *     print("   All components needed for real-time audio callbacks:")
 *     print("   AudioComponent discovery and instantiation")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_AudioUnit_Callback_Infrastructur};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1535
 *     """
 *     print("AudioUnit Callback Infrastructure Demonstration")
 *     print("   All components needed for real-time audio callbacks:")             # <<<<<<<<<<<<<<
 *     print("   AudioComponent discovery and instantiation")
 *     print("   AudioUnit lifecycle management")
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_All_components_needed_for_real};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1536
 *     print("AudioUnit Callback Infrastructure Demonstration")
 *     print("   All components needed for real-time audio callbacks:")
 *     print("   AudioComponent discovery and instantiation")             # <<<<<<<<<<<<<<
 *     print("   AudioUnit lifecycle management")
 *     print("   Format configuration and property setting")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_AudioComponent_discovery_and_in};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1537
 *     print("   All components needed for real-time audio callbacks:")
 *     print("   AudioComponent discovery and instantiation")
 *     print("   AudioUnit lifecycle management")             # <<<<<<<<<<<<<<
 *     print("   Format configuration and property setting")
 *     print("   Callback structure definitions (AURenderCallbackStruct)")
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_AudioUnit_lifecycle_management};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1538
 *     print("   AudioComponent discovery and instantiation")
 *     print("   AudioUnit lifecycle management")
 *     print("   Format configuration and property setting")             # <<<<<<<<<<<<<<
 *     print("   Callback structure definitions (AURenderCallbackStruct)")
 *     print("   AudioUnit property setting for render callbacks")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Format_configuration_and_proper};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1539
 *     print("   AudioUnit lifecycle management")
 *     print("   Format configuration and property setting")
 *     print("   Callback structure definitions (AURenderCallbackStruct)")             # <<<<<<<<<<<<<<
 *     print("   AudioUnit property setting for render callbacks")
 *     print("   Real-time audio buffer management (AudioBufferList)")
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Callback_structure_definitions};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1540
 *     print("   Format configuration and property setting")
 *     print("   Callback structure definitions (AURenderCallbackStruct)")
 *     print("   AudioUnit property setting for render callbacks")             # <<<<<<<<<<<<<<
 *     print("   Real-time audio buffer management (AudioBufferList)")
 *     print("   Hardware audio output control")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_AudioUnit_property_setting_for};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1541
 *     print("   Callback structure definitions (AURenderCallbackStruct)")
 *     print("   AudioUnit property setting for render callbacks")
 *     print("   Real-time audio buffer management (AudioBufferList)")             # <<<<<<<<<<<<<<
 *     print("   Hardware audio output control")
 *     print()
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Real_time_audio_buffer_manageme};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1542
 *     print("   AudioUnit property setting for render callbacks")
 *     print("   Real-time audio buffer management (AudioBufferList)")
 *     print("   Hardware audio output control")             # <<<<<<<<<<<<<<
 *     print()
 *     print("For actual audio playback with render callbacks:")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Hardware_audio_output_control};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1543
 *     print("   Real-time audio buffer management (AudioBufferList)")
 *     print("   Hardware audio output control")
 *     print()             # <<<<<<<<<<<<<<
 *     print("For actual audio playback with render callbacks:")
 *     print("    The AudioUnit infrastructure is complete and functional")
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1544
 *     print("   Hardware audio output control")
 *     print()
 *     print("For actual audio playback with render callbacks:")             # <<<<<<<<<<<<<<
 *     print("    The AudioUnit infrastructure is complete and functional")
 *     print("    Callback functions can be implemented in pure C extensions")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_For_actual_audio_playback_with_r};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1545
 *     print()
 *     print("For actual audio playback with render callbacks:")
 *     print("    The AudioUnit infrastructure is complete and functional")             # <<<<<<<<<<<<<<
 *     print("    Callback functions can be implemented in pure C extensions")
 *     print("    Or use higher-level Python audio libraries with our CoreAudio access")
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_AudioUnit_infrastructure_is};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1546
 *     print("For actual audio playback with render callbacks:")
 *     print("    The AudioUnit infrastructure is complete and functional")
 *     print("    Callback functions can be implemented in pure C extensions")             # <<<<<<<<<<<<<<
 *     print("    Or use higher-level Python audio libraries with our CoreAudio access")
 *     print("    All low-level CoreAudio APIs are now available through coremusic")
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Callback_functions_can_be_imple};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1547
 *     print("    The AudioUnit infrastructure is complete and functional")
 *     print("    Callback functions can be implemented in pure C extensions")
 *     print("    Or use higher-level Python audio libraries with our CoreAudio access")             # <<<<<<<<<<<<<<
 *     print("    All low-level CoreAudio APIs are now available through coremusic")
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_2 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Or_use_higher_level_Python_audi};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1548
 *     print("    Callback functions can be implemented in pure C extensions")
 *     print("    Or use higher-level Python audio libraries with our CoreAudio access")
 *     print("    All low-level CoreAudio APIs are now available through coremusic")             # <<<<<<<<<<<<<<
 * 
 *     return True
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_builtin_print);
  __pyx_t_3 = __pyx_builtin_print; 
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_All_low_level_CoreAudio_APIs_ar};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1550
 *     print("    All low-level CoreAudio APIs are now available through coremusic")
 * 
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1529
 * 
 * 
 * def demonstrate_callback_infrastructure():             # <<<<<<<<<<<<<<
 *     """
 *     Demonstrate that we have all the infrastructure needed for audio callbacks.
*/

  /* 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.demonstrate_callback_infrastructure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1560
 *     cdef bint initialized
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioPlayer"""
 *         memset(&self.audio_output, 0, sizeof(ap.AudioOutput))
*/

/* 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");
#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) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  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);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 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("__init__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

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

static int __pyx_pf_9coremusic_4capi_11AudioPlayer___init__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  int __pyx_r;

  /* "coremusic/capi.pyx":1562
 *     def __init__(self):
 *         """Initialize the AudioPlayer"""
 *         memset(&self.audio_output, 0, sizeof(ap.AudioOutput))             # <<<<<<<<<<<<<<
 *         self.initialized = False
 * 
*/
  (void)(memset((&__pyx_v_self->audio_output), 0, (sizeof(AudioOutput))));

  /* "coremusic/capi.pyx":1563
 *         """Initialize the AudioPlayer"""
 *         memset(&self.audio_output, 0, sizeof(ap.AudioOutput))
 *         self.initialized = False             # <<<<<<<<<<<<<<
 * 
 *     def load_file(self, str file_path):
*/
  __pyx_v_self->initialized = 0;

  /* "coremusic/capi.pyx":1560
 *     cdef bint initialized
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Initialize the AudioPlayer"""
 *         memset(&self.audio_output, 0, sizeof(ap.AudioOutput))
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "coremusic/capi.pyx":1565
 *         self.initialized = False
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback"""
 *         cdef bytes path_bytes = file_path.encode('utf-8')
*/

/* 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");
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, 1565, __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, 1565, __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, 1565, __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, 1565, __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, 1565, __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, 1565, __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, 1565, __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;
  OSStatus __pyx_v_result;
  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;
  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("load_file", 0);

  /* "coremusic/capi.pyx":1567
 *     def load_file(self, str file_path):
 *         """Load an audio file for playback"""
 *         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, 1567, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1570
 *         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, 1570, __pyx_L1_error)

  /* "coremusic/capi.pyx":1571
 *             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, 1571, __pyx_L1_error)

  /* "coremusic/capi.pyx":1568
 *         """Load an audio file for playback"""
 *         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":1575
 *         )
 * 
 *         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":1576
 * 
 *         if url_ref == NULL:
 *             raise ValueError(f"Could not create URL for file: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus result = ap.LoadAudioFile(url_ref, &self.audio_output.playerData)
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_6 = __pyx_builtin_ValueError; 
    __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_for_file, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __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, 1576, __pyx_L1_error)

    /* "coremusic/capi.pyx":1575
 *         )
 * 
 *         if url_ref == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1578
 *             raise ValueError(f"Could not create URL for file: {file_path}")
 * 
 *         cdef cf.OSStatus result = ap.LoadAudioFile(url_ref, &self.audio_output.playerData)             # <<<<<<<<<<<<<<
 *         cf.CFRelease(url_ref)
 * 
*/
  __pyx_v_result = LoadAudioFile(__pyx_v_url_ref, (&__pyx_v_self->audio_output.playerData));

  /* "coremusic/capi.pyx":1579
 * 
 *         cdef cf.OSStatus result = ap.LoadAudioFile(url_ref, &self.audio_output.playerData)
 *         cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *         if result != 0:  # noErr is 0
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":1581
 *         cf.CFRelease(url_ref)
 * 
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to load audio file: {result}")
 * 
*/
  __pyx_t_4 = (__pyx_v_result != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":1582
 * 
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to load audio file: {result}")             # <<<<<<<<<<<<<<
 * 
 *         return result
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_8 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_load_audio_file, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __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, 1582, __pyx_L1_error)

    /* "coremusic/capi.pyx":1581
 *         cf.CFRelease(url_ref)
 * 
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to load audio file: {result}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1584
 *             raise RuntimeError(f"Failed to load audio file: {result}")
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def setup_output(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1565
 *         self.initialized = False
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback"""
 *         cdef bytes path_bytes = file_path.encode('utf-8')
*/

  /* 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_XDECREF(__pyx_t_8);
  __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":1586
 *         return result
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
*/

/* 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) {
  OSStatus __pyx_v_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;
  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("setup_output", 0);

  /* "coremusic/capi.pyx":1588
 *     def setup_output(self):
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)             # <<<<<<<<<<<<<<
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to setup audio output: {result}")
*/
  __pyx_v_result = SetupAudioOutput((&__pyx_v_self->audio_output));

  /* "coremusic/capi.pyx":1589
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to setup audio output: {result}")
 *         self.initialized = True
*/
  __pyx_t_1 = (__pyx_v_result != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1590
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to setup audio output: {result}")             # <<<<<<<<<<<<<<
 *         self.initialized = True
 *         return result
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_setup_audio_output, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __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, 1590, __pyx_L1_error)

    /* "coremusic/capi.pyx":1589
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to setup audio output: {result}")
 *         self.initialized = True
*/
  }

  /* "coremusic/capi.pyx":1591
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to setup audio output: {result}")
 *         self.initialized = True             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  __pyx_v_self->initialized = 1;

  /* "coremusic/capi.pyx":1592
 *             raise RuntimeError(f"Failed to setup audio output: {result}")
 *         self.initialized = True
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def start(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1586
 *         return result
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
*/

  /* 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_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":1594
 *         return result
 * 
 *     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_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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  /* "coremusic/capi.pyx":1596
 *     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":1597
 *         """Start audio playback"""
 *         if not self.initialized:
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus result = ap.StartAudioOutput(&self.audio_output)
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_AudioPlayer_not_initialized_Call};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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, 1597, __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, 1597, __pyx_L1_error)

    /* "coremusic/capi.pyx":1596
 *     def start(self):
 *         """Start audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")
 * 
*/
  }

  /* "coremusic/capi.pyx":1599
 *             raise RuntimeError("AudioPlayer not initialized. Call setup_output() first.")
 * 
 *         cdef cf.OSStatus result = ap.StartAudioOutput(&self.audio_output)             # <<<<<<<<<<<<<<
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to start audio output: {result}")
*/
  __pyx_v_result = StartAudioOutput((&__pyx_v_self->audio_output));

  /* "coremusic/capi.pyx":1600
 * 
 *         cdef cf.OSStatus result = ap.StartAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to start audio output: {result}")
 *         return result
*/
  __pyx_t_1 = (__pyx_v_result != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1601
 *         cdef cf.OSStatus result = ap.StartAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to start audio output: {result}")             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_3 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_start_audio_output, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __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, 1601, __pyx_L1_error)

    /* "coremusic/capi.pyx":1600
 * 
 *         cdef cf.OSStatus result = ap.StartAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to start audio output: {result}")
 *         return result
*/
  }

  /* "coremusic/capi.pyx":1602
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to start audio output: {result}")
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def stop(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1594
 *         return result
 * 
 *     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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":1604
 *         return result
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio playback"""
 *         if not self.initialized:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_9stop(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_8stop, "AudioPlayer.stop(self)\n\nStop audio playback");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_9stop = {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_9stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_8stop};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_9stop(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_8stop(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

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

static PyObject *__pyx_pf_9coremusic_4capi_11AudioPlayer_8stop(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  OSStatus __pyx_v_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;
  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("stop", 0);

  /* "coremusic/capi.pyx":1606
 *     def stop(self):
 *         """Stop audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr is 0
 * 
*/
  __pyx_t_1 = (!__pyx_v_self->initialized);
  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":1607
 *         """Stop audio playback"""
 *         if not self.initialized:
 *             return 0  # noErr is 0             # <<<<<<<<<<<<<<
 * 
 *         cdef cf.OSStatus result = ap.StopAudioOutput(&self.audio_output)
*/
    __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":1606
 *     def stop(self):
 *         """Stop audio playback"""
 *         if not self.initialized:             # <<<<<<<<<<<<<<
 *             return 0  # noErr is 0
 * 
*/
  }

  /* "coremusic/capi.pyx":1609
 *             return 0  # noErr is 0
 * 
 *         cdef cf.OSStatus result = ap.StopAudioOutput(&self.audio_output)             # <<<<<<<<<<<<<<
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to stop audio output: {result}")
*/
  __pyx_v_result = StopAudioOutput((&__pyx_v_self->audio_output));

  /* "coremusic/capi.pyx":1610
 * 
 *         cdef cf.OSStatus result = ap.StopAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to stop audio output: {result}")
 *         return result
*/
  __pyx_t_1 = (__pyx_v_result != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1611
 *         cdef cf.OSStatus result = ap.StopAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to stop audio output: {result}")             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_stop_audio_output, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __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, 1611, __pyx_L1_error)

    /* "coremusic/capi.pyx":1610
 * 
 *         cdef cf.OSStatus result = ap.StopAudioOutput(&self.audio_output)
 *         if result != 0:  # noErr is 0             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"Failed to stop audio output: {result}")
 *         return result
*/
  }

  /* "coremusic/capi.pyx":1612
 *         if result != 0:  # noErr is 0
 *             raise RuntimeError(f"Failed to stop audio output: {result}")
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def set_looping(self, bint loop):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1604
 *         return result
 * 
 *     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_XDECREF(__pyx_t_6);
  __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":1614
 *         return result
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         ap.SetLooping(&self.audio_output.playerData, loop)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_11set_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_10set_looping, "AudioPlayer.set_looping(self, bool loop)\n\nEnable/disable looping playback");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_11set_looping = {"set_looping", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_11set_looping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_10set_looping};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_11set_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, 1614, __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, 1614, __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, 1614, __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, 1614, __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, 1614, __pyx_L3_error)
    }
    __pyx_v_loop = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_loop == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_looping", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1614, __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_10set_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_10set_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":1616
 *     def set_looping(self, bint loop):
 *         """Enable/disable looping playback"""
 *         ap.SetLooping(&self.audio_output.playerData, loop)             # <<<<<<<<<<<<<<
 * 
 *     def reset_playback(self):
*/
  SetLooping((&__pyx_v_self->audio_output.playerData), __pyx_v_loop);

  /* "coremusic/capi.pyx":1614
 *         return result
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         ap.SetLooping(&self.audio_output.playerData, loop)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1618
 *         ap.SetLooping(&self.audio_output.playerData, loop)
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         ap.ResetPlayback(&self.audio_output.playerData)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_13reset_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_12reset_playback, "AudioPlayer.reset_playback(self)\n\nReset playback to beginning");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_13reset_playback = {"reset_playback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_13reset_playback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_12reset_playback};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_13reset_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_12reset_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_12reset_playback(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_playback", 0);

  /* "coremusic/capi.pyx":1620
 *     def reset_playback(self):
 *         """Reset playback to beginning"""
 *         ap.ResetPlayback(&self.audio_output.playerData)             # <<<<<<<<<<<<<<
 * 
 *     def is_playing(self):
*/
  ResetPlayback((&__pyx_v_self->audio_output.playerData));

  /* "coremusic/capi.pyx":1618
 *         ap.SetLooping(&self.audio_output.playerData, loop)
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         ap.ResetPlayback(&self.audio_output.playerData)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "coremusic/capi.pyx":1622
 *         ap.ResetPlayback(&self.audio_output.playerData)
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_15is_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_14is_playing, "AudioPlayer.is_playing(self)\n\nCheck if audio is currently playing");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_15is_playing = {"is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_15is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_14is_playing};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_15is_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_14is_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_14is_playing(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {
  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("is_playing", 0);

  /* "coremusic/capi.pyx":1624
 *     def is_playing(self):
 *         """Check if audio is currently playing"""
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))             # <<<<<<<<<<<<<<
 * 
 *     def get_progress(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_Boolean(IsPlaying((&__pyx_v_self->audio_output.playerData))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1622
 *         ap.ResetPlayback(&self.audio_output.playerData)
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
*/

  /* 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":1626
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_17get_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_16get_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_17get_progress = {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_17get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_16get_progress};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_17get_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_16get_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_16get_progress(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("get_progress", 0);

  /* "coremusic/capi.pyx":1628
 *     def get_progress(self):
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(GetPlaybackProgress((&__pyx_v_self->audio_output.playerData))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1626
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __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":1630
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized:
*/

/* Python wrapper */
static void __pyx_pw_9coremusic_4capi_11AudioPlayer_19__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9coremusic_4capi_11AudioPlayer_19__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_18__dealloc__(((struct __pyx_obj_9coremusic_4capi_AudioPlayer *)__pyx_v_self));

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

static void __pyx_pf_9coremusic_4capi_11AudioPlayer_18__dealloc__(struct __pyx_obj_9coremusic_4capi_AudioPlayer *__pyx_v_self) {

  /* "coremusic/capi.pyx":1632
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized:             # <<<<<<<<<<<<<<
 *             ap.StopAudioOutput(&self.audio_output)
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
*/
  if (__pyx_v_self->initialized) {

    /* "coremusic/capi.pyx":1633
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized:
 *             ap.StopAudioOutput(&self.audio_output)             # <<<<<<<<<<<<<<
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
 *         if self.initialized:
*/
    (void)(StopAudioOutput((&__pyx_v_self->audio_output)));

    /* "coremusic/capi.pyx":1632
 *     def __dealloc__(self):
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized:             # <<<<<<<<<<<<<<
 *             ap.StopAudioOutput(&self.audio_output)
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
*/
  }

  /* "coremusic/capi.pyx":1634
 *         if self.initialized:
 *             ap.StopAudioOutput(&self.audio_output)
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)             # <<<<<<<<<<<<<<
 *         if self.initialized:
 *             ap.DisposeAudioOutput(&self.audio_output)
*/
  DisposeAudioPlayer((&__pyx_v_self->audio_output.playerData));

  /* "coremusic/capi.pyx":1635
 *             ap.StopAudioOutput(&self.audio_output)
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
 *         if self.initialized:             # <<<<<<<<<<<<<<
 *             ap.DisposeAudioOutput(&self.audio_output)
 * 
*/
  if (__pyx_v_self->initialized) {

    /* "coremusic/capi.pyx":1636
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
 *         if self.initialized:
 *             ap.DisposeAudioOutput(&self.audio_output)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    DisposeAudioOutput((&__pyx_v_self->audio_output));

    /* "coremusic/capi.pyx":1635
 *             ap.StopAudioOutput(&self.audio_output)
 *         ap.DisposeAudioPlayer(&self.audio_output.playerData)
 *         if self.initialized:             # <<<<<<<<<<<<<<
 *             ap.DisposeAudioOutput(&self.audio_output)
 * 
*/
  }

  /* "coremusic/capi.pyx":1630
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """Clean up resources when the object is destroyed"""
 *         if self.initialized:
*/

  /* function exit code */
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_21__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_20__reduce_cython__, "AudioPlayer.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_20__reduce_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_21__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_20__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_20__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.audio_output cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_audio_output_cannot_be_conv, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output 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.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_23__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_22__setstate_cython__, "AudioPlayer.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_9coremusic_4capi_11AudioPlayer_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_22__setstate_cython__};
static PyObject *__pyx_pw_9coremusic_4capi_11AudioPlayer_23__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_22__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_22__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.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_self_audio_output_cannot_be_conv, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output 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":1640
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_207get_audio_file_stream_property_ready_to_produce_packets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_206get_audio_file_stream_property_ready_to_produce_packets, "get_audio_file_stream_property_ready_to_produce_packets()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_207get_audio_file_stream_property_ready_to_produce_packets = {"get_audio_file_stream_property_ready_to_produce_packets", (PyCFunction)__pyx_pw_9coremusic_4capi_207get_audio_file_stream_property_ready_to_produce_packets, METH_NOARGS, __pyx_doc_9coremusic_4capi_206get_audio_file_stream_property_ready_to_produce_packets};
static PyObject *__pyx_pw_9coremusic_4capi_207get_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_206get_audio_file_stream_property_ready_to_produce_packets(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_206get_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":1641
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():
 *     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, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1640
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     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":1643
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_209get_audio_file_stream_property_file_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_208get_audio_file_stream_property_file_format, "get_audio_file_stream_property_file_format()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_209get_audio_file_stream_property_file_format = {"get_audio_file_stream_property_file_format", (PyCFunction)__pyx_pw_9coremusic_4capi_209get_audio_file_stream_property_file_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_208get_audio_file_stream_property_file_format};
static PyObject *__pyx_pw_9coremusic_4capi_209get_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_208get_audio_file_stream_property_file_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_208get_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":1644
 * 
 * def get_audio_file_stream_property_file_format():
 *     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, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1643
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     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":1646
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_211get_audio_file_stream_property_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_210get_audio_file_stream_property_data_format, "get_audio_file_stream_property_data_format()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_211get_audio_file_stream_property_data_format = {"get_audio_file_stream_property_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_211get_audio_file_stream_property_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_210get_audio_file_stream_property_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_211get_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_210get_audio_file_stream_property_data_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_210get_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":1647
 * 
 * def get_audio_file_stream_property_data_format():
 *     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, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1646
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     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":1649
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FormatList
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_213get_audio_file_stream_property_format_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_212get_audio_file_stream_property_format_list, "get_audio_file_stream_property_format_list()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_213get_audio_file_stream_property_format_list = {"get_audio_file_stream_property_format_list", (PyCFunction)__pyx_pw_9coremusic_4capi_213get_audio_file_stream_property_format_list, METH_NOARGS, __pyx_doc_9coremusic_4capi_212get_audio_file_stream_property_format_list};
static PyObject *__pyx_pw_9coremusic_4capi_213get_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_212get_audio_file_stream_property_format_list(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_212get_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":1650
 * 
 * def get_audio_file_stream_property_format_list():
 *     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, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1649
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     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":1652
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_215get_audio_file_stream_property_magic_cookie_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_214get_audio_file_stream_property_magic_cookie_data, "get_audio_file_stream_property_magic_cookie_data()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_215get_audio_file_stream_property_magic_cookie_data = {"get_audio_file_stream_property_magic_cookie_data", (PyCFunction)__pyx_pw_9coremusic_4capi_215get_audio_file_stream_property_magic_cookie_data, METH_NOARGS, __pyx_doc_9coremusic_4capi_214get_audio_file_stream_property_magic_cookie_data};
static PyObject *__pyx_pw_9coremusic_4capi_215get_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_214get_audio_file_stream_property_magic_cookie_data(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_214get_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":1653
 * 
 * def get_audio_file_stream_property_magic_cookie_data():
 *     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, 1653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1652
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     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":1655
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_217get_audio_file_stream_property_audio_data_byte_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_216get_audio_file_stream_property_audio_data_byte_count, "get_audio_file_stream_property_audio_data_byte_count()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_217get_audio_file_stream_property_audio_data_byte_count = {"get_audio_file_stream_property_audio_data_byte_count", (PyCFunction)__pyx_pw_9coremusic_4capi_217get_audio_file_stream_property_audio_data_byte_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_216get_audio_file_stream_property_audio_data_byte_count};
static PyObject *__pyx_pw_9coremusic_4capi_217get_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_216get_audio_file_stream_property_audio_data_byte_count(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_216get_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":1656
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():
 *     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, 1656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1655
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     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":1658
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_219get_audio_file_stream_property_audio_data_packet_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_218get_audio_file_stream_property_audio_data_packet_count, "get_audio_file_stream_property_audio_data_packet_count()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_219get_audio_file_stream_property_audio_data_packet_count = {"get_audio_file_stream_property_audio_data_packet_count", (PyCFunction)__pyx_pw_9coremusic_4capi_219get_audio_file_stream_property_audio_data_packet_count, METH_NOARGS, __pyx_doc_9coremusic_4capi_218get_audio_file_stream_property_audio_data_packet_count};
static PyObject *__pyx_pw_9coremusic_4capi_219get_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_218get_audio_file_stream_property_audio_data_packet_count(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_218get_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":1659
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():
 *     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, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1658
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     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":1661
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_221get_audio_file_stream_property_maximum_packet_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_220get_audio_file_stream_property_maximum_packet_size, "get_audio_file_stream_property_maximum_packet_size()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_221get_audio_file_stream_property_maximum_packet_size = {"get_audio_file_stream_property_maximum_packet_size", (PyCFunction)__pyx_pw_9coremusic_4capi_221get_audio_file_stream_property_maximum_packet_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_220get_audio_file_stream_property_maximum_packet_size};
static PyObject *__pyx_pw_9coremusic_4capi_221get_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_220get_audio_file_stream_property_maximum_packet_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_220get_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":1662
 * 
 * def get_audio_file_stream_property_maximum_packet_size():
 *     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, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1661
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     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":1664
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_223get_audio_file_stream_property_data_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_222get_audio_file_stream_property_data_offset, "get_audio_file_stream_property_data_offset()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_223get_audio_file_stream_property_data_offset = {"get_audio_file_stream_property_data_offset", (PyCFunction)__pyx_pw_9coremusic_4capi_223get_audio_file_stream_property_data_offset, METH_NOARGS, __pyx_doc_9coremusic_4capi_222get_audio_file_stream_property_data_offset};
static PyObject *__pyx_pw_9coremusic_4capi_223get_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_222get_audio_file_stream_property_data_offset(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_222get_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":1665
 * 
 * def get_audio_file_stream_property_data_offset():
 *     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, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1664
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     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":1667
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_225get_audio_file_stream_property_channel_layout(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_224get_audio_file_stream_property_channel_layout, "get_audio_file_stream_property_channel_layout()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_225get_audio_file_stream_property_channel_layout = {"get_audio_file_stream_property_channel_layout", (PyCFunction)__pyx_pw_9coremusic_4capi_225get_audio_file_stream_property_channel_layout, METH_NOARGS, __pyx_doc_9coremusic_4capi_224get_audio_file_stream_property_channel_layout};
static PyObject *__pyx_pw_9coremusic_4capi_225get_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_224get_audio_file_stream_property_channel_layout(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_224get_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":1668
 * 
 * def get_audio_file_stream_property_channel_layout():
 *     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, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1667
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     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":1670
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_227get_audio_file_stream_property_packet_to_frame(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_226get_audio_file_stream_property_packet_to_frame, "get_audio_file_stream_property_packet_to_frame()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_227get_audio_file_stream_property_packet_to_frame = {"get_audio_file_stream_property_packet_to_frame", (PyCFunction)__pyx_pw_9coremusic_4capi_227get_audio_file_stream_property_packet_to_frame, METH_NOARGS, __pyx_doc_9coremusic_4capi_226get_audio_file_stream_property_packet_to_frame};
static PyObject *__pyx_pw_9coremusic_4capi_227get_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_226get_audio_file_stream_property_packet_to_frame(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_226get_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":1671
 * 
 * def get_audio_file_stream_property_packet_to_frame():
 *     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, 1671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1670
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     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":1673
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_229get_audio_file_stream_property_frame_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_228get_audio_file_stream_property_frame_to_packet, "get_audio_file_stream_property_frame_to_packet()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_229get_audio_file_stream_property_frame_to_packet = {"get_audio_file_stream_property_frame_to_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_229get_audio_file_stream_property_frame_to_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_228get_audio_file_stream_property_frame_to_packet};
static PyObject *__pyx_pw_9coremusic_4capi_229get_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_228get_audio_file_stream_property_frame_to_packet(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_228get_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":1674
 * 
 * def get_audio_file_stream_property_frame_to_packet():
 *     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, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1673
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     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":1676
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_231get_audio_file_stream_property_packet_to_byte(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_230get_audio_file_stream_property_packet_to_byte, "get_audio_file_stream_property_packet_to_byte()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_231get_audio_file_stream_property_packet_to_byte = {"get_audio_file_stream_property_packet_to_byte", (PyCFunction)__pyx_pw_9coremusic_4capi_231get_audio_file_stream_property_packet_to_byte, METH_NOARGS, __pyx_doc_9coremusic_4capi_230get_audio_file_stream_property_packet_to_byte};
static PyObject *__pyx_pw_9coremusic_4capi_231get_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_230get_audio_file_stream_property_packet_to_byte(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_230get_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":1677
 * 
 * def get_audio_file_stream_property_packet_to_byte():
 *     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, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1676
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     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":1679
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_233get_audio_file_stream_property_byte_to_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_232get_audio_file_stream_property_byte_to_packet, "get_audio_file_stream_property_byte_to_packet()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_233get_audio_file_stream_property_byte_to_packet = {"get_audio_file_stream_property_byte_to_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_233get_audio_file_stream_property_byte_to_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_232get_audio_file_stream_property_byte_to_packet};
static PyObject *__pyx_pw_9coremusic_4capi_233get_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_232get_audio_file_stream_property_byte_to_packet(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_232get_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":1680
 * 
 * def get_audio_file_stream_property_byte_to_packet():
 *     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, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1679
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     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":1682
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_235get_audio_file_stream_property_packet_table_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_234get_audio_file_stream_property_packet_table_info, "get_audio_file_stream_property_packet_table_info()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_235get_audio_file_stream_property_packet_table_info = {"get_audio_file_stream_property_packet_table_info", (PyCFunction)__pyx_pw_9coremusic_4capi_235get_audio_file_stream_property_packet_table_info, METH_NOARGS, __pyx_doc_9coremusic_4capi_234get_audio_file_stream_property_packet_table_info};
static PyObject *__pyx_pw_9coremusic_4capi_235get_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_234get_audio_file_stream_property_packet_table_info(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_234get_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":1683
 * 
 * def get_audio_file_stream_property_packet_table_info():
 *     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, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1682
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     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":1685
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_237get_audio_file_stream_property_packet_size_upper_bound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_236get_audio_file_stream_property_packet_size_upper_bound, "get_audio_file_stream_property_packet_size_upper_bound()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_237get_audio_file_stream_property_packet_size_upper_bound = {"get_audio_file_stream_property_packet_size_upper_bound", (PyCFunction)__pyx_pw_9coremusic_4capi_237get_audio_file_stream_property_packet_size_upper_bound, METH_NOARGS, __pyx_doc_9coremusic_4capi_236get_audio_file_stream_property_packet_size_upper_bound};
static PyObject *__pyx_pw_9coremusic_4capi_237get_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_236get_audio_file_stream_property_packet_size_upper_bound(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_236get_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":1686
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():
 *     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, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1685
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     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":1688
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_239get_audio_file_stream_property_average_bytes_per_packet(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_238get_audio_file_stream_property_average_bytes_per_packet, "get_audio_file_stream_property_average_bytes_per_packet()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_239get_audio_file_stream_property_average_bytes_per_packet = {"get_audio_file_stream_property_average_bytes_per_packet", (PyCFunction)__pyx_pw_9coremusic_4capi_239get_audio_file_stream_property_average_bytes_per_packet, METH_NOARGS, __pyx_doc_9coremusic_4capi_238get_audio_file_stream_property_average_bytes_per_packet};
static PyObject *__pyx_pw_9coremusic_4capi_239get_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_238get_audio_file_stream_property_average_bytes_per_packet(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_238get_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":1689
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():
 *     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, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1688
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     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":1691
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_BitRate
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_241get_audio_file_stream_property_bit_rate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_240get_audio_file_stream_property_bit_rate, "get_audio_file_stream_property_bit_rate()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_241get_audio_file_stream_property_bit_rate = {"get_audio_file_stream_property_bit_rate", (PyCFunction)__pyx_pw_9coremusic_4capi_241get_audio_file_stream_property_bit_rate, METH_NOARGS, __pyx_doc_9coremusic_4capi_240get_audio_file_stream_property_bit_rate};
static PyObject *__pyx_pw_9coremusic_4capi_241get_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_240get_audio_file_stream_property_bit_rate(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_240get_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":1692
 * 
 * def get_audio_file_stream_property_bit_rate():
 *     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, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1691
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     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":1694
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_InfoDictionary
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_243get_audio_file_stream_property_info_dictionary(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_242get_audio_file_stream_property_info_dictionary, "get_audio_file_stream_property_info_dictionary()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_243get_audio_file_stream_property_info_dictionary = {"get_audio_file_stream_property_info_dictionary", (PyCFunction)__pyx_pw_9coremusic_4capi_243get_audio_file_stream_property_info_dictionary, METH_NOARGS, __pyx_doc_9coremusic_4capi_242get_audio_file_stream_property_info_dictionary};
static PyObject *__pyx_pw_9coremusic_4capi_243get_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_242get_audio_file_stream_property_info_dictionary(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_242get_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":1695
 * 
 * def get_audio_file_stream_property_info_dictionary():
 *     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, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1694
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     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":1698
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_245get_audio_file_stream_property_flag_property_is_cached(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_244get_audio_file_stream_property_flag_property_is_cached, "get_audio_file_stream_property_flag_property_is_cached()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_245get_audio_file_stream_property_flag_property_is_cached = {"get_audio_file_stream_property_flag_property_is_cached", (PyCFunction)__pyx_pw_9coremusic_4capi_245get_audio_file_stream_property_flag_property_is_cached, METH_NOARGS, __pyx_doc_9coremusic_4capi_244get_audio_file_stream_property_flag_property_is_cached};
static PyObject *__pyx_pw_9coremusic_4capi_245get_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_244get_audio_file_stream_property_flag_property_is_cached(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_244get_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":1699
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():
 *     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, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1698
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     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":1701
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_247get_audio_file_stream_property_flag_cache_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_246get_audio_file_stream_property_flag_cache_property, "get_audio_file_stream_property_flag_cache_property()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_247get_audio_file_stream_property_flag_cache_property = {"get_audio_file_stream_property_flag_cache_property", (PyCFunction)__pyx_pw_9coremusic_4capi_247get_audio_file_stream_property_flag_cache_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_246get_audio_file_stream_property_flag_cache_property};
static PyObject *__pyx_pw_9coremusic_4capi_247get_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_246get_audio_file_stream_property_flag_cache_property(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_246get_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":1702
 * 
 * def get_audio_file_stream_property_flag_cache_property():
 *     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, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1701
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     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":1704
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_249get_audio_file_stream_parse_flag_discontinuity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_248get_audio_file_stream_parse_flag_discontinuity, "get_audio_file_stream_parse_flag_discontinuity()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_249get_audio_file_stream_parse_flag_discontinuity = {"get_audio_file_stream_parse_flag_discontinuity", (PyCFunction)__pyx_pw_9coremusic_4capi_249get_audio_file_stream_parse_flag_discontinuity, METH_NOARGS, __pyx_doc_9coremusic_4capi_248get_audio_file_stream_parse_flag_discontinuity};
static PyObject *__pyx_pw_9coremusic_4capi_249get_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_248get_audio_file_stream_parse_flag_discontinuity(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_248get_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":1705
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():
 *     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, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1704
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     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":1707
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_251get_audio_file_stream_seek_flag_offset_is_estimated(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_250get_audio_file_stream_seek_flag_offset_is_estimated, "get_audio_file_stream_seek_flag_offset_is_estimated()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_251get_audio_file_stream_seek_flag_offset_is_estimated = {"get_audio_file_stream_seek_flag_offset_is_estimated", (PyCFunction)__pyx_pw_9coremusic_4capi_251get_audio_file_stream_seek_flag_offset_is_estimated, METH_NOARGS, __pyx_doc_9coremusic_4capi_250get_audio_file_stream_seek_flag_offset_is_estimated};
static PyObject *__pyx_pw_9coremusic_4capi_251get_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_250get_audio_file_stream_seek_flag_offset_is_estimated(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_250get_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":1708
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():
 *     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, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1707
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     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":1711
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_253get_audio_file_stream_error_unsupported_file_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_252get_audio_file_stream_error_unsupported_file_type, "get_audio_file_stream_error_unsupported_file_type()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_253get_audio_file_stream_error_unsupported_file_type = {"get_audio_file_stream_error_unsupported_file_type", (PyCFunction)__pyx_pw_9coremusic_4capi_253get_audio_file_stream_error_unsupported_file_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_252get_audio_file_stream_error_unsupported_file_type};
static PyObject *__pyx_pw_9coremusic_4capi_253get_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_252get_audio_file_stream_error_unsupported_file_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_252get_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":1712
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():
 *     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, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1711
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     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":1714
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_255get_audio_file_stream_error_unsupported_data_format(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_254get_audio_file_stream_error_unsupported_data_format, "get_audio_file_stream_error_unsupported_data_format()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_255get_audio_file_stream_error_unsupported_data_format = {"get_audio_file_stream_error_unsupported_data_format", (PyCFunction)__pyx_pw_9coremusic_4capi_255get_audio_file_stream_error_unsupported_data_format, METH_NOARGS, __pyx_doc_9coremusic_4capi_254get_audio_file_stream_error_unsupported_data_format};
static PyObject *__pyx_pw_9coremusic_4capi_255get_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_254get_audio_file_stream_error_unsupported_data_format(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_254get_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":1715
 * 
 * def get_audio_file_stream_error_unsupported_data_format():
 *     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, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1714
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     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":1717
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_257get_audio_file_stream_error_unsupported_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_256get_audio_file_stream_error_unsupported_property, "get_audio_file_stream_error_unsupported_property()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_257get_audio_file_stream_error_unsupported_property = {"get_audio_file_stream_error_unsupported_property", (PyCFunction)__pyx_pw_9coremusic_4capi_257get_audio_file_stream_error_unsupported_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_256get_audio_file_stream_error_unsupported_property};
static PyObject *__pyx_pw_9coremusic_4capi_257get_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_256get_audio_file_stream_error_unsupported_property(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_256get_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":1718
 * 
 * def get_audio_file_stream_error_unsupported_property():
 *     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, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1717
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     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":1720
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_259get_audio_file_stream_error_bad_property_size(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_258get_audio_file_stream_error_bad_property_size, "get_audio_file_stream_error_bad_property_size()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_259get_audio_file_stream_error_bad_property_size = {"get_audio_file_stream_error_bad_property_size", (PyCFunction)__pyx_pw_9coremusic_4capi_259get_audio_file_stream_error_bad_property_size, METH_NOARGS, __pyx_doc_9coremusic_4capi_258get_audio_file_stream_error_bad_property_size};
static PyObject *__pyx_pw_9coremusic_4capi_259get_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_258get_audio_file_stream_error_bad_property_size(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_258get_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":1721
 * 
 * def get_audio_file_stream_error_bad_property_size():
 *     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, 1721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1720
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     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":1723
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_NotOptimized
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_261get_audio_file_stream_error_not_optimized(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_260get_audio_file_stream_error_not_optimized, "get_audio_file_stream_error_not_optimized()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_261get_audio_file_stream_error_not_optimized = {"get_audio_file_stream_error_not_optimized", (PyCFunction)__pyx_pw_9coremusic_4capi_261get_audio_file_stream_error_not_optimized, METH_NOARGS, __pyx_doc_9coremusic_4capi_260get_audio_file_stream_error_not_optimized};
static PyObject *__pyx_pw_9coremusic_4capi_261get_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_260get_audio_file_stream_error_not_optimized(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_260get_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":1724
 * 
 * def get_audio_file_stream_error_not_optimized():
 *     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, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1723
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     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":1726
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_263get_audio_file_stream_error_invalid_packet_offset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_262get_audio_file_stream_error_invalid_packet_offset, "get_audio_file_stream_error_invalid_packet_offset()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_263get_audio_file_stream_error_invalid_packet_offset = {"get_audio_file_stream_error_invalid_packet_offset", (PyCFunction)__pyx_pw_9coremusic_4capi_263get_audio_file_stream_error_invalid_packet_offset, METH_NOARGS, __pyx_doc_9coremusic_4capi_262get_audio_file_stream_error_invalid_packet_offset};
static PyObject *__pyx_pw_9coremusic_4capi_263get_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_262get_audio_file_stream_error_invalid_packet_offset(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_262get_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":1727
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():
 *     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, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1726
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     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":1729
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_InvalidFile
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_265get_audio_file_stream_error_invalid_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_264get_audio_file_stream_error_invalid_file, "get_audio_file_stream_error_invalid_file()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_265get_audio_file_stream_error_invalid_file = {"get_audio_file_stream_error_invalid_file", (PyCFunction)__pyx_pw_9coremusic_4capi_265get_audio_file_stream_error_invalid_file, METH_NOARGS, __pyx_doc_9coremusic_4capi_264get_audio_file_stream_error_invalid_file};
static PyObject *__pyx_pw_9coremusic_4capi_265get_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_264get_audio_file_stream_error_invalid_file(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_264get_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":1730
 * 
 * def get_audio_file_stream_error_invalid_file():
 *     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, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1729
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     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":1732
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_267get_audio_file_stream_error_value_unknown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_266get_audio_file_stream_error_value_unknown, "get_audio_file_stream_error_value_unknown()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_267get_audio_file_stream_error_value_unknown = {"get_audio_file_stream_error_value_unknown", (PyCFunction)__pyx_pw_9coremusic_4capi_267get_audio_file_stream_error_value_unknown, METH_NOARGS, __pyx_doc_9coremusic_4capi_266get_audio_file_stream_error_value_unknown};
static PyObject *__pyx_pw_9coremusic_4capi_267get_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_266get_audio_file_stream_error_value_unknown(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_266get_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":1733
 * 
 * def get_audio_file_stream_error_value_unknown():
 *     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, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1732
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     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":1735
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_269get_audio_file_stream_error_data_unavailable(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_268get_audio_file_stream_error_data_unavailable, "get_audio_file_stream_error_data_unavailable()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_269get_audio_file_stream_error_data_unavailable = {"get_audio_file_stream_error_data_unavailable", (PyCFunction)__pyx_pw_9coremusic_4capi_269get_audio_file_stream_error_data_unavailable, METH_NOARGS, __pyx_doc_9coremusic_4capi_268get_audio_file_stream_error_data_unavailable};
static PyObject *__pyx_pw_9coremusic_4capi_269get_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_268get_audio_file_stream_error_data_unavailable(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_268get_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":1736
 * 
 * def get_audio_file_stream_error_data_unavailable():
 *     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, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1735
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     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":1738
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_271get_audio_file_stream_error_illegal_operation(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_270get_audio_file_stream_error_illegal_operation, "get_audio_file_stream_error_illegal_operation()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_271get_audio_file_stream_error_illegal_operation = {"get_audio_file_stream_error_illegal_operation", (PyCFunction)__pyx_pw_9coremusic_4capi_271get_audio_file_stream_error_illegal_operation, METH_NOARGS, __pyx_doc_9coremusic_4capi_270get_audio_file_stream_error_illegal_operation};
static PyObject *__pyx_pw_9coremusic_4capi_271get_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_270get_audio_file_stream_error_illegal_operation(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_270get_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":1739
 * 
 * def get_audio_file_stream_error_illegal_operation():
 *     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, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1738
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     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":1741
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_273get_audio_file_stream_error_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_272get_audio_file_stream_error_unspecified_error, "get_audio_file_stream_error_unspecified_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_273get_audio_file_stream_error_unspecified_error = {"get_audio_file_stream_error_unspecified_error", (PyCFunction)__pyx_pw_9coremusic_4capi_273get_audio_file_stream_error_unspecified_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_272get_audio_file_stream_error_unspecified_error};
static PyObject *__pyx_pw_9coremusic_4capi_273get_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_272get_audio_file_stream_error_unspecified_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_272get_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":1742
 * 
 * def get_audio_file_stream_error_unspecified_error():
 *     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, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1741
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     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":1744
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_275get_audio_file_stream_error_discontinuity_cant_recover(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_274get_audio_file_stream_error_discontinuity_cant_recover, "get_audio_file_stream_error_discontinuity_cant_recover()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_275get_audio_file_stream_error_discontinuity_cant_recover = {"get_audio_file_stream_error_discontinuity_cant_recover", (PyCFunction)__pyx_pw_9coremusic_4capi_275get_audio_file_stream_error_discontinuity_cant_recover, METH_NOARGS, __pyx_doc_9coremusic_4capi_274get_audio_file_stream_error_discontinuity_cant_recover};
static PyObject *__pyx_pw_9coremusic_4capi_275get_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_274get_audio_file_stream_error_discontinuity_cant_recover(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_274get_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":1745
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():
 *     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, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1744
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     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":1749
 * 
 * # 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_277audio_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_276audio_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_277audio_services_create_system_sound_id = {"audio_services_create_system_sound_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_277audio_services_create_system_sound_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_276audio_services_create_system_sound_id};
static PyObject *__pyx_pw_9coremusic_4capi_277audio_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, 1749, __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, 1749, __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, 1749, __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, 1749, __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, 1749, __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, 1749, __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, 1749, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_276audio_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_276audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = 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":1753
 *     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, 1753, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":1757
 *     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, 1757, __pyx_L1_error)

  /* "coremusic/capi.pyx":1758
 *         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, 1758, __pyx_L1_error)

  /* "coremusic/capi.pyx":1755
 *     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":1762
 *     )
 * 
 *     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":1763
 * 
 *     if not url_ref:
 *         raise ValueError("Could not create URL from file path")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.AudioServicesCreateSystemSoundID(
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_6 = __pyx_builtin_ValueError; 
    __pyx_t_7 = 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(__pyx_t_6, __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_1)) __PYX_ERR(0, 1763, __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, 1763, __pyx_L1_error)

    /* "coremusic/capi.pyx":1762
 *     )
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create URL from file path")
 * 
*/
  }

  /* "coremusic/capi.pyx":1765
 *         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":1770
 *     )
 * 
 *     cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  CFRelease(__pyx_v_url_ref);

  /* "coremusic/capi.pyx":1772
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesCreateSystemSoundID failed with status: {status}")
 * 
*/
  __pyx_t_4 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_4)) {

    /* "coremusic/capi.pyx":1773
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioServicesCreateSystemSoundID failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>sound_id
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_8 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioServicesCreateSystemSoundID, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __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;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __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, 1773, __pyx_L1_error)

    /* "coremusic/capi.pyx":1772
 *     cf.CFRelease(url_ref)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesCreateSystemSoundID failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1775
 *         raise RuntimeError(f"AudioServicesCreateSystemSoundID failed with status: {status}")
 * 
 *     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, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1749
 * 
 * # 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":1778
 * 
 * 
 * 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_279audio_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_278audio_services_dispose_system_sound_id, "audio_services_dispose_system_sound_id(long sound_id)\n\nDispose a SystemSoundID");
static PyMethodDef __pyx_mdef_9coremusic_4capi_279audio_services_dispose_system_sound_id = {"audio_services_dispose_system_sound_id", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_279audio_services_dispose_system_sound_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_278audio_services_dispose_system_sound_id};
static PyObject *__pyx_pw_9coremusic_4capi_279audio_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, 1778, __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, 1778, __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, 1778, __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, 1778, __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, 1778, __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, 1778, __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, 1778, __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_278audio_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_278audio_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;
  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_services_dispose_system_sound_id", 0);

  /* "coremusic/capi.pyx":1780
 * 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":1781
 *     """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":1783
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesDisposeSystemSoundID failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1784
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioServicesDisposeSystemSoundID failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioServicesDisposeSystemSoundI, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __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, 1784, __pyx_L1_error)

    /* "coremusic/capi.pyx":1783
 *     cdef cf.OSStatus status = at.AudioServicesDisposeSystemSoundID(system_sound_id)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesDisposeSystemSoundID failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1786
 *         raise RuntimeError(f"AudioServicesDisposeSystemSoundID failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1778
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":1789
 * 
 * 
 * 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_281audio_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_280audio_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_281audio_services_play_system_sound = {"audio_services_play_system_sound", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_281audio_services_play_system_sound, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_280audio_services_play_system_sound};
static PyObject *__pyx_pw_9coremusic_4capi_281audio_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, 1789, __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, 1789, __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, 1789, __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, 1789, __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, 1789, __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, 1789, __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, 1789, __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_280audio_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_280audio_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":1791
 * 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":1792
 *     """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":1789
 * 
 * 
 * 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":1795
 * 
 * 
 * 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_283audio_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_282audio_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_283audio_services_play_alert_sound = {"audio_services_play_alert_sound", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_283audio_services_play_alert_sound, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_282audio_services_play_alert_sound};
static PyObject *__pyx_pw_9coremusic_4capi_283audio_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, 1795, __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, 1795, __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, 1795, __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, 1795, __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, 1795, __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, 1795, __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, 1795, __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_282audio_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_282audio_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":1797
 * 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":1798
 *     """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":1795
 * 
 * 
 * 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":1801
 * 
 * 
 * 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_285audio_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_284audio_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_285audio_services_get_property = {"audio_services_get_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_285audio_services_get_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_284audio_services_get_property};
static PyObject *__pyx_pw_9coremusic_4capi_285audio_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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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, 1801, __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_284audio_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_284audio_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;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_services_get_property", 0);

  /* "coremusic/capi.pyx":1803
 * 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":1804
 *     """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":1805
 *     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":1806
 *     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":1811
 *     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":1812
 *         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":1809
 * 
 *     # 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":1817
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesGetPropertyInfo failed with status: {status}")
 * 
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":1818
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioServicesGetPropertyInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     # Allocate buffer and get property data
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioServicesGetPropertyInfo_fai, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_1 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __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_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __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, 1818, __pyx_L1_error)

    /* "coremusic/capi.pyx":1817
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesGetPropertyInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1821
 * 
 *     # 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":1822
 *     # 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":1823
 *     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":1824
 *     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_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_7 = __pyx_builtin_MemoryError; 
    __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(__pyx_t_7, __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_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __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, 1824, __pyx_L1_error)

    /* "coremusic/capi.pyx":1823
 *     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":1826
 *         raise MemoryError("Could not allocate memory for property data")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.AudioServicesGetProperty(
 *             prop_id,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":1829
 *         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":1830
 *             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":1827
 * 
 *     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":1835
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioServicesGetProperty failed with status: {status}")
 * 
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":1836
 * 
 *         if status != 0:
 *             raise RuntimeError(f"AudioServicesGetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Return property value based on size
*/
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_6 = __pyx_builtin_RuntimeError; 
      __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1836, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioServicesGetProperty_failed, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_1 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (__pyx_t_1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __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, 1836, __pyx_L6_error)

      /* "coremusic/capi.pyx":1835
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"AudioServicesGetProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":1839
 * 
 *         # 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":1840
 *         # 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, 1840, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5_return;

      /* "coremusic/capi.pyx":1839
 * 
 *         # Return property value based on size
 *         if data_size == 4:             # <<<<<<<<<<<<<<
 *             return (<cf.UInt32*>buffer)[0]
 *         else:
*/
    }

    /* "coremusic/capi.pyx":1842
 *             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, 1842, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L5_return;
    }
  }

  /* "coremusic/capi.pyx":1845
 * 
 *     finally:
 *         free(buffer)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*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_4); __pyx_t_4 = 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_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_buffer);
      }
      __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_17 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buffer);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":1801
 * 
 * 
 * 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1848
 * 
 * 
 * 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_287audio_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_286audio_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_287audio_services_set_property = {"audio_services_set_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_287audio_services_set_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_286audio_services_set_property};
static PyObject *__pyx_pw_9coremusic_4capi_287audio_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, 1848, __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, 1848, __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, 1848, __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, 1848, __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, 1848, __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, 1848, __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, 1848, __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, 1848, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1848, __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, 1848, __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, 1848, __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, 1848, __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_286audio_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_286audio_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;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  UInt32 *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("audio_services_set_property", 0);

  /* "coremusic/capi.pyx":1850
 * 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":1851
 *     """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":1858
 * 
 *     # 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":1859
 *     # 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, 1859, __pyx_L1_error)
    __pyx_v_uint_data = ((UInt32)__pyx_t_2);

    /* "coremusic/capi.pyx":1860
 *     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":1861
 *         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":1858
 * 
 *     # 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":1862
 *         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":1863
 *         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, 1863, __pyx_L1_error)
    __pyx_v_byte_data = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "coremusic/capi.pyx":1864
 *     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":1865
 *         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, 1865, __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, 1865, __pyx_L1_error)
    __pyx_v_data_size = __pyx_t_4;

    /* "coremusic/capi.pyx":1862
 *         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":1867
 *         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_INCREF(__pyx_builtin_TypeError);
    __pyx_t_6 = __pyx_builtin_TypeError; 
    __pyx_t_7 = 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(__pyx_t_6, __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_3)) __PYX_ERR(0, 1867, __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, 1867, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "coremusic/capi.pyx":1871
 *     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_7 = (sizeof(UInt32));
  } else {
    __pyx_t_7 = 0;
  }

  /* "coremusic/capi.pyx":1872
 *         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_8 = (&__pyx_v_specifier);
  } else {
    __pyx_t_8 = NULL;
  }

  /* "coremusic/capi.pyx":1869
 *         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_7, __pyx_t_8, __pyx_v_data_size, __pyx_v_data_ptr);

  /* "coremusic/capi.pyx":1877
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesSetProperty failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":1878
 * 
 *     if status != 0:
 *         raise RuntimeError(f"AudioServicesSetProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_9 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AudioServicesSetProperty_failed, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __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_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __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, 1878, __pyx_L1_error)

    /* "coremusic/capi.pyx":1877
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AudioServicesSetProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":1880
 *         raise RuntimeError(f"AudioServicesSetProperty failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1848
 * 
 * 
 * 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_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":1884
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesNoError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_289get_audio_services_no_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_288get_audio_services_no_error, "get_audio_services_no_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_289get_audio_services_no_error = {"get_audio_services_no_error", (PyCFunction)__pyx_pw_9coremusic_4capi_289get_audio_services_no_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_288get_audio_services_no_error};
static PyObject *__pyx_pw_9coremusic_4capi_289get_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_288get_audio_services_no_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_288get_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":1885
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():
 *     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, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1884
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     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":1887
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_291get_audio_services_unsupported_property_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_290get_audio_services_unsupported_property_error, "get_audio_services_unsupported_property_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_291get_audio_services_unsupported_property_error = {"get_audio_services_unsupported_property_error", (PyCFunction)__pyx_pw_9coremusic_4capi_291get_audio_services_unsupported_property_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_290get_audio_services_unsupported_property_error};
static PyObject *__pyx_pw_9coremusic_4capi_291get_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_290get_audio_services_unsupported_property_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_290get_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":1888
 * 
 * def get_audio_services_unsupported_property_error():
 *     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, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1887
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     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":1890
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesBadPropertySizeError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_293get_audio_services_bad_property_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_292get_audio_services_bad_property_size_error, "get_audio_services_bad_property_size_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_293get_audio_services_bad_property_size_error = {"get_audio_services_bad_property_size_error", (PyCFunction)__pyx_pw_9coremusic_4capi_293get_audio_services_bad_property_size_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_292get_audio_services_bad_property_size_error};
static PyObject *__pyx_pw_9coremusic_4capi_293get_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_292get_audio_services_bad_property_size_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_292get_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":1891
 * 
 * def get_audio_services_bad_property_size_error():
 *     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, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1890
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     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":1893
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_295get_audio_services_bad_specifier_size_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_294get_audio_services_bad_specifier_size_error, "get_audio_services_bad_specifier_size_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_295get_audio_services_bad_specifier_size_error = {"get_audio_services_bad_specifier_size_error", (PyCFunction)__pyx_pw_9coremusic_4capi_295get_audio_services_bad_specifier_size_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_294get_audio_services_bad_specifier_size_error};
static PyObject *__pyx_pw_9coremusic_4capi_295get_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_294get_audio_services_bad_specifier_size_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_294get_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":1894
 * 
 * def get_audio_services_bad_specifier_size_error():
 *     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, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1893
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     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":1896
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_297get_audio_services_system_sound_unspecified_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_296get_audio_services_system_sound_unspecified_error, "get_audio_services_system_sound_unspecified_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_297get_audio_services_system_sound_unspecified_error = {"get_audio_services_system_sound_unspecified_error", (PyCFunction)__pyx_pw_9coremusic_4capi_297get_audio_services_system_sound_unspecified_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_296get_audio_services_system_sound_unspecified_error};
static PyObject *__pyx_pw_9coremusic_4capi_297get_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_296get_audio_services_system_sound_unspecified_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_296get_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":1897
 * 
 * def get_audio_services_system_sound_unspecified_error():
 *     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, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1896
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     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":1899
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_299get_audio_services_system_sound_client_timed_out_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_298get_audio_services_system_sound_client_timed_out_error, "get_audio_services_system_sound_client_timed_out_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_299get_audio_services_system_sound_client_timed_out_error = {"get_audio_services_system_sound_client_timed_out_error", (PyCFunction)__pyx_pw_9coremusic_4capi_299get_audio_services_system_sound_client_timed_out_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_298get_audio_services_system_sound_client_timed_out_error};
static PyObject *__pyx_pw_9coremusic_4capi_299get_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_298get_audio_services_system_sound_client_timed_out_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_298get_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":1900
 * 
 * def get_audio_services_system_sound_client_timed_out_error():
 *     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, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1899
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     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":1902
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_301get_audio_services_system_sound_exceeded_maximum_duration_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_300get_audio_services_system_sound_exceeded_maximum_duration_error, "get_audio_services_system_sound_exceeded_maximum_duration_error()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_301get_audio_services_system_sound_exceeded_maximum_duration_error = {"get_audio_services_system_sound_exceeded_maximum_duration_error", (PyCFunction)__pyx_pw_9coremusic_4capi_301get_audio_services_system_sound_exceeded_maximum_duration_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_300get_audio_services_system_sound_exceeded_maximum_duration_error};
static PyObject *__pyx_pw_9coremusic_4capi_301get_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_300get_audio_services_system_sound_exceeded_maximum_duration_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_300get_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":1903
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():
 *     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, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1902
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     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":1905
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_303get_system_sound_id_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_302get_system_sound_id_user_preferred_alert, "get_system_sound_id_user_preferred_alert()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_303get_system_sound_id_user_preferred_alert = {"get_system_sound_id_user_preferred_alert", (PyCFunction)__pyx_pw_9coremusic_4capi_303get_system_sound_id_user_preferred_alert, METH_NOARGS, __pyx_doc_9coremusic_4capi_302get_system_sound_id_user_preferred_alert};
static PyObject *__pyx_pw_9coremusic_4capi_303get_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_302get_system_sound_id_user_preferred_alert(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_302get_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":1906
 * 
 * def get_system_sound_id_user_preferred_alert():
 *     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, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1905
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     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":1908
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_FlashScreen
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_305get_system_sound_id_flash_screen(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_304get_system_sound_id_flash_screen, "get_system_sound_id_flash_screen()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_305get_system_sound_id_flash_screen = {"get_system_sound_id_flash_screen", (PyCFunction)__pyx_pw_9coremusic_4capi_305get_system_sound_id_flash_screen, METH_NOARGS, __pyx_doc_9coremusic_4capi_304get_system_sound_id_flash_screen};
static PyObject *__pyx_pw_9coremusic_4capi_305get_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_304get_system_sound_id_flash_screen(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_304get_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":1909
 * 
 * def get_system_sound_id_flash_screen():
 *     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, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1908
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     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":1911
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_Vibrate
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_307get_system_sound_id_vibrate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_306get_system_sound_id_vibrate, "get_system_sound_id_vibrate()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_307get_system_sound_id_vibrate = {"get_system_sound_id_vibrate", (PyCFunction)__pyx_pw_9coremusic_4capi_307get_system_sound_id_vibrate, METH_NOARGS, __pyx_doc_9coremusic_4capi_306get_system_sound_id_vibrate};
static PyObject *__pyx_pw_9coremusic_4capi_307get_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_306get_system_sound_id_vibrate(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_306get_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":1912
 * 
 * def get_system_sound_id_vibrate():
 *     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, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1911
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     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":1914
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     return at.kUserPreferredAlert
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_309get_user_preferred_alert(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_308get_user_preferred_alert, "get_user_preferred_alert()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_309get_user_preferred_alert = {"get_user_preferred_alert", (PyCFunction)__pyx_pw_9coremusic_4capi_309get_user_preferred_alert, METH_NOARGS, __pyx_doc_9coremusic_4capi_308get_user_preferred_alert};
static PyObject *__pyx_pw_9coremusic_4capi_309get_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_308get_user_preferred_alert(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_308get_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":1915
 * 
 * def get_user_preferred_alert():
 *     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, 1915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1914
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     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":1917
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesPropertyIsUISound
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_311get_audio_services_property_is_ui_sound(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_310get_audio_services_property_is_ui_sound, "get_audio_services_property_is_ui_sound()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_311get_audio_services_property_is_ui_sound = {"get_audio_services_property_is_ui_sound", (PyCFunction)__pyx_pw_9coremusic_4capi_311get_audio_services_property_is_ui_sound, METH_NOARGS, __pyx_doc_9coremusic_4capi_310get_audio_services_property_is_ui_sound};
static PyObject *__pyx_pw_9coremusic_4capi_311get_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_310get_audio_services_property_is_ui_sound(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_310get_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":1918
 * 
 * def get_audio_services_property_is_ui_sound():
 *     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, 1918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1917
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     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":1920
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_313get_audio_services_property_complete_playback_if_app_dies(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_312get_audio_services_property_complete_playback_if_app_dies, "get_audio_services_property_complete_playback_if_app_dies()");
static PyMethodDef __pyx_mdef_9coremusic_4capi_313get_audio_services_property_complete_playback_if_app_dies = {"get_audio_services_property_complete_playback_if_app_dies", (PyCFunction)__pyx_pw_9coremusic_4capi_313get_audio_services_property_complete_playback_if_app_dies, METH_NOARGS, __pyx_doc_9coremusic_4capi_312get_audio_services_property_complete_playback_if_app_dies};
static PyObject *__pyx_pw_9coremusic_4capi_313get_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_312get_audio_services_property_complete_playback_if_app_dies(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_312get_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":1921
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():
 *     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, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1920
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     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":1924
 * 
 * 
 * def test_error() -> int:             # <<<<<<<<<<<<<<
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_315test_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_314test_error, "test_error() -> int\n\nTest function to verify the module works");
static PyMethodDef __pyx_mdef_9coremusic_4capi_315test_error = {"test_error", (PyCFunction)__pyx_pw_9coremusic_4capi_315test_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_314test_error};
static PyObject *__pyx_pw_9coremusic_4capi_315test_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_314test_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_314test_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":1926
 * 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, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 1926, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1924
 * 
 * 
 * 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":1931
 * # ===== 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_317music_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_316music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If the MIDI event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_317music_device_midi_event = {"music_device_midi_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_317music_device_midi_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_316music_device_midi_event};
static PyObject *__pyx_pw_9coremusic_4capi_317music_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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __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, 1931, __pyx_L3_error)
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1931, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1931, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1931, __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, 1931, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1931, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1931, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1931, __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, 1931, __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, 1931, __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_316music_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_316music_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;
  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_midi_event", 0);

  /* "coremusic/capi.pyx":1947
 *         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":1954
 *         <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":1955
 * 
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")             # <<<<<<<<<<<<<<
 *     return status_result
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicDeviceMIDIEvent_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1955, __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, 1955, __pyx_L1_error)

    /* "coremusic/capi.pyx":1954
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceMIDIEvent failed with status: {status_result}")
 *     return status_result
*/
  }

  /* "coremusic/capi.pyx":1956
 *     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, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1931
 * # ===== 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_XDECREF(__pyx_t_6);
  __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":1958
 *     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_319music_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_318music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If the SysEx message fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_319music_device_sysex = {"music_device_sysex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_319music_device_sysex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_318music_device_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_319music_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, 1958, __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, 1958, __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, 1958, __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, 1958, __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, 1958, __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, 1958, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1958, __pyx_L3_error)
    }
    __pyx_v_unit = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_unit == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1958, __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, 1958, __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, 1958, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_318music_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_318music_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;
  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("music_device_sysex", 0);

  /* "coremusic/capi.pyx":1971
 *         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, 1971, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L1_error)
  __pyx_v_data_ptr = ((UInt8 const *)((char *)__pyx_t_1));

  /* "coremusic/capi.pyx":1972
 *     """
 *     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, 1972, __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, 1972, __pyx_L1_error)
  __pyx_v_length = __pyx_t_2;

  /* "coremusic/capi.pyx":1974
 *     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":1979
 *         length)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceSysEx failed with status: {status}")
 *     return status
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":1980
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicDeviceSysEx failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_6 = __pyx_builtin_RuntimeError; 
    __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicDeviceSysEx_failed_with_sta, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1980, __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, 1980, __pyx_L1_error)

    /* "coremusic/capi.pyx":1979
 *         length)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceSysEx failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":1981
 *     if status != 0:
 *         raise RuntimeError(f"MusicDeviceSysEx failed with status: {status}")
 *     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, 1981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":1958
 *     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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":1983
 *     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_321music_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_320music_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_321music_device_start_note = {"music_device_start_note", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_321music_device_start_note, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_320music_device_start_note};
static PyObject *__pyx_pw_9coremusic_4capi_321music_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, 1983, __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, 1983, __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, 1983, __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, 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, "music_device_start_note", 0) < (0)) __PYX_ERR(0, 1983, __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, 1983, __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, 1983, __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, 1983, __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, 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[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __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[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1983, __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, 1983, __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, 1983, __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, 1983, __pyx_L3_error)
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __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, 1983, __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, 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.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, 1983, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_320music_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_320music_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  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":2003
 *     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":2004
 *     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":2007
 *     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, 2007, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {

    /* "coremusic/capi.pyx":2008
 * 
 *     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, 2008, __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, 2008, __pyx_L1_error)
    __pyx_v_num_controls = __pyx_t_2;

    /* "coremusic/capi.pyx":2009
 *     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":2007
 *     cdef cf.OSStatus status
 * 
 *     if controls:             # <<<<<<<<<<<<<<
 *         num_controls = len(controls)
 *         arg_count += num_controls
*/
  }

  /* "coremusic/capi.pyx":2012
 * 
 *     # 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":2013
 *     # 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":2014
 *     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":2015
 *     params = <at.MusicDeviceNoteParams*>malloc(params_size)
 *     if not params:
 *         raise MemoryError("Could not allocate memory for note parameters")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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_3)) __PYX_ERR(0, 2015, __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, 2015, __pyx_L1_error)

    /* "coremusic/capi.pyx":2014
 *     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":2017
 *         raise MemoryError("Could not allocate memory for note parameters")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         params.argCount = arg_count
 *         params.mPitch = pitch
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2018
 * 
 *     try:
 *         params.argCount = arg_count             # <<<<<<<<<<<<<<
 *         params.mPitch = pitch
 *         params.mVelocity = velocity
*/
    __pyx_v_params->argCount = __pyx_v_arg_count;

    /* "coremusic/capi.pyx":2019
 *     try:
 *         params.argCount = arg_count
 *         params.mPitch = pitch             # <<<<<<<<<<<<<<
 *         params.mVelocity = velocity
 * 
*/
    __pyx_v_params->mPitch = __pyx_v_pitch;

    /* "coremusic/capi.pyx":2020
 *         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":2023
 * 
 *         # 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, 2023, __pyx_L6_error)
      __pyx_t_1 = (__pyx_temp != 0);
    }

    if (__pyx_t_1) {

      /* "coremusic/capi.pyx":2024
 *         # 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_7 = 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, 2024, __pyx_L6_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_7);
        ++__pyx_t_7;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2024, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          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, 2024, __pyx_L6_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_4);
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_8);
          } else {
            __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0);
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L6_error)
            __Pyx_XGOTREF(__pyx_t_4);
            __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 1);
            if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2024, __pyx_L6_error)
            __Pyx_XGOTREF(__pyx_t_8);
          }
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2024, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2024, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
          index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          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, 2024, __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, 2024, __pyx_L6_error)
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_param_id, __pyx_t_4);
        __pyx_t_4 = 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":2025
 *         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, 2025, __pyx_L6_error)
        (__pyx_v_params->mControls[__pyx_v_i]).mID = ((AudioUnitParameterID)__pyx_t_11);

        /* "coremusic/capi.pyx":2026
 *             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, 2026, __pyx_L6_error)
        (__pyx_v_params->mControls[__pyx_v_i]).mValue = ((AudioUnitParameterValue)__pyx_t_12);

        /* "coremusic/capi.pyx":2024
 *         # 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":2023
 * 
 *         # 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":2028
 *                 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":2036
 *             params)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MusicDeviceStartNote failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":2037
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MusicDeviceStartNote failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return <long>note_instance_id
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_8 = __pyx_builtin_RuntimeError; 
      __pyx_t_4 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2037, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicDeviceStartNote_failed_with, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __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;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __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, 2037, __pyx_L6_error)

      /* "coremusic/capi.pyx":2036
 *             params)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MusicDeviceStartNote failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":2039
 *             raise RuntimeError(f"MusicDeviceStartNote failed with status: {status}")
 * 
 *         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, 2039, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":2042
 * 
 *     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_5); __pyx_t_5 = 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":1983
 *     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_5);
  __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":2044
 *         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_323music_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_322music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If stopping the note fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_323music_device_stop_note = {"music_device_stop_note", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_323music_device_stop_note, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_322music_device_stop_note};
static PyObject *__pyx_pw_9coremusic_4capi_323music_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, 2044, __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, 2044, __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, 2044, __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, 2044, __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, 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, "music_device_stop_note", 0) < (0)) __PYX_ERR(0, 2044, __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, 2044, __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, 2044, __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, 2044, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2044, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2044, __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, 2044, __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, 2044, __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, 2044, __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, 2044, __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, 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.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_322music_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_322music_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;
  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_stop_note", 0);

  /* "coremusic/capi.pyx":2059
 *         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":2065
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceStopNote failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2066
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicDeviceStopNote failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicDeviceStopNote_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2066, __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, 2066, __pyx_L1_error)

    /* "coremusic/capi.pyx":2065
 *         <cf.UInt32>offset_sample_frame)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicDeviceStopNote failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2067
 *     if status != 0:
 *         raise RuntimeError(f"MusicDeviceStopNote failed with status: {status}")
 *     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, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2044
 *         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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2071
 * # 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_325create_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_324create_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_325create_music_device_std_note_params = {"create_music_device_std_note_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_325create_music_device_std_note_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_324create_music_device_std_note_params};
static PyObject *__pyx_pw_9coremusic_4capi_325create_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, 2071, __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, 2071, __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, 2071, __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, 2071, __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, 2071, __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, 2071, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2071, __pyx_L3_error)
    }
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2071, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2071, __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, 2071, __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_324create_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_324create_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":2081
 *         Dictionary with argCount, pitch, and velocity
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'argCount': 2,
 *         'pitch': pitch,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2082
 *     """
 *     return {
 *         'argCount': 2,             # <<<<<<<<<<<<<<
 *         'pitch': pitch,
 *         'velocity': velocity
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __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, 2082, __pyx_L1_error)

  /* "coremusic/capi.pyx":2083
 *     return {
 *         'argCount': 2,
 *         'pitch': pitch,             # <<<<<<<<<<<<<<
 *         'velocity': velocity
 *     }
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_pitch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2083, __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, 2082, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2084
 *         'argCount': 2,
 *         'pitch': pitch,
 *         'velocity': velocity             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_velocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2084, __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, 2082, __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":2071
 * # 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":2087
 *     }
 * 
 * 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_327create_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_326create_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_327create_music_device_note_params = {"create_music_device_note_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_327create_music_device_note_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_326create_music_device_note_params};
static PyObject *__pyx_pw_9coremusic_4capi_327create_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, 2087, __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, 2087, __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, 2087, __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, 2087, __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, 2087, __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, 2087, __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, 2087, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2087, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2087, __pyx_L3_error)
    }
    __pyx_v_pitch = __Pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_pitch == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_velocity == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2087, __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, 2087, __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, 2087, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_326create_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_326create_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":2098
 *         Dictionary with all note parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'argCount': 2 + len(controls),
 *         'pitch': pitch,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2099
 *     """
 *     return {
 *         'argCount': 2 + len(controls),             # <<<<<<<<<<<<<<
 *         'pitch': pitch,
 *         'velocity': velocity,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2099, __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, 2099, __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, 2099, __pyx_L1_error)
  __pyx_t_3 = PyLong_FromSsize_t((2 + __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __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, 2099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2100
 *     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, 2100, __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, 2099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2101
 *         '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, 2101, __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, 2099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2102
 *         '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, 2099, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2087
 *     }
 * 
 * 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":2107
 * # 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_329get_music_note_event_use_group_instrument(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_328get_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_329get_music_note_event_use_group_instrument = {"get_music_note_event_use_group_instrument", (PyCFunction)__pyx_pw_9coremusic_4capi_329get_music_note_event_use_group_instrument, METH_NOARGS, __pyx_doc_9coremusic_4capi_328get_music_note_event_use_group_instrument};
static PyObject *__pyx_pw_9coremusic_4capi_329get_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_328get_music_note_event_use_group_instrument(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_328get_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":2109
 * 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, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2107
 * # 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":2111
 *     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_331get_music_note_event_unused(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_330get_music_note_event_unused, "get_music_note_event_unused()\n\nGet the constant for unused instrument ID.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_331get_music_note_event_unused = {"get_music_note_event_unused", (PyCFunction)__pyx_pw_9coremusic_4capi_331get_music_note_event_unused, METH_NOARGS, __pyx_doc_9coremusic_4capi_330get_music_note_event_unused};
static PyObject *__pyx_pw_9coremusic_4capi_331get_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_330get_music_note_event_unused(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_330get_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":2113
 * 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, 2113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2111
 *     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":2115
 *     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_333get_music_device_range(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_332get_music_device_range, "get_music_device_range()\n\nGet the MusicDevice selector range start.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_333get_music_device_range = {"get_music_device_range", (PyCFunction)__pyx_pw_9coremusic_4capi_333get_music_device_range, METH_NOARGS, __pyx_doc_9coremusic_4capi_332get_music_device_range};
static PyObject *__pyx_pw_9coremusic_4capi_333get_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_332get_music_device_range(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_332get_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":2117
 * 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, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2115
 *     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":2119
 *     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_335get_music_device_midi_event_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_334get_music_device_midi_event_select, "get_music_device_midi_event_select()\n\nGet the MusicDevice MIDI event selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_335get_music_device_midi_event_select = {"get_music_device_midi_event_select", (PyCFunction)__pyx_pw_9coremusic_4capi_335get_music_device_midi_event_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_334get_music_device_midi_event_select};
static PyObject *__pyx_pw_9coremusic_4capi_335get_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_334get_music_device_midi_event_select(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_334get_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":2121
 * 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, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2119
 *     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":2123
 *     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_337get_music_device_sysex_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_336get_music_device_sysex_select, "get_music_device_sysex_select()\n\nGet the MusicDevice SysEx selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_337get_music_device_sysex_select = {"get_music_device_sysex_select", (PyCFunction)__pyx_pw_9coremusic_4capi_337get_music_device_sysex_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_336get_music_device_sysex_select};
static PyObject *__pyx_pw_9coremusic_4capi_337get_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_336get_music_device_sysex_select(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_336get_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":2125
 * 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, 2125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2123
 *     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":2127
 *     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_339get_music_device_start_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_338get_music_device_start_note_select, "get_music_device_start_note_select()\n\nGet the MusicDevice start note selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_339get_music_device_start_note_select = {"get_music_device_start_note_select", (PyCFunction)__pyx_pw_9coremusic_4capi_339get_music_device_start_note_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_338get_music_device_start_note_select};
static PyObject *__pyx_pw_9coremusic_4capi_339get_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_338get_music_device_start_note_select(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_338get_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":2129
 * 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, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2127
 *     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":2131
 *     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_341get_music_device_stop_note_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_340get_music_device_stop_note_select, "get_music_device_stop_note_select()\n\nGet the MusicDevice stop note selector.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_341get_music_device_stop_note_select = {"get_music_device_stop_note_select", (PyCFunction)__pyx_pw_9coremusic_4capi_341get_music_device_stop_note_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_340get_music_device_stop_note_select};
static PyObject *__pyx_pw_9coremusic_4capi_341get_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_340get_music_device_stop_note_select(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_340get_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":2133
 * 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, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2131
 *     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":2135
 *     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_343get_music_device_midi_event_list_select(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_342get_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_343get_music_device_midi_event_list_select = {"get_music_device_midi_event_list_select", (PyCFunction)__pyx_pw_9coremusic_4capi_343get_music_device_midi_event_list_select, METH_NOARGS, __pyx_doc_9coremusic_4capi_342get_music_device_midi_event_list_select};
static PyObject *__pyx_pw_9coremusic_4capi_343get_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_342get_music_device_midi_event_list_select(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_342get_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":2137
 * 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, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2135
 *     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":2141
 * # 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_345midi_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_344midi_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_345midi_note_on = {"midi_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_345midi_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_344midi_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_345midi_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, 2141, __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, 2141, __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, 2141, __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, 2141, __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, 2141, __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, 2141, __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, 2141, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2141, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2141, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2141, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2141, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2141, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_note_on", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2141, __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_344midi_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_344midi_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":2152
 *         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":2153
 *     """
 *     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, 2153, __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, 2153, __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, 2153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2153, __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, 2153, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2153, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 2153, __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":2141
 * # 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":2155
 *     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_347midi_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_346midi_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_347midi_note_off = {"midi_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_347midi_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_346midi_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_347midi_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, 2155, __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, 2155, __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, 2155, __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, 2155, __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, 2155, __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, 2155, __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, 2155, __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, 2155, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2155, __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, 2155, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2155, __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, 2155, __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, 2155, __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_346midi_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_346midi_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":2166
 *         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":2167
 *     """
 *     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, 2167, __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, 2167, __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, 2167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2167, __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, 2167, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2167, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 2167, __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":2155
 *     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":2169
 *     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_349midi_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_348midi_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_349midi_control_change = {"midi_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_349midi_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_348midi_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_349midi_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, 2169, __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, 2169, __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, 2169, __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, 2169, __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, 2169, __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, 2169, __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, 2169, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2169, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2169, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L3_error)
    __pyx_v_controller = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_controller == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_control_change", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2169, __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_348midi_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_348midi_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":2180
 *         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":2181
 *     """
 *     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, 2181, __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, 2181, __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, 2181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2181, __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, 2181, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2181, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 2181, __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":2169
 *     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":2183
 *     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_351midi_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_350midi_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_351midi_program_change = {"midi_program_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_351midi_program_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_350midi_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_351midi_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, 2183, __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, 2183, __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, 2183, __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, 2183, __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, 2183, __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, 2183, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2183, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L3_error)
    __pyx_v_program = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_program == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_program_change", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2183, __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_350midi_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_350midi_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":2193
 *         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":2194
 *     """
 *     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, 2194, __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, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2194, __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, 2194, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2194, __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, 2194, __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":2183
 *     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":2196
 *     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_353midi_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_352midi_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_353midi_pitch_bend = {"midi_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_353midi_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_352midi_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_353midi_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, 2196, __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, 2196, __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, 2196, __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, 2196, __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, 2196, __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, 2196, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2196, __pyx_L3_error)
    }
    __pyx_v_channel = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2196, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2196, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_pitch_bend", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2196, __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_352midi_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_352midi_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":2206
 *         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":2207
 *     """
 *     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":2208
 *     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":2209
 *     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, 2209, __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, 2209, __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, 2209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __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, 2209, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2209, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 2209, __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":2196
 *     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":2216
 * # MusicPlayer functions
 * 
 * def new_music_player():             # <<<<<<<<<<<<<<
 *     """Create a new music player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_355new_music_player(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_354new_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_355new_music_player = {"new_music_player", (PyCFunction)__pyx_pw_9coremusic_4capi_355new_music_player, METH_NOARGS, __pyx_doc_9coremusic_4capi_354new_music_player};
static PyObject *__pyx_pw_9coremusic_4capi_355new_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_354new_music_player(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_354new_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;
  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("new_music_player", 0);

  /* "coremusic/capi.pyx":2226
 *     """
 *     cdef at.MusicPlayer player
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = NewMusicPlayer((&__pyx_v_player));

  /* "coremusic/capi.pyx":2228
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewMusicPlayer failed with status: {status}")
 *     return <long>player
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2229
 * 
 *     if status != 0:
 *         raise RuntimeError(f"NewMusicPlayer failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>player
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_NewMusicPlayer_failed_with_statu, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2229, __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, 2229, __pyx_L1_error)

    /* "coremusic/capi.pyx":2228
 *     cdef cf.OSStatus status = at.NewMusicPlayer(&player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewMusicPlayer failed with status: {status}")
 *     return <long>player
*/
  }

  /* "coremusic/capi.pyx":2230
 *     if status != 0:
 *         raise RuntimeError(f"NewMusicPlayer failed with status: {status}")
 *     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, 2230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2216
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2232
 *     return <long>player
 * 
 * def dispose_music_player(long player):             # <<<<<<<<<<<<<<
 *     """Dispose a music player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_357dispose_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_356dispose_music_player, "dispose_music_player(long player)\n\nDispose a music player.\n\nArgs:\n    player: The MusicPlayer handle to dispose\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_357dispose_music_player = {"dispose_music_player", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_357dispose_music_player, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_356dispose_music_player};
static PyObject *__pyx_pw_9coremusic_4capi_357dispose_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, 2232, __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, 2232, __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, 2232, __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, 2232, __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, 2232, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2232, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispose_music_player", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2232, __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_356dispose_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_356dispose_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;
  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("dispose_music_player", 0);

  /* "coremusic/capi.pyx":2244
 *         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":2246
 *     cdef cf.OSStatus status = at.DisposeMusicPlayer(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeMusicPlayer failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2247
 * 
 *     if status != 0:
 *         raise RuntimeError(f"DisposeMusicPlayer failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_DisposeMusicPlayer_failed_with_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __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, 2247, __pyx_L1_error)

    /* "coremusic/capi.pyx":2246
 *     cdef cf.OSStatus status = at.DisposeMusicPlayer(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeMusicPlayer failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2248
 *     if status != 0:
 *         raise RuntimeError(f"DisposeMusicPlayer failed with status: {status}")
 *     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, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2232
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2250
 *     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_359music_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_358music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting sequence fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_359music_player_set_sequence = {"music_player_set_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_359music_player_set_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_358music_player_set_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_359music_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, 2250, __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, 2250, __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, 2250, __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, 2250, __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, 2250, __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, 2250, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2250, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L3_error)
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2250, __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, 2250, __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_358music_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_358music_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;
  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("music_player_set_sequence", 0);

  /* "coremusic/capi.pyx":2263
 *         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":2264
 *     """
 *     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":2266
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetSequence failed with status: {status}")
 *     return status
*/
  __pyx_t_2 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":2267
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetSequence failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerSetSequence_failed_wi, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __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, 2267, __pyx_L1_error)

    /* "coremusic/capi.pyx":2266
 *     cdef cf.OSStatus status = at.MusicPlayerSetSequence(<at.MusicPlayer>player, seq)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetSequence failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2268
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetSequence failed with status: {status}")
 *     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, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2250
 *     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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2270
 *     return status
 * 
 * def music_player_get_sequence(long player):             # <<<<<<<<<<<<<<
 *     """Get the sequence attached to a player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_361music_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_360music_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_361music_player_get_sequence = {"music_player_get_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_361music_player_get_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_360music_player_get_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_361music_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, 2270, __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, 2270, __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, 2270, __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, 2270, __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, 2270, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2270, __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, 2270, __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_360music_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_360music_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;
  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_player_get_sequence", 0);

  /* "coremusic/capi.pyx":2283
 *     """
 *     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":2285
 *     cdef cf.OSStatus status = at.MusicPlayerGetSequence(<at.MusicPlayer>player, &sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetSequence failed with status: {status}")
 *     return <long>sequence
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2286
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetSequence failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>sequence
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerGetSequence_failed_wi, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2286, __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, 2286, __pyx_L1_error)

    /* "coremusic/capi.pyx":2285
 *     cdef cf.OSStatus status = at.MusicPlayerGetSequence(<at.MusicPlayer>player, &sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetSequence failed with status: {status}")
 *     return <long>sequence
*/
  }

  /* "coremusic/capi.pyx":2287
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetSequence failed with status: {status}")
 *     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, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2270
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2289
 *     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_363music_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_362music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting time fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_363music_player_set_time = {"music_player_set_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_363music_player_set_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_362music_player_set_time};
static PyObject *__pyx_pw_9coremusic_4capi_363music_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, 2289, __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, 2289, __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, 2289, __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, 2289, __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, 2289, __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, 2289, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2289, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2289, __pyx_L3_error)
    __pyx_v_time = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2289, __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, 2289, __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_362music_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_362music_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;
  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_player_set_time", 0);

  /* "coremusic/capi.pyx":2302
 *         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":2304
 *     cdef cf.OSStatus status = at.MusicPlayerSetTime(<at.MusicPlayer>player, <at.MusicTimeStamp>time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetTime failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2305
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetTime failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerSetTime_failed_with_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2305, __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, 2305, __pyx_L1_error)

    /* "coremusic/capi.pyx":2304
 *     cdef cf.OSStatus status = at.MusicPlayerSetTime(<at.MusicPlayer>player, <at.MusicTimeStamp>time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetTime failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2306
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetTime failed with status: {status}")
 *     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, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2289
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2308
 *     return status
 * 
 * def music_player_get_time(long player):             # <<<<<<<<<<<<<<
 *     """Get the current time of the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_365music_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_364music_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_365music_player_get_time = {"music_player_get_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_365music_player_get_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_364music_player_get_time};
static PyObject *__pyx_pw_9coremusic_4capi_365music_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, 2308, __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, 2308, __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, 2308, __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, 2308, __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, 2308, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2308, __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, 2308, __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_364music_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_364music_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;
  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_player_get_time", 0);

  /* "coremusic/capi.pyx":2321
 *     """
 *     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":2323
 *     cdef cf.OSStatus status = at.MusicPlayerGetTime(<at.MusicPlayer>player, &time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetTime failed with status: {status}")
 *     return <double>time
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2324
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetTime failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <double>time
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerGetTime_failed_with_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __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, 2324, __pyx_L1_error)

    /* "coremusic/capi.pyx":2323
 *     cdef cf.OSStatus status = at.MusicPlayerGetTime(<at.MusicPlayer>player, &time)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetTime failed with status: {status}")
 *     return <double>time
*/
  }

  /* "coremusic/capi.pyx":2325
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetTime failed with status: {status}")
 *     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, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2308
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2327
 *     return <double>time
 * 
 * def music_player_preroll(long player):             # <<<<<<<<<<<<<<
 *     """Prepare the player for playing.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_367music_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_366music_player_preroll, "music_player_preroll(long player)\n\nPrepare the player for playing.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If preroll fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_367music_player_preroll = {"music_player_preroll", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_367music_player_preroll, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_366music_player_preroll};
static PyObject *__pyx_pw_9coremusic_4capi_367music_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, 2327, __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, 2327, __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, 2327, __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, 2327, __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, 2327, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2327, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_preroll", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2327, __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_366music_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_366music_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;
  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_player_preroll", 0);

  /* "coremusic/capi.pyx":2339
 *         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":2341
 *     cdef cf.OSStatus status = at.MusicPlayerPreroll(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerPreroll failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2342
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerPreroll failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerPreroll_failed_with_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __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, 2342, __pyx_L1_error)

    /* "coremusic/capi.pyx":2341
 *     cdef cf.OSStatus status = at.MusicPlayerPreroll(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerPreroll failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2343
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerPreroll failed with status: {status}")
 *     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, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2327
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2345
 *     return status
 * 
 * def music_player_start(long player):             # <<<<<<<<<<<<<<
 *     """Start the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_369music_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_368music_player_start, "music_player_start(long player)\n\nStart the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If start fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_369music_player_start = {"music_player_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_369music_player_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_368music_player_start};
static PyObject *__pyx_pw_9coremusic_4capi_369music_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, 2345, __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, 2345, __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, 2345, __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, 2345, __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, 2345, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2345, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2345, __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_368music_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_368music_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;
  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_player_start", 0);

  /* "coremusic/capi.pyx":2357
 *         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":2359
 *     cdef cf.OSStatus status = at.MusicPlayerStart(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerStart failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2360
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerStart failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerStart_failed_with_sta, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2360, __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, 2360, __pyx_L1_error)

    /* "coremusic/capi.pyx":2359
 *     cdef cf.OSStatus status = at.MusicPlayerStart(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerStart failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2361
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerStart failed with status: {status}")
 *     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, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2345
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2363
 *     return status
 * 
 * def music_player_stop(long player):             # <<<<<<<<<<<<<<
 *     """Stop the player.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_371music_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_370music_player_stop, "music_player_stop(long player)\n\nStop the player.\n\nArgs:\n    player: The MusicPlayer handle\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If stop fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_371music_player_stop = {"music_player_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_371music_player_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_370music_player_stop};
static PyObject *__pyx_pw_9coremusic_4capi_371music_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, 2363, __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, 2363, __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, 2363, __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, 2363, __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, 2363, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2363, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("music_player_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2363, __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_370music_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_370music_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;
  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_player_stop", 0);

  /* "coremusic/capi.pyx":2375
 *         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":2377
 *     cdef cf.OSStatus status = at.MusicPlayerStop(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerStop failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2378
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerStop failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerStop_failed_with_stat, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2378, __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, 2378, __pyx_L1_error)

    /* "coremusic/capi.pyx":2377
 *     cdef cf.OSStatus status = at.MusicPlayerStop(<at.MusicPlayer>player)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerStop failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2379
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerStop failed with status: {status}")
 *     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, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2363
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2381
 *     return status
 * 
 * def music_player_is_playing(long player):             # <<<<<<<<<<<<<<
 *     """Check if the player is playing.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_373music_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_372music_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_373music_player_is_playing = {"music_player_is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_373music_player_is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_372music_player_is_playing};
static PyObject *__pyx_pw_9coremusic_4capi_373music_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, 2381, __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, 2381, __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, 2381, __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, 2381, __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, 2381, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2381, __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, 2381, __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_372music_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_372music_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;
  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_player_is_playing", 0);

  /* "coremusic/capi.pyx":2394
 *     """
 *     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":2396
 *     cdef cf.OSStatus status = at.MusicPlayerIsPlaying(<at.MusicPlayer>player, &is_playing)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerIsPlaying failed with status: {status}")
 *     return bool(is_playing)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2397
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerIsPlaying failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return bool(is_playing)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerIsPlaying_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __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, 2397, __pyx_L1_error)

    /* "coremusic/capi.pyx":2396
 *     cdef cf.OSStatus status = at.MusicPlayerIsPlaying(<at.MusicPlayer>player, &is_playing)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerIsPlaying failed with status: {status}")
 *     return bool(is_playing)
*/
  }

  /* "coremusic/capi.pyx":2398
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerIsPlaying failed with status: {status}")
 *     return bool(is_playing)             # <<<<<<<<<<<<<<
 * 
 * def music_player_set_play_rate_scalar(long player, double scale_rate):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_Boolean(__pyx_v_is_playing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2381
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2400
 *     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_375music_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_374music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting rate fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_375music_player_set_play_rate_scalar = {"music_player_set_play_rate_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_375music_player_set_play_rate_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_374music_player_set_play_rate_scalar};
static PyObject *__pyx_pw_9coremusic_4capi_375music_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, 2400, __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, 2400, __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, 2400, __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, 2400, __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, 2400, __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, 2400, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2400, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2400, __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, 2400, __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, 2400, __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_374music_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_374music_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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = 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":2413
 *         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":2414
 *     """
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_4 = __pyx_builtin_ValueError; 
    __pyx_t_5 = 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(__pyx_t_4, __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, 2414, __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, 2414, __pyx_L1_error)

    /* "coremusic/capi.pyx":2413
 *         RuntimeError: If setting rate fails
 *     """
 *     if scale_rate <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("Scale rate must be greater than zero")
 * 
*/
  }

  /* "coremusic/capi.pyx":2416
 *         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":2418
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetPlayRateScalar failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2419
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetPlayRateScalar failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_3 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerSetPlayRateScalar_fai, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __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, 2419, __pyx_L1_error)

    /* "coremusic/capi.pyx":2418
 *     cdef cf.OSStatus status = at.MusicPlayerSetPlayRateScalar(<at.MusicPlayer>player, <ca.Float64>scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerSetPlayRateScalar failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2420
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerSetPlayRateScalar failed with status: {status}")
 *     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, 2420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2400
 *     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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2422
 *     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_377music_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_376music_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_377music_player_get_play_rate_scalar = {"music_player_get_play_rate_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_377music_player_get_play_rate_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_376music_player_get_play_rate_scalar};
static PyObject *__pyx_pw_9coremusic_4capi_377music_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, 2422, __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, 2422, __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, 2422, __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, 2422, __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, 2422, __pyx_L3_error)
    }
    __pyx_v_player = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_player == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2422, __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, 2422, __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_376music_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_376music_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;
  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_player_get_play_rate_scalar", 0);

  /* "coremusic/capi.pyx":2435
 *     """
 *     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":2437
 *     cdef cf.OSStatus status = at.MusicPlayerGetPlayRateScalar(<at.MusicPlayer>player, &scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetPlayRateScalar failed with status: {status}")
 *     return <double>scale_rate
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2438
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetPlayRateScalar failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <double>scale_rate
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicPlayerGetPlayRateScalar_fai, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __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, 2438, __pyx_L1_error)

    /* "coremusic/capi.pyx":2437
 *     cdef cf.OSStatus status = at.MusicPlayerGetPlayRateScalar(<at.MusicPlayer>player, &scale_rate)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicPlayerGetPlayRateScalar failed with status: {status}")
 *     return <double>scale_rate
*/
  }

  /* "coremusic/capi.pyx":2439
 *     if status != 0:
 *         raise RuntimeError(f"MusicPlayerGetPlayRateScalar failed with status: {status}")
 *     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, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2422
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2443
 * # MusicSequence functions
 * 
 * def new_music_sequence():             # <<<<<<<<<<<<<<
 *     """Create a new empty music sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_379new_music_sequence(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_378new_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_379new_music_sequence = {"new_music_sequence", (PyCFunction)__pyx_pw_9coremusic_4capi_379new_music_sequence, METH_NOARGS, __pyx_doc_9coremusic_4capi_378new_music_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_379new_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_378new_music_sequence(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_378new_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;
  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("new_music_sequence", 0);

  /* "coremusic/capi.pyx":2453
 *     """
 *     cdef at.MusicSequence sequence
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)             # <<<<<<<<<<<<<<
 * 
 *     if status != 0:
*/
  __pyx_v_status = NewMusicSequence((&__pyx_v_sequence));

  /* "coremusic/capi.pyx":2455
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewMusicSequence failed with status: {status}")
 *     return <long>sequence
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2456
 * 
 *     if status != 0:
 *         raise RuntimeError(f"NewMusicSequence failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>sequence
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_NewMusicSequence_failed_with_sta, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2456, __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, 2456, __pyx_L1_error)

    /* "coremusic/capi.pyx":2455
 *     cdef cf.OSStatus status = at.NewMusicSequence(&sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewMusicSequence failed with status: {status}")
 *     return <long>sequence
*/
  }

  /* "coremusic/capi.pyx":2457
 *     if status != 0:
 *         raise RuntimeError(f"NewMusicSequence failed with status: {status}")
 *     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, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2443
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2459
 *     return <long>sequence
 * 
 * def dispose_music_sequence(long sequence):             # <<<<<<<<<<<<<<
 *     """Dispose a music sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_381dispose_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_380dispose_music_sequence, "dispose_music_sequence(long sequence)\n\nDispose a music sequence.\n\nArgs:\n    sequence: The MusicSequence handle to dispose\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_381dispose_music_sequence = {"dispose_music_sequence", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_381dispose_music_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_380dispose_music_sequence};
static PyObject *__pyx_pw_9coremusic_4capi_381dispose_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, 2459, __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, 2459, __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, 2459, __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, 2459, __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, 2459, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2459, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dispose_music_sequence", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2459, __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_380dispose_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_380dispose_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;
  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("dispose_music_sequence", 0);

  /* "coremusic/capi.pyx":2471
 *         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":2473
 *     cdef cf.OSStatus status = at.DisposeMusicSequence(<at.MusicSequence>sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeMusicSequence failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2474
 * 
 *     if status != 0:
 *         raise RuntimeError(f"DisposeMusicSequence failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_DisposeMusicSequence_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __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, 2474, __pyx_L1_error)

    /* "coremusic/capi.pyx":2473
 *     cdef cf.OSStatus status = at.DisposeMusicSequence(<at.MusicSequence>sequence)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeMusicSequence failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2475
 *     if status != 0:
 *         raise RuntimeError(f"DisposeMusicSequence failed with status: {status}")
 *     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, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2459
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2477
 *     return status
 * 
 * def music_sequence_new_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Add a new track to the sequence.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_383music_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_382music_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_383music_sequence_new_track = {"music_sequence_new_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_383music_sequence_new_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_382music_sequence_new_track};
static PyObject *__pyx_pw_9coremusic_4capi_383music_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, 2477, __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, 2477, __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, 2477, __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, 2477, __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, 2477, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2477, __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, 2477, __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_382music_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_382music_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;
  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_sequence_new_track", 0);

  /* "coremusic/capi.pyx":2490
 *     """
 *     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":2492
 *     cdef cf.OSStatus status = at.MusicSequenceNewTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceNewTrack failed with status: {status}")
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2493
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceNewTrack failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceNewTrack_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2493, __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, 2493, __pyx_L1_error)

    /* "coremusic/capi.pyx":2492
 *     cdef cf.OSStatus status = at.MusicSequenceNewTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceNewTrack failed with status: {status}")
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":2494
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceNewTrack failed with status: {status}")
 *     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, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2477
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2496
 *     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_385music_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_384music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If track disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_385music_sequence_dispose_track = {"music_sequence_dispose_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_385music_sequence_dispose_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_384music_sequence_dispose_track};
static PyObject *__pyx_pw_9coremusic_4capi_385music_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, 2496, __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, 2496, __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, 2496, __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, 2496, __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, 2496, __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, 2496, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2496, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    __pyx_v_track = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2496, __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, 2496, __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_384music_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_384music_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;
  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_sequence_dispose_track", 0);

  /* "coremusic/capi.pyx":2509
 *         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":2511
 *     cdef cf.OSStatus status = at.MusicSequenceDisposeTrack(<at.MusicSequence>sequence, <at.MusicTrack>track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceDisposeTrack failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2512
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceDisposeTrack failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceDisposeTrack_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2512, __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, 2512, __pyx_L1_error)

    /* "coremusic/capi.pyx":2511
 *     cdef cf.OSStatus status = at.MusicSequenceDisposeTrack(<at.MusicSequence>sequence, <at.MusicTrack>track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceDisposeTrack failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2513
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceDisposeTrack failed with status: {status}")
 *     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, 2513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2496
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2515
 *     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_387music_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_386music_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_387music_sequence_get_track_count = {"music_sequence_get_track_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_387music_sequence_get_track_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_386music_sequence_get_track_count};
static PyObject *__pyx_pw_9coremusic_4capi_387music_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, 2515, __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, 2515, __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, 2515, __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, 2515, __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, 2515, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2515, __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, 2515, __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_386music_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_386music_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;
  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_sequence_get_track_count", 0);

  /* "coremusic/capi.pyx":2528
 *     """
 *     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":2530
 *     cdef cf.OSStatus status = at.MusicSequenceGetTrackCount(<at.MusicSequence>sequence, &track_count)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetTrackCount failed with status: {status}")
 *     return track_count
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2531
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetTrackCount failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return track_count
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceGetTrackCount_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2531, __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, 2531, __pyx_L1_error)

    /* "coremusic/capi.pyx":2530
 *     cdef cf.OSStatus status = at.MusicSequenceGetTrackCount(<at.MusicSequence>sequence, &track_count)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetTrackCount failed with status: {status}")
 *     return track_count
*/
  }

  /* "coremusic/capi.pyx":2532
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetTrackCount failed with status: {status}")
 *     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, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2515
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2534
 *     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_389music_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_388music_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_389music_sequence_get_ind_track = {"music_sequence_get_ind_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_389music_sequence_get_ind_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_388music_sequence_get_ind_track};
static PyObject *__pyx_pw_9coremusic_4capi_389music_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, 2534, __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, 2534, __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, 2534, __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, 2534, __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, 2534, __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, 2534, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2534, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2534, __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, 2534, __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, 2534, __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_388music_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_388music_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;
  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_sequence_get_ind_track", 0);

  /* "coremusic/capi.pyx":2548
 *     """
 *     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":2550
 *     cdef cf.OSStatus status = at.MusicSequenceGetIndTrack(<at.MusicSequence>sequence, <cf.UInt32>track_index, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetIndTrack failed with status: {status}")
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2551
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetIndTrack failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceGetIndTrack_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __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, 2551, __pyx_L1_error)

    /* "coremusic/capi.pyx":2550
 *     cdef cf.OSStatus status = at.MusicSequenceGetIndTrack(<at.MusicSequence>sequence, <cf.UInt32>track_index, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetIndTrack failed with status: {status}")
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":2552
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetIndTrack failed with status: {status}")
 *     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, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2534
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2554
 *     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_391music_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_390music_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_391music_sequence_get_tempo_track = {"music_sequence_get_tempo_track", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_391music_sequence_get_tempo_track, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_390music_sequence_get_tempo_track};
static PyObject *__pyx_pw_9coremusic_4capi_391music_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, 2554, __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, 2554, __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, 2554, __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, 2554, __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, 2554, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2554, __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, 2554, __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_390music_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_390music_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;
  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_sequence_get_tempo_track", 0);

  /* "coremusic/capi.pyx":2567
 *     """
 *     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":2569
 *     cdef cf.OSStatus status = at.MusicSequenceGetTempoTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetTempoTrack failed with status: {status}")
 *     return <long>track
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2570
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetTempoTrack failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return <long>track
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceGetTempoTrack_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2570, __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, 2570, __pyx_L1_error)

    /* "coremusic/capi.pyx":2569
 *     cdef cf.OSStatus status = at.MusicSequenceGetTempoTrack(<at.MusicSequence>sequence, &track)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetTempoTrack failed with status: {status}")
 *     return <long>track
*/
  }

  /* "coremusic/capi.pyx":2571
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetTempoTrack failed with status: {status}")
 *     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, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2554
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2573
 *     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_393music_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_392music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting sequence type fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_393music_sequence_set_sequence_type = {"music_sequence_set_sequence_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_393music_sequence_set_sequence_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_392music_sequence_set_sequence_type};
static PyObject *__pyx_pw_9coremusic_4capi_393music_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, 2573, __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, 2573, __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, 2573, __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, 2573, __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, 2573, __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, 2573, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2573, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2573, __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, 2573, __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, 2573, __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_392music_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_392music_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;
  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_sequence_set_sequence_type", 0);

  /* "coremusic/capi.pyx":2586
 *         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":2588
 *     cdef cf.OSStatus status = at.MusicSequenceSetSequenceType(<at.MusicSequence>sequence, <cf.UInt32>sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceSetSequenceType failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2589
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceSetSequenceType failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceSetSequenceType_fai, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2589, __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, 2589, __pyx_L1_error)

    /* "coremusic/capi.pyx":2588
 *     cdef cf.OSStatus status = at.MusicSequenceSetSequenceType(<at.MusicSequence>sequence, <cf.UInt32>sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceSetSequenceType failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2590
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceSetSequenceType failed with status: {status}")
 *     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, 2590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2573
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2592
 *     return status
 * 
 * def music_sequence_get_sequence_type(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the sequence type.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_395music_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_394music_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_395music_sequence_get_sequence_type = {"music_sequence_get_sequence_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_395music_sequence_get_sequence_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_394music_sequence_get_sequence_type};
static PyObject *__pyx_pw_9coremusic_4capi_395music_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, 2592, __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, 2592, __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, 2592, __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, 2592, __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, 2592, __pyx_L3_error)
    }
    __pyx_v_sequence = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_sequence == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2592, __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, 2592, __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_394music_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_394music_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;
  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_sequence_get_sequence_type", 0);

  /* "coremusic/capi.pyx":2605
 *     """
 *     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":2607
 *     cdef cf.OSStatus status = at.MusicSequenceGetSequenceType(<at.MusicSequence>sequence, &sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetSequenceType failed with status: {status}")
 *     return sequence_type
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2608
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetSequenceType failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return sequence_type
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceGetSequenceType_fai, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2608, __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, 2608, __pyx_L1_error)

    /* "coremusic/capi.pyx":2607
 *     cdef cf.OSStatus status = at.MusicSequenceGetSequenceType(<at.MusicSequence>sequence, &sequence_type)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicSequenceGetSequenceType failed with status: {status}")
 *     return sequence_type
*/
  }

  /* "coremusic/capi.pyx":2609
 *     if status != 0:
 *         raise RuntimeError(f"MusicSequenceGetSequenceType failed with status: {status}")
 *     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, 2609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2592
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2611
 *     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_397music_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_396music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If file loading fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_397music_sequence_file_load = {"music_sequence_file_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_397music_sequence_file_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_396music_sequence_file_load};
static PyObject *__pyx_pw_9coremusic_4capi_397music_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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __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, 2611, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_396music_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_396music_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;
  PyObject *__pyx_t_8 = NULL;
  size_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("music_sequence_file_load", 0);

  /* "coremusic/capi.pyx":2626
 *         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, 2626, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_path_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2629
 *     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, 2629, __pyx_L1_error)

  /* "coremusic/capi.pyx":2630
 *         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, 2630, __pyx_L1_error)

  /* "coremusic/capi.pyx":2627
 *     """
 *     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":2635
 *     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":2636
 * 
 *     if not url_ref:
 *         raise ValueError(f"Could not create URL from file path: {file_path}")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_6 = __pyx_builtin_ValueError; 
    __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_file_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Could_not_create_URL_from_file_p_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __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, 2636, __pyx_L1_error)

    /* "coremusic/capi.pyx":2635
 *     cdef cf.OSStatus status
 * 
 *     if not url_ref:             # <<<<<<<<<<<<<<
 *         raise ValueError(f"Could not create URL from file path: {file_path}")
 * 
*/
  }

  /* "coremusic/capi.pyx":2638
 *         raise ValueError(f"Could not create URL from file path: {file_path}")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = at.MusicSequenceFileLoad(
 *             <at.MusicSequence>sequence,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2639
 * 
 *     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":2646
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MusicSequenceFileLoad failed with status: {status}")
 *         return status
*/
    __pyx_t_4 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_4)) {

      /* "coremusic/capi.pyx":2647
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MusicSequenceFileLoad failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return status
 * 
*/
      __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_8 = __pyx_builtin_RuntimeError; 
      __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2647, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2647, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicSequenceFileLoad_failed_wit, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2647, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2647, __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, 2647, __pyx_L5_error)

      /* "coremusic/capi.pyx":2646
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MusicSequenceFileLoad failed with status: {status}")
 *         return status
*/
    }

    /* "coremusic/capi.pyx":2648
 *         if status != 0:
 *             raise RuntimeError(f"MusicSequenceFileLoad failed with status: {status}")
 *         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, 2648, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":2651
 * 
 *     finally:
 *         cf.CFRelease(url_ref)             # <<<<<<<<<<<<<<
 * 
 * # MusicTrack functions
*/
  /*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_5); __pyx_t_5 = 0;
      __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_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;
      {
        CFRelease(__pyx_v_url_ref);
      }
      __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;
      CFRelease(__pyx_v_url_ref);
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2611
 *     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_XDECREF(__pyx_t_8);
  __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":2655
 * # 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_399music_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_398music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_399music_track_new_midi_note_event = {"music_track_new_midi_note_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_399music_track_new_midi_note_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_398music_track_new_midi_note_event};
static PyObject *__pyx_pw_9coremusic_4capi_399music_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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __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, 2655, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2655, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2655, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2655, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2655, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2655, __pyx_L3_error)
      values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2655, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __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, 2655, __pyx_L3_error)
    __pyx_v_duration = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_duration == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __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, 2655, __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_398music_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_398music_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;
  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_track_new_midi_note_event", 0);

  /* "coremusic/capi.pyx":2674
 *     """
 *     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":2675
 *     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":2676
 *     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":2677
 *     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":2678
 *     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":2680
 *     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":2686
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewMIDINoteEvent failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2687
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicTrackNewMIDINoteEvent failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicTrackNewMIDINoteEvent_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2687, __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, 2687, __pyx_L1_error)

    /* "coremusic/capi.pyx":2686
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewMIDINoteEvent failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2688
 *     if status != 0:
 *         raise RuntimeError(f"MusicTrackNewMIDINoteEvent failed with status: {status}")
 *     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, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2655
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2690
 *     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_401music_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_400music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_401music_track_new_midi_channel_event = {"music_track_new_midi_channel_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_401music_track_new_midi_channel_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_400music_track_new_midi_channel_event};
static PyObject *__pyx_pw_9coremusic_4capi_401music_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, 2690, __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, 2690, __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, 2690, __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, 2690, __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, 2690, __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, 2690, __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, 2690, __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, 2690, __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, 2690, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2690, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2690, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2690, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2690, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __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, 2690, __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_400music_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_400music_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;
  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_track_new_midi_channel_event", 0);

  /* "coremusic/capi.pyx":2707
 *     """
 *     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":2708
 *     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":2709
 *     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":2710
 *     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":2712
 *     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":2718
 *     )
 * 
 *     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":2719
 * 
 *     if status_result != 0:
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")             # <<<<<<<<<<<<<<
 *     return status_result
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicTrackNewMIDIChannelEvent_fa, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2719, __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, 2719, __pyx_L1_error)

    /* "coremusic/capi.pyx":2718
 *     )
 * 
 *     if status_result != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewMIDIChannelEvent failed with status: {status_result}")
 *     return status_result
*/
  }

  /* "coremusic/capi.pyx":2720
 *     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, 2720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2690
 *     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_XDECREF(__pyx_t_6);
  __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":2722
 *     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_403music_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_402music_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If adding event fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_403music_track_new_extended_tempo_event = {"music_track_new_extended_tempo_event", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_403music_track_new_extended_tempo_event, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_402music_track_new_extended_tempo_event};
static PyObject *__pyx_pw_9coremusic_4capi_403music_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, 2722, __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, 2722, __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, 2722, __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, 2722, __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, 2722, __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, 2722, __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, 2722, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2722, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2722, __pyx_L3_error)
    }
    __pyx_v_track = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_track == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2722, __pyx_L3_error)
    __pyx_v_timestamp = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_timestamp == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2722, __pyx_L3_error)
    __pyx_v_bpm = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_bpm == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2722, __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, 2722, __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_402music_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_402music_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;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = 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":2736
 *         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":2737
 *     """
 *     if bpm <= 0:
 *         raise ValueError("BPM must be greater than zero")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.OSStatus status = at.MusicTrackNewExtendedTempoEvent(
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_4 = __pyx_builtin_ValueError; 
    __pyx_t_5 = 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(__pyx_t_4, __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, 2737, __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, 2737, __pyx_L1_error)

    /* "coremusic/capi.pyx":2736
 *         RuntimeError: If adding event fails
 *     """
 *     if bpm <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("BPM must be greater than zero")
 * 
*/
  }

  /* "coremusic/capi.pyx":2739
 *         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":2745
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewExtendedTempoEvent failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2746
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MusicTrackNewExtendedTempoEvent failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_3 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MusicTrackNewExtendedTempoEvent, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2746, __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, 2746, __pyx_L1_error)

    /* "coremusic/capi.pyx":2745
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MusicTrackNewExtendedTempoEvent failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2747
 *     if status != 0:
 *         raise RuntimeError(f"MusicTrackNewExtendedTempoEvent failed with status: {status}")
 *     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, 2747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2722
 *     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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":2751
 * # 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_405get_music_event_type_null(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_404get_music_event_type_null, "get_music_event_type_null()\n\nGet the NULL event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_405get_music_event_type_null = {"get_music_event_type_null", (PyCFunction)__pyx_pw_9coremusic_4capi_405get_music_event_type_null, METH_NOARGS, __pyx_doc_9coremusic_4capi_404get_music_event_type_null};
static PyObject *__pyx_pw_9coremusic_4capi_405get_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_404get_music_event_type_null(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_404get_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":2753
 * 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, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2751
 * # 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":2755
 *     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_407get_music_event_type_extended_note(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_406get_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_407get_music_event_type_extended_note = {"get_music_event_type_extended_note", (PyCFunction)__pyx_pw_9coremusic_4capi_407get_music_event_type_extended_note, METH_NOARGS, __pyx_doc_9coremusic_4capi_406get_music_event_type_extended_note};
static PyObject *__pyx_pw_9coremusic_4capi_407get_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_406get_music_event_type_extended_note(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_406get_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":2757
 * 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, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2755
 *     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":2759
 *     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_409get_music_event_type_extended_tempo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_408get_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_409get_music_event_type_extended_tempo = {"get_music_event_type_extended_tempo", (PyCFunction)__pyx_pw_9coremusic_4capi_409get_music_event_type_extended_tempo, METH_NOARGS, __pyx_doc_9coremusic_4capi_408get_music_event_type_extended_tempo};
static PyObject *__pyx_pw_9coremusic_4capi_409get_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_408get_music_event_type_extended_tempo(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_408get_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":2761
 * 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, 2761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2759
 *     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":2763
 *     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_411get_music_event_type_user(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_410get_music_event_type_user, "get_music_event_type_user()\n\nGet the user event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_411get_music_event_type_user = {"get_music_event_type_user", (PyCFunction)__pyx_pw_9coremusic_4capi_411get_music_event_type_user, METH_NOARGS, __pyx_doc_9coremusic_4capi_410get_music_event_type_user};
static PyObject *__pyx_pw_9coremusic_4capi_411get_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_410get_music_event_type_user(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_410get_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":2765
 * 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, 2765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2763
 *     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":2767
 *     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_413get_music_event_type_meta(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_412get_music_event_type_meta, "get_music_event_type_meta()\n\nGet the meta event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_413get_music_event_type_meta = {"get_music_event_type_meta", (PyCFunction)__pyx_pw_9coremusic_4capi_413get_music_event_type_meta, METH_NOARGS, __pyx_doc_9coremusic_4capi_412get_music_event_type_meta};
static PyObject *__pyx_pw_9coremusic_4capi_413get_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_412get_music_event_type_meta(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_412get_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":2769
 * 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, 2769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2767
 *     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":2771
 *     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_415get_music_event_type_midi_note_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_414get_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_415get_music_event_type_midi_note_message = {"get_music_event_type_midi_note_message", (PyCFunction)__pyx_pw_9coremusic_4capi_415get_music_event_type_midi_note_message, METH_NOARGS, __pyx_doc_9coremusic_4capi_414get_music_event_type_midi_note_message};
static PyObject *__pyx_pw_9coremusic_4capi_415get_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_414get_music_event_type_midi_note_message(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_414get_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":2773
 * 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, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2771
 *     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":2775
 *     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_417get_music_event_type_midi_channel_message(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_416get_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_417get_music_event_type_midi_channel_message = {"get_music_event_type_midi_channel_message", (PyCFunction)__pyx_pw_9coremusic_4capi_417get_music_event_type_midi_channel_message, METH_NOARGS, __pyx_doc_9coremusic_4capi_416get_music_event_type_midi_channel_message};
static PyObject *__pyx_pw_9coremusic_4capi_417get_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_416get_music_event_type_midi_channel_message(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_416get_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":2777
 * 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, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2775
 *     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":2779
 *     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_419get_music_event_type_midi_raw_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_418get_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_419get_music_event_type_midi_raw_data = {"get_music_event_type_midi_raw_data", (PyCFunction)__pyx_pw_9coremusic_4capi_419get_music_event_type_midi_raw_data, METH_NOARGS, __pyx_doc_9coremusic_4capi_418get_music_event_type_midi_raw_data};
static PyObject *__pyx_pw_9coremusic_4capi_419get_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_418get_music_event_type_midi_raw_data(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_418get_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":2781
 * 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, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2779
 *     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":2783
 *     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_421get_music_event_type_parameter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_420get_music_event_type_parameter, "get_music_event_type_parameter()\n\nGet the parameter event type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_421get_music_event_type_parameter = {"get_music_event_type_parameter", (PyCFunction)__pyx_pw_9coremusic_4capi_421get_music_event_type_parameter, METH_NOARGS, __pyx_doc_9coremusic_4capi_420get_music_event_type_parameter};
static PyObject *__pyx_pw_9coremusic_4capi_421get_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_420get_music_event_type_parameter(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_420get_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":2785
 * 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, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2783
 *     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":2787
 *     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_423get_music_event_type_au_preset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_422get_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_423get_music_event_type_au_preset = {"get_music_event_type_au_preset", (PyCFunction)__pyx_pw_9coremusic_4capi_423get_music_event_type_au_preset, METH_NOARGS, __pyx_doc_9coremusic_4capi_422get_music_event_type_au_preset};
static PyObject *__pyx_pw_9coremusic_4capi_423get_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_422get_music_event_type_au_preset(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_422get_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":2789
 * 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, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2787
 *     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":2791
 *     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_425get_music_sequence_type_beats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_424get_music_sequence_type_beats, "get_music_sequence_type_beats()\n\nGet the beats sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_425get_music_sequence_type_beats = {"get_music_sequence_type_beats", (PyCFunction)__pyx_pw_9coremusic_4capi_425get_music_sequence_type_beats, METH_NOARGS, __pyx_doc_9coremusic_4capi_424get_music_sequence_type_beats};
static PyObject *__pyx_pw_9coremusic_4capi_425get_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_424get_music_sequence_type_beats(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_424get_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":2793
 * 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, 2793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2791
 *     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":2795
 *     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_427get_music_sequence_type_seconds(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_426get_music_sequence_type_seconds, "get_music_sequence_type_seconds()\n\nGet the seconds sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_427get_music_sequence_type_seconds = {"get_music_sequence_type_seconds", (PyCFunction)__pyx_pw_9coremusic_4capi_427get_music_sequence_type_seconds, METH_NOARGS, __pyx_doc_9coremusic_4capi_426get_music_sequence_type_seconds};
static PyObject *__pyx_pw_9coremusic_4capi_427get_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_426get_music_sequence_type_seconds(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_426get_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":2797
 * 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, 2797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2795
 *     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":2799
 *     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_429get_music_sequence_type_samples(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_428get_music_sequence_type_samples, "get_music_sequence_type_samples()\n\nGet the samples sequence type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_429get_music_sequence_type_samples = {"get_music_sequence_type_samples", (PyCFunction)__pyx_pw_9coremusic_4capi_429get_music_sequence_type_samples, METH_NOARGS, __pyx_doc_9coremusic_4capi_428get_music_sequence_type_samples};
static PyObject *__pyx_pw_9coremusic_4capi_429get_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_428get_music_sequence_type_samples(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_428get_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":2801
 * 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, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2799
 *     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":2803
 *     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_431get_music_sequence_file_any_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_430get_music_sequence_file_any_type, "get_music_sequence_file_any_type()\n\nGet the any file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_431get_music_sequence_file_any_type = {"get_music_sequence_file_any_type", (PyCFunction)__pyx_pw_9coremusic_4capi_431get_music_sequence_file_any_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_430get_music_sequence_file_any_type};
static PyObject *__pyx_pw_9coremusic_4capi_431get_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_430get_music_sequence_file_any_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_430get_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":2805
 * 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, 2805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2803
 *     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":2807
 *     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_433get_music_sequence_file_midi_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_432get_music_sequence_file_midi_type, "get_music_sequence_file_midi_type()\n\nGet the MIDI file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_433get_music_sequence_file_midi_type = {"get_music_sequence_file_midi_type", (PyCFunction)__pyx_pw_9coremusic_4capi_433get_music_sequence_file_midi_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_432get_music_sequence_file_midi_type};
static PyObject *__pyx_pw_9coremusic_4capi_433get_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_432get_music_sequence_file_midi_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_432get_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":2809
 * 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, 2809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2807
 *     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":2811
 *     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_435get_music_sequence_file_imelody_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_434get_music_sequence_file_imelody_type, "get_music_sequence_file_imelody_type()\n\nGet the iMelody file type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_435get_music_sequence_file_imelody_type = {"get_music_sequence_file_imelody_type", (PyCFunction)__pyx_pw_9coremusic_4capi_435get_music_sequence_file_imelody_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_434get_music_sequence_file_imelody_type};
static PyObject *__pyx_pw_9coremusic_4capi_435get_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_434get_music_sequence_file_imelody_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_434get_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":2813
 * 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, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2811
 *     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":2815
 *     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_437get_sequence_track_property_loop_info(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_436get_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_437get_sequence_track_property_loop_info = {"get_sequence_track_property_loop_info", (PyCFunction)__pyx_pw_9coremusic_4capi_437get_sequence_track_property_loop_info, METH_NOARGS, __pyx_doc_9coremusic_4capi_436get_sequence_track_property_loop_info};
static PyObject *__pyx_pw_9coremusic_4capi_437get_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_436get_sequence_track_property_loop_info(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_436get_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":2817
 * 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, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2815
 *     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":2819
 *     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_439get_sequence_track_property_offset_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_438get_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_439get_sequence_track_property_offset_time = {"get_sequence_track_property_offset_time", (PyCFunction)__pyx_pw_9coremusic_4capi_439get_sequence_track_property_offset_time, METH_NOARGS, __pyx_doc_9coremusic_4capi_438get_sequence_track_property_offset_time};
static PyObject *__pyx_pw_9coremusic_4capi_439get_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_438get_sequence_track_property_offset_time(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_438get_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":2821
 * 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, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2819
 *     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":2823
 *     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_441get_sequence_track_property_mute_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_440get_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_441get_sequence_track_property_mute_status = {"get_sequence_track_property_mute_status", (PyCFunction)__pyx_pw_9coremusic_4capi_441get_sequence_track_property_mute_status, METH_NOARGS, __pyx_doc_9coremusic_4capi_440get_sequence_track_property_mute_status};
static PyObject *__pyx_pw_9coremusic_4capi_441get_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_440get_sequence_track_property_mute_status(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_440get_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":2825
 * 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, 2825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2823
 *     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":2827
 *     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_443get_sequence_track_property_solo_status(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_442get_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_443get_sequence_track_property_solo_status = {"get_sequence_track_property_solo_status", (PyCFunction)__pyx_pw_9coremusic_4capi_443get_sequence_track_property_solo_status, METH_NOARGS, __pyx_doc_9coremusic_4capi_442get_sequence_track_property_solo_status};
static PyObject *__pyx_pw_9coremusic_4capi_443get_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_442get_sequence_track_property_solo_status(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_442get_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":2829
 * 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, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2827
 *     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":2831
 *     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_445get_sequence_track_property_automated_parameters(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_444get_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_445get_sequence_track_property_automated_parameters = {"get_sequence_track_property_automated_parameters", (PyCFunction)__pyx_pw_9coremusic_4capi_445get_sequence_track_property_automated_parameters, METH_NOARGS, __pyx_doc_9coremusic_4capi_444get_sequence_track_property_automated_parameters};
static PyObject *__pyx_pw_9coremusic_4capi_445get_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_444get_sequence_track_property_automated_parameters(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_444get_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":2833
 * 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, 2833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2831
 *     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":2835
 *     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_447get_sequence_track_property_track_length(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_446get_sequence_track_property_track_length, "get_sequence_track_property_track_length()\n\nGet the track length property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_447get_sequence_track_property_track_length = {"get_sequence_track_property_track_length", (PyCFunction)__pyx_pw_9coremusic_4capi_447get_sequence_track_property_track_length, METH_NOARGS, __pyx_doc_9coremusic_4capi_446get_sequence_track_property_track_length};
static PyObject *__pyx_pw_9coremusic_4capi_447get_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_446get_sequence_track_property_track_length(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_446get_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":2837
 * 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, 2837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2835
 *     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":2839
 *     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_449get_sequence_track_property_time_resolution(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_448get_sequence_track_property_time_resolution, "get_sequence_track_property_time_resolution()\n\nGet the time resolution property constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_449get_sequence_track_property_time_resolution = {"get_sequence_track_property_time_resolution", (PyCFunction)__pyx_pw_9coremusic_4capi_449get_sequence_track_property_time_resolution, METH_NOARGS, __pyx_doc_9coremusic_4capi_448get_sequence_track_property_time_resolution};
static PyObject *__pyx_pw_9coremusic_4capi_449get_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_448get_sequence_track_property_time_resolution(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_448get_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":2841
 * 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, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2839
 *     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":2845
 * # 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_451create_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_450create_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_451create_midi_note_message = {"create_midi_note_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_451create_midi_note_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_450create_midi_note_message};
static PyObject *__pyx_pw_9coremusic_4capi_451create_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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __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, 2845, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2845, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2845, __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, 2845, __pyx_L3_error)
    __pyx_v_note = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_note == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2845, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2845, __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, 2845, __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, 2845, __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, 2845, __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_450create_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_450create_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":2858
 *         Dictionary with note message parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'channel': channel & 0x0F,
 *         'note': note & 0x7F,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2859
 *     """
 *     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, 2859, __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, 2859, __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, 2859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2860
 *     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, 2860, __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, 2859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2861
 *         '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, 2861, __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, 2859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2862
 *         '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, 2862, __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, 2859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2863
 *         '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, 2863, __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, 2859, __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":2845
 * # 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":2866
 *     }
 * 
 * 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_453create_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_452create_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_453create_midi_channel_message = {"create_midi_channel_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_453create_midi_channel_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_452create_midi_channel_message};
static PyObject *__pyx_pw_9coremusic_4capi_453create_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, 2866, __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, 2866, __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, 2866, __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, 2866, __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, 2866, __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, 2866, __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, 2866, __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, 2866, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2866, __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, 2866, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2866, __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, 2866, __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, 2866, __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_452create_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_452create_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":2877
 *         Dictionary with channel message parameters
 *     """
 *     return {             # <<<<<<<<<<<<<<
 *         'status': status & 0xFF,
 *         'data1': data1 & 0x7F,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "coremusic/capi.pyx":2878
 *     """
 *     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, 2878, __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, 2878, __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, 2878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2879
 *     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, 2879, __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, 2878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2880
 *         '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, 2880, __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, 2878, __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":2866
 *     }
 * 
 * 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":2888
 * # Client functions
 * 
 * def midi_client_create(str name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI client.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_455midi_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_454midi_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_455midi_client_create = {"midi_client_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_455midi_client_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_454midi_client_create};
static PyObject *__pyx_pw_9coremusic_4capi_455midi_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, 2888, __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, 2888, __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, 2888, __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, 2888, __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, 2888, __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, 2888, __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, 2888, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_454midi_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_454midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_client_create", 0);

  /* "coremusic/capi.pyx":2900
 *         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, 2900, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2902
 *     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, 2902, __pyx_L1_error)

  /* "coremusic/capi.pyx":2901
 *     """
 *     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":2906
 *     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":2907
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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, 2907, __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, 2907, __pyx_L1_error)

    /* "coremusic/capi.pyx":2906
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":2909
 *         raise MemoryError("Could not create CFString from name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2910
 * 
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"MIDIClientCreate failed with status: {status}")
*/
    __pyx_v_status = MIDIClientCreate(__pyx_v_cf_name, NULL, NULL, (&__pyx_v_client));

    /* "coremusic/capi.pyx":2911
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIClientCreate failed with status: {status}")
 *         return <long>client
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":2912
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIClientCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return <long>client
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2912, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2912, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIClientCreate_failed_with_sta, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2912, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2912, __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, 2912, __pyx_L5_error)

      /* "coremusic/capi.pyx":2911
 *     try:
 *         status = cm.MIDIClientCreate(cf_name, NULL, NULL, &client)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIClientCreate failed with status: {status}")
 *         return <long>client
*/
    }

    /* "coremusic/capi.pyx":2913
 *         if status != 0:
 *             raise RuntimeError(f"MIDIClientCreate failed with status: {status}")
 *         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, 2913, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":2915
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __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_cf_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2888
 * # 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":2917
 *         cf.CFRelease(cf_name)
 * 
 * def midi_client_dispose(long client):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI client.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_457midi_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_456midi_client_dispose, "midi_client_dispose(long client)\n\nDispose a MIDI client.\n\nArgs:\n    client: The MIDIClientRef to dispose\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_457midi_client_dispose = {"midi_client_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_457midi_client_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_456midi_client_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_457midi_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, 2917, __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, 2917, __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, 2917, __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, 2917, __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, 2917, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2917, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_client_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2917, __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_456midi_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_456midi_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;
  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("midi_client_dispose", 0);

  /* "coremusic/capi.pyx":2929
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"MIDIClientDispose failed with status: {status}")
*/
  __pyx_v_status = MIDIClientDispose(((MIDIClientRef)__pyx_v_client));

  /* "coremusic/capi.pyx":2930
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIClientDispose failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":2931
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIClientDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIClientDispose_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __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, 2931, __pyx_L1_error)

    /* "coremusic/capi.pyx":2930
 *     """
 *     cdef cf.OSStatus status = cm.MIDIClientDispose(<cm.MIDIClientRef>client)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIClientDispose failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":2932
 *     if status != 0:
 *         raise RuntimeError(f"MIDIClientDispose failed with status: {status}")
 *     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, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2917
 *         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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2936
 * # 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_459midi_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_458midi_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_459midi_input_port_create = {"midi_input_port_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_459midi_input_port_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_458midi_input_port_create};
static PyObject *__pyx_pw_9coremusic_4capi_459midi_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, 2936, __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, 2936, __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, 2936, __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, 2936, __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, 2936, __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, 2936, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2936, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2936, __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, 2936, __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, 2936, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_458midi_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_458midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_input_port_create", 0);

  /* "coremusic/capi.pyx":2949
 *         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, 2949, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_port_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_port_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2951
 *     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, 2951, __pyx_L1_error)

  /* "coremusic/capi.pyx":2950
 *     """
 *     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":2955
 *     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":2956
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from port name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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, 2956, __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, 2956, __pyx_L1_error)

    /* "coremusic/capi.pyx":2955
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  }

  /* "coremusic/capi.pyx":2958
 *         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":2959
 * 
 *     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":2961
 *         status = cm.MIDIInputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIInputPortCreate failed with status: {status}")
 *         return <long>port
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":2962
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIInputPortCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return <long>port
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2962, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2962, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIInputPortCreate_failed_with, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2962, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2962, __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, 2962, __pyx_L5_error)

      /* "coremusic/capi.pyx":2961
 *         status = cm.MIDIInputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIInputPortCreate failed with status: {status}")
 *         return <long>port
*/
    }

    /* "coremusic/capi.pyx":2963
 *         if status != 0:
 *             raise RuntimeError(f"MIDIInputPortCreate failed with status: {status}")
 *         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, 2963, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":2965
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __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_cf_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2936
 * # 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":2967
 *         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_461midi_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_460midi_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_461midi_output_port_create = {"midi_output_port_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_461midi_output_port_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_460midi_output_port_create};
static PyObject *__pyx_pw_9coremusic_4capi_461midi_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, 2967, __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, 2967, __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, 2967, __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, 2967, __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, 2967, __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, 2967, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2967, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2967, __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, 2967, __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, 2967, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_460midi_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_460midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_output_port_create", 0);

  /* "coremusic/capi.pyx":2980
 *         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, 2980, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_port_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_port_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":2982
 *     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, 2982, __pyx_L1_error)

  /* "coremusic/capi.pyx":2981
 *     """
 *     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":2986
 *     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":2987
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from port name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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, 2987, __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, 2987, __pyx_L1_error)

    /* "coremusic/capi.pyx":2986
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from port name")
 * 
*/
  }

  /* "coremusic/capi.pyx":2989
 *         raise MemoryError("Could not create CFString from port name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":2990
 * 
 *     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":2992
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIOutputPortCreate failed with status: {status}")
 *         return <long>port
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":2993
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIOutputPortCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return <long>port
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2993, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2993, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIOutputPortCreate_failed_with, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2993, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __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, 2993, __pyx_L5_error)

      /* "coremusic/capi.pyx":2992
 *         status = cm.MIDIOutputPortCreate(
 *             <cm.MIDIClientRef>client, cf_name, &port)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIOutputPortCreate failed with status: {status}")
 *         return <long>port
*/
    }

    /* "coremusic/capi.pyx":2994
 *         if status != 0:
 *             raise RuntimeError(f"MIDIOutputPortCreate failed with status: {status}")
 *         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, 2994, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":2996
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __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_cf_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":2967
 *         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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":2998
 *         cf.CFRelease(cf_name)
 * 
 * def midi_port_dispose(long port):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI port.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_463midi_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_462midi_port_dispose, "midi_port_dispose(long port)\n\nDispose a MIDI port.\n\nArgs:\n    port: The MIDIPortRef to dispose\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_463midi_port_dispose = {"midi_port_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_463midi_port_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_462midi_port_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_463midi_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, 2998, __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, 2998, __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, 2998, __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, 2998, __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, 2998, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2998, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_port_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2998, __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_462midi_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_462midi_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;
  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("midi_port_dispose", 0);

  /* "coremusic/capi.pyx":3010
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortDispose failed with status: {status}")
*/
  __pyx_v_status = MIDIPortDispose(((MIDIPortRef)__pyx_v_port));

  /* "coremusic/capi.pyx":3011
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortDispose failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3012
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIPortDispose_failed_with_stat, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __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, 3012, __pyx_L1_error)

    /* "coremusic/capi.pyx":3011
 *     """
 *     cdef cf.OSStatus status = cm.MIDIPortDispose(<cm.MIDIPortRef>port)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortDispose failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3013
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortDispose failed with status: {status}")
 *     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, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":2998
 *         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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3015
 *     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_465midi_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_464midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If connection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_465midi_port_connect_source = {"midi_port_connect_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_465midi_port_connect_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_464midi_port_connect_source};
static PyObject *__pyx_pw_9coremusic_4capi_465midi_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, 3015, __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, 3015, __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, 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, "midi_port_connect_source", 0) < (0)) __PYX_ERR(0, 3015, __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, 3015, __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, 3015, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3015, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3015, __pyx_L3_error)
    __pyx_v_source = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_source == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3015, __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, 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.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_464midi_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_464midi_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;
  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("midi_port_connect_source", 0);

  /* "coremusic/capi.pyx":3028
 *         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":3030
 *     cdef cf.OSStatus status = cm.MIDIPortConnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortConnectSource failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3031
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortConnectSource failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIPortConnectSource_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __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, 3031, __pyx_L1_error)

    /* "coremusic/capi.pyx":3030
 *     cdef cf.OSStatus status = cm.MIDIPortConnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source, NULL)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortConnectSource failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3032
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortConnectSource failed with status: {status}")
 *     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, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3015
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3034
 *     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_467midi_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_466midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If disconnection fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_467midi_port_disconnect_source = {"midi_port_disconnect_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_467midi_port_disconnect_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_466midi_port_disconnect_source};
static PyObject *__pyx_pw_9coremusic_4capi_467midi_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, 3034, __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, 3034, __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, 3034, __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, 3034, __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, 3034, __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, 3034, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3034, __pyx_L3_error)
    }
    __pyx_v_port = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_port == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3034, __pyx_L3_error)
    __pyx_v_source = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_source == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3034, __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, 3034, __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_466midi_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_466midi_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;
  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("midi_port_disconnect_source", 0);

  /* "coremusic/capi.pyx":3047
 *         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":3049
 *     cdef cf.OSStatus status = cm.MIDIPortDisconnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortDisconnectSource failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3050
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortDisconnectSource failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIPortDisconnectSource_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3050, __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, 3050, __pyx_L1_error)

    /* "coremusic/capi.pyx":3049
 *     cdef cf.OSStatus status = cm.MIDIPortDisconnectSource(
 *         <cm.MIDIPortRef>port, <cm.MIDIEndpointRef>source)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIPortDisconnectSource failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3051
 *     if status != 0:
 *         raise RuntimeError(f"MIDIPortDisconnectSource failed with status: {status}")
 *     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, 3051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3034
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3055
 * # 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_469midi_get_number_of_devices(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_468midi_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_469midi_get_number_of_devices = {"midi_get_number_of_devices", (PyCFunction)__pyx_pw_9coremusic_4capi_469midi_get_number_of_devices, METH_NOARGS, __pyx_doc_9coremusic_4capi_468midi_get_number_of_devices};
static PyObject *__pyx_pw_9coremusic_4capi_469midi_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_468midi_get_number_of_devices(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_468midi_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":3061
 *         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, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3055
 * # 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":3063
 *     return cm.MIDIGetNumberOfDevices()
 * 
 * def midi_get_device(int device_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a device by index.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_471midi_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_470midi_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_471midi_get_device = {"midi_get_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_471midi_get_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_470midi_get_device};
static PyObject *__pyx_pw_9coremusic_4capi_471midi_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, 3063, __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, 3063, __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, 3063, __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, 3063, __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, 3063, __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, 3063, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_device", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3063, __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_470midi_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_470midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_device", 0);

  /* "coremusic/capi.pyx":3075
 *         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":3076
 *     """
 *     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":3077
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_device_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_devices - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Device_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3077, __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, 3077, __pyx_L1_error)

    /* "coremusic/capi.pyx":3076
 *     """
 *     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":3079
 *         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":3080
 * 
 *     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, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyLong_CheckExact(__pyx_t_3)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_3))) __PYX_ERR(0, 3080, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3063
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3082
 *     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_473midi_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_472midi_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_473midi_device_get_number_of_entities = {"midi_device_get_number_of_entities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_473midi_device_get_number_of_entities, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_472midi_device_get_number_of_entities};
static PyObject *__pyx_pw_9coremusic_4capi_473midi_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, 3082, __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, 3082, __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, 3082, __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, 3082, __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, 3082, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3082, __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, 3082, __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_472midi_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_472midi_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":3091
 *         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, 3091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3082
 *     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":3093
 *     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_475midi_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_474midi_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_475midi_device_get_entity = {"midi_device_get_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_475midi_device_get_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_474midi_device_get_entity};
static PyObject *__pyx_pw_9coremusic_4capi_475midi_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, 3093, __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, 3093, __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, 3093, __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, 3093, __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, 3093, __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, 3093, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3093, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3093, __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, 3093, __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, 3093, __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_474midi_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_474midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_get_entity", 0);

  /* "coremusic/capi.pyx":3106
 *         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":3107
 *     """
 *     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":3108
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_entity_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_entities - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Entity_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __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, 3108, __pyx_L1_error)

    /* "coremusic/capi.pyx":3107
 *     """
 *     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":3110
 *         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":3112
 *     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, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3093
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3114
 *     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_477midi_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_476midi_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_477midi_entity_get_number_of_sources = {"midi_entity_get_number_of_sources", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_477midi_entity_get_number_of_sources, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_476midi_entity_get_number_of_sources};
static PyObject *__pyx_pw_9coremusic_4capi_477midi_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, 3114, __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, 3114, __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, 3114, __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, 3114, __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, 3114, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3114, __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, 3114, __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_476midi_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_476midi_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":3123
 *         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, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3114
 *     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":3125
 *     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_479midi_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_478midi_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_479midi_entity_get_source = {"midi_entity_get_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_479midi_entity_get_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_478midi_entity_get_source};
static PyObject *__pyx_pw_9coremusic_4capi_479midi_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, 3125, __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, 3125, __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, 3125, __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, 3125, __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, 3125, __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, 3125, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3125, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3125, __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, 3125, __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, 3125, __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_478midi_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_478midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_get_source", 0);

  /* "coremusic/capi.pyx":3138
 *         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":3139
 *     """
 *     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":3140
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_source_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_sources - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Source_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __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, 3140, __pyx_L1_error)

    /* "coremusic/capi.pyx":3139
 *     """
 *     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":3142
 *         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":3144
 *     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, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3125
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3146
 *     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_481midi_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_480midi_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_481midi_entity_get_number_of_destinations = {"midi_entity_get_number_of_destinations", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_481midi_entity_get_number_of_destinations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_480midi_entity_get_number_of_destinations};
static PyObject *__pyx_pw_9coremusic_4capi_481midi_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, 3146, __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, 3146, __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, 3146, __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, 3146, __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, 3146, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3146, __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, 3146, __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_480midi_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_480midi_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":3155
 *         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, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3146
 *     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":3157
 *     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_483midi_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_482midi_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_483midi_entity_get_destination = {"midi_entity_get_destination", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_483midi_entity_get_destination, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_482midi_entity_get_destination};
static PyObject *__pyx_pw_9coremusic_4capi_483midi_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, 3157, __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, 3157, __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, 3157, __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, 3157, __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, 3157, __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, 3157, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3157, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3157, __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, 3157, __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, 3157, __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_482midi_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_482midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_entity_get_destination", 0);

  /* "coremusic/capi.pyx":3170
 *         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":3171
 *     """
 *     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":3172
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_dest_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_dests - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Destination_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __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, 3172, __pyx_L1_error)

    /* "coremusic/capi.pyx":3171
 *     """
 *     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":3174
 *         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":3176
 *     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, 3176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3157
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3178
 *     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_485midi_get_number_of_sources(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_484midi_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_485midi_get_number_of_sources = {"midi_get_number_of_sources", (PyCFunction)__pyx_pw_9coremusic_4capi_485midi_get_number_of_sources, METH_NOARGS, __pyx_doc_9coremusic_4capi_484midi_get_number_of_sources};
static PyObject *__pyx_pw_9coremusic_4capi_485midi_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_484midi_get_number_of_sources(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_484midi_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":3184
 *         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, 3184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3178
 *     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":3186
 *     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_487midi_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_486midi_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_487midi_get_source = {"midi_get_source", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_487midi_get_source, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_486midi_get_source};
static PyObject *__pyx_pw_9coremusic_4capi_487midi_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, 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, "midi_get_source", 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("midi_get_source", 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_source_index = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_source_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3186, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_source", 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.midi_get_source", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9coremusic_4capi_486midi_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_486midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_source", 0);

  /* "coremusic/capi.pyx":3198
 *         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":3199
 *     """
 *     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":3200
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_source_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_sources - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Source_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3200, __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, 3200, __pyx_L1_error)

    /* "coremusic/capi.pyx":3199
 *     """
 *     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":3202
 *         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":3203
 * 
 *     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, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(PyLong_CheckExact(__pyx_t_3)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_3))) __PYX_ERR(0, 3203, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3186
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3205
 *     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_489midi_get_number_of_destinations(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_488midi_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_489midi_get_number_of_destinations = {"midi_get_number_of_destinations", (PyCFunction)__pyx_pw_9coremusic_4capi_489midi_get_number_of_destinations, METH_NOARGS, __pyx_doc_9coremusic_4capi_488midi_get_number_of_destinations};
static PyObject *__pyx_pw_9coremusic_4capi_489midi_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_488midi_get_number_of_destinations(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_488midi_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":3211
 *         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, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3205
 *     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":3213
 *     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_491midi_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_490midi_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_491midi_get_destination = {"midi_get_destination", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_491midi_get_destination, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_490midi_get_destination};
static PyObject *__pyx_pw_9coremusic_4capi_491midi_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, 3213, __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, 3213, __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, 3213, __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, 3213, __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, 3213, __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, 3213, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_get_destination", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3213, __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_490midi_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_490midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_get_destination", 0);

  /* "coremusic/capi.pyx":3225
 *         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":3226
 *     """
 *     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":3227
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_dest_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_dests - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Destination_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_range_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3227, __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, 3227, __pyx_L1_error)

    /* "coremusic/capi.pyx":3226
 *     """
 *     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":3229
 *         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":3230
 * 
 *     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, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3213
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3234
 * # Virtual endpoint functions
 * 
 * def midi_source_create(long client, str name):             # <<<<<<<<<<<<<<
 *     """Create a virtual MIDI source.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_493midi_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_492midi_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_493midi_source_create = {"midi_source_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_493midi_source_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_492midi_source_create};
static PyObject *__pyx_pw_9coremusic_4capi_493midi_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, 3234, __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, 3234, __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, 3234, __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, 3234, __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, 3234, __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, 3234, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3234, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3234, __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, 3234, __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, 3234, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_492midi_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_492midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_source_create", 0);

  /* "coremusic/capi.pyx":3247
 *         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, 3247, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3249
 *     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, 3249, __pyx_L1_error)

  /* "coremusic/capi.pyx":3248
 *     """
 *     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":3253
 *     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":3254
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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, 3254, __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, 3254, __pyx_L1_error)

    /* "coremusic/capi.pyx":3253
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":3256
 *         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":3257
 * 
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise RuntimeError(f"MIDISourceCreate failed with status: {status}")
*/
    __pyx_v_status = MIDISourceCreate(((MIDIClientRef)__pyx_v_client), __pyx_v_cf_name, (&__pyx_v_source));

    /* "coremusic/capi.pyx":3258
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDISourceCreate failed with status: {status}")
 *         return <long>source
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3259
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:
 *             raise RuntimeError(f"MIDISourceCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return <long>source
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3259, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3259, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISourceCreate_failed_with_sta, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3259, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3259, __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, 3259, __pyx_L5_error)

      /* "coremusic/capi.pyx":3258
 *     try:
 *         status = cm.MIDISourceCreate(<cm.MIDIClientRef>client, cf_name, &source)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDISourceCreate failed with status: {status}")
 *         return <long>source
*/
    }

    /* "coremusic/capi.pyx":3260
 *         if status != 0:
 *             raise RuntimeError(f"MIDISourceCreate failed with status: {status}")
 *         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, 3260, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":3262
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __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_cf_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3234
 * # 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3264
 *         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_495midi_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_494midi_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_495midi_destination_create = {"midi_destination_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_495midi_destination_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_494midi_destination_create};
static PyObject *__pyx_pw_9coremusic_4capi_495midi_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, 3264, __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, 3264, __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, 3264, __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, 3264, __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, 3264, __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, 3264, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3264, __pyx_L3_error)
    }
    __pyx_v_client = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_client == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3264, __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, 3264, __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, 3264, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_494midi_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_494midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_destination_create", 0);

  /* "coremusic/capi.pyx":3277
 *         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, 3277, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3279
 *     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, 3279, __pyx_L1_error)

  /* "coremusic/capi.pyx":3278
 *     """
 *     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":3283
 *     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":3284
 * 
 *     if not cf_name:
 *         raise MemoryError("Could not create CFString from name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_5 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 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(__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, 3284, __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, 3284, __pyx_L1_error)

    /* "coremusic/capi.pyx":3283
 *     cdef cf.OSStatus status
 * 
 *     if not cf_name:             # <<<<<<<<<<<<<<
 *         raise MemoryError("Could not create CFString from name")
 * 
*/
  }

  /* "coremusic/capi.pyx":3286
 *         raise MemoryError("Could not create CFString from name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3287
 * 
 *     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":3289
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDestinationCreate failed with status: {status}")
 *         return <long>dest
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3290
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIDestinationCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return <long>dest
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3290, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3290, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDestinationCreate_failed_wit, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3290, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3290, __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, 3290, __pyx_L5_error)

      /* "coremusic/capi.pyx":3289
 *         status = cm.MIDIDestinationCreate(
 *             <cm.MIDIClientRef>client, cf_name, NULL, NULL, &dest)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDestinationCreate failed with status: {status}")
 *         return <long>dest
*/
    }

    /* "coremusic/capi.pyx":3291
 *         if status != 0:
 *             raise RuntimeError(f"MIDIDestinationCreate failed with status: {status}")
 *         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, 3291, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":3293
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_name);
      }
      __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_cf_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3264
 *         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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3295
 *         cf.CFRelease(cf_name)
 * 
 * def midi_endpoint_dispose(long endpoint):             # <<<<<<<<<<<<<<
 *     """Dispose a virtual MIDI endpoint.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_497midi_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_496midi_endpoint_dispose, "midi_endpoint_dispose(long endpoint)\n\nDispose a virtual MIDI endpoint.\n\nArgs:\n    endpoint: The MIDIEndpointRef to dispose\n\nReturns:\n  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_497midi_endpoint_dispose = {"midi_endpoint_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_497midi_endpoint_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_496midi_endpoint_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_497midi_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, 3295, __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, 3295, __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, 3295, __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, 3295, __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, 3295, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3295, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_endpoint_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3295, __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_496midi_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_496midi_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;
  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("midi_endpoint_dispose", 0);

  /* "coremusic/capi.pyx":3307
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEndpointDispose failed with status: {status}")
*/
  __pyx_v_status = MIDIEndpointDispose(((MIDIEndpointRef)__pyx_v_endpoint));

  /* "coremusic/capi.pyx":3308
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointDispose failed with status: {status}")
 *     return status
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3309
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEndpointDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return status
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIEndpointDispose_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3309, __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, 3309, __pyx_L1_error)

    /* "coremusic/capi.pyx":3308
 *     """
 *     cdef cf.OSStatus status = cm.MIDIEndpointDispose(<cm.MIDIEndpointRef>endpoint)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointDispose failed with status: {status}")
 *     return status
*/
  }

  /* "coremusic/capi.pyx":3310
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEndpointDispose failed with status: {status}")
 *     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, 3310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3295
 *         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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3314
 * # 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_499midi_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_498midi_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_499midi_object_get_string_property = {"midi_object_get_string_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_499midi_object_get_string_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_498midi_object_get_string_property};
static PyObject *__pyx_pw_9coremusic_4capi_499midi_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, 3314, __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, 3314, __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, 3314, __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, 3314, __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, 3314, __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, 3314, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3314, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3314, __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, 3314, __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, 3314, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_498midi_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_498midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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;
  char const *__pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_string_property", 0);

  /* "coremusic/capi.pyx":3337
 * 
 *     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, 3337, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3337, __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, 3337, __pyx_L1_error)

  /* "coremusic/capi.pyx":3336
 *     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":3339
 *         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":3340
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 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(__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, 3340, __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, 3340, __pyx_L1_error)

    /* "coremusic/capi.pyx":3339
 *         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":3342
 *         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":3343
 * 
 *     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":3345
 *         status = cm.MIDIObjectGetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3346
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Convert CFString to Python string
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3346, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3346, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectGetStringProperty_fail, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3346, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3346, __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, 3346, __pyx_L5_error)

      /* "coremusic/capi.pyx":3345
 *         status = cm.MIDIObjectGetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":3349
 * 
 *         # 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":3350
 *         # 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":3351
 *         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_9 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3351, __pyx_L5_error)
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3351, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "coremusic/capi.pyx":3350
 *         # 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":3354
 *         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":3355
 *             # 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":3356
 *             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":3357
 *             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":3358
 *             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":3359
 *             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_4 = NULL;
        __Pyx_INCREF(__pyx_builtin_MemoryError);
        __pyx_t_7 = __pyx_builtin_MemoryError; 
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_buffer_for_st};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __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_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3359, __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, 3359, __pyx_L5_error)

        /* "coremusic/capi.pyx":3357
 *             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":3360
 *                 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":3361
 *                 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":3362
 *             try:
 *                 if cf.CFStringGetCString(cf_value, buffer, max_size, cf.kCFStringEncodingUTF8):
 *                     result = buffer.decode('utf-8')             # <<<<<<<<<<<<<<
 *                 else:
 *                     cf.CFRelease(cf_value)
*/
          __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3362, __pyx_L11_error)
          __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_9, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_result = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "coremusic/capi.pyx":3361
 *                 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":3364
 *                     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":3365
 *                 else:
 *                     cf.CFRelease(cf_value)
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
          __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_builtin_RuntimeError);
          __pyx_t_4 = __pyx_builtin_RuntimeError; 
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3365, __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, 3365, __pyx_L11_error)
        }
        __pyx_L13:;
      }

      /* "coremusic/capi.pyx":3367
 *                     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_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_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 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;
          {
            free(__pyx_v_buffer);
          }
          __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_L5_error;
        }
        __pyx_L12:;
      }
    }
    __pyx_L8:;

    /* "coremusic/capi.pyx":3369
 *                 free(buffer)
 * 
 *         cf.CFRelease(cf_value)             # <<<<<<<<<<<<<<
 *         return result
 *     finally:
*/
    CFRelease(__pyx_v_cf_value);

    /* "coremusic/capi.pyx":3370
 * 
 *         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":3372
 *         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_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 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_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __pyx_t_11 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16);
      __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
      __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_19;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_13 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_prop_name);
      __pyx_r = __pyx_t_13;
      __pyx_t_13 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3314
 * # 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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3374
 *         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_501midi_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_500midi_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_501midi_object_get_integer_property = {"midi_object_get_integer_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_501midi_object_get_integer_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_500midi_object_get_integer_property};
static PyObject *__pyx_pw_9coremusic_4capi_501midi_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, 3374, __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, 3374, __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, 3374, __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, 3374, __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, 3374, __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, 3374, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3374, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3374, __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, 3374, __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, 3374, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_500midi_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_500midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_integer_property", 0);

  /* "coremusic/capi.pyx":3388
 *         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, 3388, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3390
 *     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, 3390, __pyx_L1_error)

  /* "coremusic/capi.pyx":3389
 *     """
 *     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":3394
 *     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":3395
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 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(__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, 3395, __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, 3395, __pyx_L1_error)

    /* "coremusic/capi.pyx":3394
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  }

  /* "coremusic/capi.pyx":3397
 *         raise ValueError("Could not create CFString from property name")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3398
 * 
 *     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":3400
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectGetIntegerProperty failed with status: {status}")
 *         return value
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3401
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectGetIntegerProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return value
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3401, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3401, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectGetIntegerProperty_fai, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3401, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3401, __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, 3401, __pyx_L5_error)

      /* "coremusic/capi.pyx":3400
 *         status = cm.MIDIObjectGetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, &value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectGetIntegerProperty failed with status: {status}")
 *         return value
*/
    }

    /* "coremusic/capi.pyx":3402
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectGetIntegerProperty failed with status: {status}")
 *         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, 3402, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":3404
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __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_cf_prop_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3374
 *         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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3406
 *         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_503midi_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_502midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting property fails\n    ValueError: If string conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_503midi_object_set_string_property = {"midi_object_set_string_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_503midi_object_set_string_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_502midi_object_set_string_property};
static PyObject *__pyx_pw_9coremusic_4capi_503midi_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, 3406, __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, 3406, __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, 3406, __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, 3406, __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, 3406, __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, 3406, __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, 3406, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3406, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3406, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3406, __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, 3406, __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, 3406, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyUnicode_Type), 1, "value", 1))) __PYX_ERR(0, 3406, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_502midi_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_502midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_set_string_property", 0);

  /* "coremusic/capi.pyx":3421
 *         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, 3421, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3423
 *     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, 3423, __pyx_L1_error)

  /* "coremusic/capi.pyx":3422
 *     """
 *     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":3424
 *     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, 3424, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3426
 *     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, 3426, __pyx_L1_error)

  /* "coremusic/capi.pyx":3425
 *         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":3429
 *     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":3430
 * 
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 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(__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, 3430, __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, 3430, __pyx_L1_error)

    /* "coremusic/capi.pyx":3429
 *     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":3431
 *     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":3432
 *         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":3433
 *     if not cf_value:
 *         cf.CFRelease(cf_prop_name)
 *         raise ValueError("Could not create CFString from value")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_4 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_create_CFString_from_v};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__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, 3433, __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, 3433, __pyx_L1_error)

    /* "coremusic/capi.pyx":3431
 *     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":3435
 *         raise ValueError("Could not create CFString from value")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3436
 * 
 *     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":3438
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectSetStringProperty failed with status: {status}")
 *         return status
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3439
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectSetStringProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return status
 *     finally:
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3439, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3439, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectSetStringProperty_fail, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3439, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3439, __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, 3439, __pyx_L6_error)

      /* "coremusic/capi.pyx":3438
 *         status = cm.MIDIObjectSetStringProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, cf_value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectSetStringProperty failed with status: {status}")
 *         return status
*/
    }

    /* "coremusic/capi.pyx":3440
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectSetStringProperty failed with status: {status}")
 *         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, 3440, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":3442
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_prop_name);

        /* "coremusic/capi.pyx":3443
 *     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_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_17 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":3442
 *         return status
 *     finally:
 *         cf.CFRelease(cf_prop_name)             # <<<<<<<<<<<<<<
 *         cf.CFRelease(cf_value)
 * 
*/
      CFRelease(__pyx_v_cf_prop_name);

      /* "coremusic/capi.pyx":3443
 *     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_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3406
 *         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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3445
 *         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_505midi_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_504midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting property fails\n    ValueError: If property name conversion fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_505midi_object_set_integer_property = {"midi_object_set_integer_property", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_505midi_object_set_integer_property, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_504midi_object_set_integer_property};
static PyObject *__pyx_pw_9coremusic_4capi_505midi_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, 3445, __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, 3445, __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, 3445, __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, 3445, __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, 3445, __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, 3445, __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, 3445, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3445, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3445, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3445, __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, 3445, __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, 3445, __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, 3445, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_504midi_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_504midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_set_integer_property", 0);

  /* "coremusic/capi.pyx":3460
 *         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, 3460, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_property_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_prop_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":3462
 *     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, 3462, __pyx_L1_error)

  /* "coremusic/capi.pyx":3461
 *     """
 *     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":3465
 *     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":3466
 * 
 *     if not cf_prop_name:
 *         raise ValueError("Could not create CFString from property name")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 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(__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, 3466, __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, 3466, __pyx_L1_error)

    /* "coremusic/capi.pyx":3465
 *     cdef cf.OSStatus status
 * 
 *     if not cf_prop_name:             # <<<<<<<<<<<<<<
 *         raise ValueError("Could not create CFString from property name")
 * 
*/
  }

  /* "coremusic/capi.pyx":3468
 *         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":3469
 * 
 *     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":3471
 *         status = cm.MIDIObjectSetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectSetIntegerProperty failed with status: {status}")
 *         return status
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":3472
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectSetIntegerProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return status
 *     finally:
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3472, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3472, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectSetIntegerProperty_fai, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3472, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__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_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3472, __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, 3472, __pyx_L5_error)

      /* "coremusic/capi.pyx":3471
 *         status = cm.MIDIObjectSetIntegerProperty(
 *             <cm.MIDIObjectRef>obj, cf_prop_name, <ca.SInt32>value)
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIObjectSetIntegerProperty failed with status: {status}")
 *         return status
*/
    }

    /* "coremusic/capi.pyx":3473
 *         if status != 0:
 *             raise RuntimeError(f"MIDIObjectSetIntegerProperty failed with status: {status}")
 *         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, 3473, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L4_return;
  }

  /* "coremusic/capi.pyx":3475
 *         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_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_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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;
      {
        CFRelease(__pyx_v_cf_prop_name);
      }
      __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_cf_prop_name);
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3445
 *         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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":3479
 * # 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_507midi_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_506midi_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_507midi_object_get_name = {"midi_object_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_507midi_object_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_506midi_object_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_507midi_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, 3479, __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, 3479, __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, 3479, __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, 3479, __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, 3479, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3479, __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, 3479, __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_506midi_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_506midi_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;
  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;
  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;
  char const *__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_name", 0);

  /* "coremusic/capi.pyx":3498
 *     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":3500
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3501
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectGetStringProperty_fail, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3501, __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, 3501, __pyx_L1_error)

    /* "coremusic/capi.pyx":3500
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyName, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3503
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3505
 *     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":3506
 *         # 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":3507
 *         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_8 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3507, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3507, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":3506
 *         # 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":3510
 *         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":3511
 *             # 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":3512
 *             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":3513
 *             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":3514
 *             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_INCREF(__pyx_builtin_MemoryError);
        __pyx_t_5 = __pyx_builtin_MemoryError; 
        __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3514, __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, 3514, __pyx_L5_error)

        /* "coremusic/capi.pyx":3513
 *             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":3515
 *             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":3516
 *                 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":3517
 *             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_8 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3517, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3517, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":3516
 *                 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":3519
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_builtin_RuntimeError);
          __pyx_t_4 = __pyx_builtin_RuntimeError; 
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3519, __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, 3519, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":3521
 *                     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_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_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_XDECREF(__pyx_t_6); __pyx_t_6 = 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_buffer);
          }
          __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_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":3523
 *                 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":3525
 *         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_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 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_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_17);
      __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_t_10 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_16, __pyx_t_15);
      __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_18;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_12 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_12;
      __pyx_t_12 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3479
 * # 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3527
 *         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_509midi_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_508midi_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_509midi_device_get_name = {"midi_device_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_509midi_device_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_508midi_device_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_509midi_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, 3527, __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, 3527, __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, 3527, __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, 3527, __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, 3527, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3527, __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, 3527, __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_508midi_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_508midi_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":3539
 *         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, 3539, __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, 3539, __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(__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, 3539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3527
 *         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":3541
 *     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_511midi_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_510midi_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_511midi_endpoint_get_name = {"midi_endpoint_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_511midi_endpoint_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_510midi_endpoint_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_511midi_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, 3541, __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, 3541, __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, 3541, __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, 3541, __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, 3541, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3541, __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, 3541, __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_510midi_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_510midi_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":3553
 *         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, 3553, __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, 3553, __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(__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, 3553, __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 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":3555
 *     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_513midi_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_512midi_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_513midi_entity_get_name = {"midi_entity_get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_513midi_entity_get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_512midi_entity_get_name};
static PyObject *__pyx_pw_9coremusic_4capi_513midi_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, 3555, __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, 3555, __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, 3555, __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, 3555, __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, 3555, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3555, __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, 3555, __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_512midi_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_512midi_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":3567
 *         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, 3567, __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, 3567, __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(__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, 3567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3555
 *     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":3569
 *     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_515midi_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_514midi_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_515midi_object_get_manufacturer = {"midi_object_get_manufacturer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_515midi_object_get_manufacturer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_514midi_object_get_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_515midi_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, 3569, __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, 3569, __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, 3569, __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, 3569, __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, 3569, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3569, __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, 3569, __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_514midi_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_514midi_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;
  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;
  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;
  char const *__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_manufacturer", 0);

  /* "coremusic/capi.pyx":3588
 *     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":3590
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3591
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectGetStringProperty_fail, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __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, 3591, __pyx_L1_error)

    /* "coremusic/capi.pyx":3590
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyManufacturer, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3593
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3595
 *     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":3596
 *         # 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":3597
 *         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_8 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3597, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3597, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":3596
 *         # 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":3600
 *         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":3601
 *             # 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":3602
 *             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":3603
 *             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":3604
 *             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_INCREF(__pyx_builtin_MemoryError);
        __pyx_t_5 = __pyx_builtin_MemoryError; 
        __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3604, __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, 3604, __pyx_L5_error)

        /* "coremusic/capi.pyx":3603
 *             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":3605
 *             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":3606
 *                 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":3607
 *             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_8 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3607, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3607, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":3606
 *                 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":3609
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_builtin_RuntimeError);
          __pyx_t_4 = __pyx_builtin_RuntimeError; 
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3609, __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, 3609, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":3611
 *                     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_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_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_XDECREF(__pyx_t_6); __pyx_t_6 = 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_buffer);
          }
          __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_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":3613
 *                 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":3615
 *         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_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 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_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_17);
      __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_t_10 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_16, __pyx_t_15);
      __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_18;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_12 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_12;
      __pyx_t_12 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3569
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3617
 *         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_517midi_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_516midi_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_517midi_object_get_model = {"midi_object_get_model", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_517midi_object_get_model, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_516midi_object_get_model};
static PyObject *__pyx_pw_9coremusic_4capi_517midi_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, 3617, __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, 3617, __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, 3617, __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, 3617, __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, 3617, __pyx_L3_error)
    }
    __pyx_v_obj = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_obj == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3617, __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, 3617, __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_516midi_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_516midi_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;
  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;
  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;
  char const *__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_object_get_model", 0);

  /* "coremusic/capi.pyx":3636
 *     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":3638
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":3639
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIObjectGetStringProperty_fail, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3639, __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, 3639, __pyx_L1_error)

    /* "coremusic/capi.pyx":3638
 *     status = cm.MIDIObjectGetStringProperty(
 *         <cm.MIDIObjectRef>obj, cm.kMIDIPropertyModel, &cf_value)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":3641
 *         raise RuntimeError(f"MIDIObjectGetStringProperty failed with status: {status}")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Convert CFString to Python string
 *         c_str = <char*>cf.CFStringGetCStringPtr(cf_value, cf.kCFStringEncodingUTF8)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3643
 *     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":3644
 *         # 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":3645
 *         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_8 = __Pyx_ssize_strlen(__pyx_v_c_str); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3645, __pyx_L5_error)
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_c_str, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3645, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":3644
 *         # 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":3648
 *         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":3649
 *             # 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":3650
 *             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":3651
 *             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":3652
 *             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_INCREF(__pyx_builtin_MemoryError);
        __pyx_t_5 = __pyx_builtin_MemoryError; 
        __pyx_t_7 = 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(__pyx_t_5, __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_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3652, __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, 3652, __pyx_L5_error)

        /* "coremusic/capi.pyx":3651
 *             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":3653
 *             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":3654
 *                 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":3655
 *             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_8 = __Pyx_ssize_strlen(__pyx_v_buffer); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3655, __pyx_L10_error)
          __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_buffer, 0, __pyx_t_8, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3655, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_result = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "coremusic/capi.pyx":3654
 *                 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":3657
 *                     result = buffer.decode('utf-8')
 *                 else:
 *                     raise RuntimeError("Could not convert CFString to C string")             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(buffer)
*/
        /*else*/ {
          __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_builtin_RuntimeError);
          __pyx_t_4 = __pyx_builtin_RuntimeError; 
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_convert_CFString_to_C};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __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, 3657, __pyx_L10_error)
        }
        __pyx_L12:;
      }

      /* "coremusic/capi.pyx":3659
 *                     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_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_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_XDECREF(__pyx_t_6); __pyx_t_6 = 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_buffer);
          }
          __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_L5_error;
        }
        __pyx_L11:;
      }
    }
    __pyx_L7:;

    /* "coremusic/capi.pyx":3661
 *                 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":3663
 *         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_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 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_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_17);
      __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_t_10 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
      {
        CFRelease(__pyx_v_cf_value);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_16, __pyx_t_15);
      __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_18;
      goto __pyx_L1_error;
    }
    __pyx_L4_return: {
      __pyx_t_12 = __pyx_r;
      __pyx_r = 0;
      CFRelease(__pyx_v_cf_value);
      __pyx_r = __pyx_t_12;
      __pyx_t_12 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3617
 *         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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":3667
 * # 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_519midi_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_518midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If sending fails\n    ValueError: If data is too large");
static PyMethodDef __pyx_mdef_9coremusic_4capi_519midi_send_data = {"midi_send_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_519midi_send_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_518midi_send_data};
static PyObject *__pyx_pw_9coremusic_4capi_519midi_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, 3667, __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, 3667, __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, 3667, __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, 3667, __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, 3667, __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, 3667, __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, 3667, __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, 3667, __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, 3667, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3667, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3667, __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, 3667, __pyx_L3_error)
    __pyx_v_destination = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_destination == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3667, __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, 3667, __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, 3667, __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, 3667, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_518midi_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_518midi_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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  char *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  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("midi_send_data", 0);

  /* "coremusic/capi.pyx":3688
 *     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, 3688, __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, 3688, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 > 0x100);
  if (unlikely(__pyx_t_2)) {

    /* "coremusic/capi.pyx":3689
 * 
 *     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_INCREF(__pyx_builtin_ValueError);
    __pyx_t_5 = __pyx_builtin_ValueError; 
    __pyx_t_6 = 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(__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_3)) __PYX_ERR(0, 3689, __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, 3689, __pyx_L1_error)

    /* "coremusic/capi.pyx":3688
 *     cdef cf.OSStatus status
 * 
 *     if len(data) > 256:             # <<<<<<<<<<<<<<
 *         raise ValueError("MIDI data too large (max 256 bytes)")
 * 
*/
  }

  /* "coremusic/capi.pyx":3692
 * 
 *     # 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, 3692, __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, 3692, __pyx_L1_error)
  __pyx_v_pktlist_size = ((sizeof(MIDIPacketList)) + __pyx_t_1);

  /* "coremusic/capi.pyx":3693
 *     # 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":3694
 *     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":3695
 *     pktlist = <cm.MIDIPacketList*>malloc(pktlist_size)
 *     if not pktlist:
 *         raise MemoryError("Could not allocate packet list")             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_MemoryError);
    __pyx_t_4 = __pyx_builtin_MemoryError; 
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Could_not_allocate_packet_list};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__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_3)) __PYX_ERR(0, 3695, __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, 3695, __pyx_L1_error)

    /* "coremusic/capi.pyx":3694
 *     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":3697
 *         raise MemoryError("Could not allocate packet list")
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Initialize packet list
 *         packet = cm.MIDIPacketListInit(pktlist)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":3699
 *     try:
 *         # Initialize packet list
 *         packet = cm.MIDIPacketListInit(pktlist)             # <<<<<<<<<<<<<<
 * 
 *         # Add our data to the packet
*/
    __pyx_v_packet = MIDIPacketListInit(__pyx_v_pktlist);

    /* "coremusic/capi.pyx":3705
 *             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, 3705, __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, 3705, __pyx_L6_error)

    /* "coremusic/capi.pyx":3706
 *             <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, 3706, __pyx_L6_error)
    }
    __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 3706, __pyx_L6_error)

    /* "coremusic/capi.pyx":3702
 * 
 *         # 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_7)));

    /* "coremusic/capi.pyx":3708
 *             <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":3709
 * 
 *         if not packet:
 *             raise RuntimeError("Could not add packet to packet list")             # <<<<<<<<<<<<<<
 * 
 *         # Send the packet list
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = 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(__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_3)) __PYX_ERR(0, 3709, __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, 3709, __pyx_L6_error)

      /* "coremusic/capi.pyx":3708
 *             <const cf.UInt8*><char*>data)
 * 
 *         if not packet:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Could not add packet to packet list")
 * 
*/
    }

    /* "coremusic/capi.pyx":3712
 * 
 *         # 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":3717
 *             pktlist)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDISend failed with status: {status}")
 *         return status
*/
    __pyx_t_2 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_2)) {

      /* "coremusic/capi.pyx":3718
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDISend failed with status: {status}")             # <<<<<<<<<<<<<<
 *         return status
 * 
*/
      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_8 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3718, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3718, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISend_failed_with_status, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3718, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__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_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3718, __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, 3718, __pyx_L6_error)

      /* "coremusic/capi.pyx":3717
 *             pktlist)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDISend failed with status: {status}")
 *         return status
*/
    }

    /* "coremusic/capi.pyx":3719
 *         if status != 0:
 *             raise RuntimeError(f"MIDISend failed with status: {status}")
 *         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, 3719, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5_return;
  }

  /* "coremusic/capi.pyx":3722
 * 
 *     finally:
 *         free(pktlist)             # <<<<<<<<<<<<<<
 * 
 * # Constants and helpers
*/
  /*finally:*/ {
    __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_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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;
      {
        free(__pyx_v_pktlist);
      }
      __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_L5_return: {
      __pyx_t_18 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_pktlist);
      __pyx_r = __pyx_t_18;
      __pyx_t_18 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":3667
 * # 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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":3726
 * # 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_521get_midi_error_invalid_client(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_520get_midi_error_invalid_client, "get_midi_error_invalid_client()\n\nGet the kMIDIInvalidClient error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_521get_midi_error_invalid_client = {"get_midi_error_invalid_client", (PyCFunction)__pyx_pw_9coremusic_4capi_521get_midi_error_invalid_client, METH_NOARGS, __pyx_doc_9coremusic_4capi_520get_midi_error_invalid_client};
static PyObject *__pyx_pw_9coremusic_4capi_521get_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_520get_midi_error_invalid_client(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_520get_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":3728
 * 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, 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
 * # 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":3730
 *     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_523get_midi_error_invalid_port(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_522get_midi_error_invalid_port, "get_midi_error_invalid_port()\n\nGet the kMIDIInvalidPort error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_523get_midi_error_invalid_port = {"get_midi_error_invalid_port", (PyCFunction)__pyx_pw_9coremusic_4capi_523get_midi_error_invalid_port, METH_NOARGS, __pyx_doc_9coremusic_4capi_522get_midi_error_invalid_port};
static PyObject *__pyx_pw_9coremusic_4capi_523get_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_522get_midi_error_invalid_port(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_522get_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":3732
 * 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, 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 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":3734
 *     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_525get_midi_error_wrong_endpoint_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_524get_midi_error_wrong_endpoint_type, "get_midi_error_wrong_endpoint_type()\n\nGet the kMIDIWrongEndpointType error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_525get_midi_error_wrong_endpoint_type = {"get_midi_error_wrong_endpoint_type", (PyCFunction)__pyx_pw_9coremusic_4capi_525get_midi_error_wrong_endpoint_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_524get_midi_error_wrong_endpoint_type};
static PyObject *__pyx_pw_9coremusic_4capi_525get_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_524get_midi_error_wrong_endpoint_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_524get_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":3736
 * 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, 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 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":3738
 *     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_527get_midi_error_no_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_526get_midi_error_no_connection, "get_midi_error_no_connection()\n\nGet the kMIDINoConnection error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_527get_midi_error_no_connection = {"get_midi_error_no_connection", (PyCFunction)__pyx_pw_9coremusic_4capi_527get_midi_error_no_connection, METH_NOARGS, __pyx_doc_9coremusic_4capi_526get_midi_error_no_connection};
static PyObject *__pyx_pw_9coremusic_4capi_527get_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_526get_midi_error_no_connection(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_526get_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":3740
 * 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, 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 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":3742
 *     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_529get_midi_error_unknown_endpoint(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_528get_midi_error_unknown_endpoint, "get_midi_error_unknown_endpoint()\n\nGet the kMIDIUnknownEndpoint error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_529get_midi_error_unknown_endpoint = {"get_midi_error_unknown_endpoint", (PyCFunction)__pyx_pw_9coremusic_4capi_529get_midi_error_unknown_endpoint, METH_NOARGS, __pyx_doc_9coremusic_4capi_528get_midi_error_unknown_endpoint};
static PyObject *__pyx_pw_9coremusic_4capi_529get_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_528get_midi_error_unknown_endpoint(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_528get_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":3744
 * 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, 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 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":3746
 *     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_531get_midi_error_unknown_property(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_530get_midi_error_unknown_property, "get_midi_error_unknown_property()\n\nGet the kMIDIUnknownProperty error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_531get_midi_error_unknown_property = {"get_midi_error_unknown_property", (PyCFunction)__pyx_pw_9coremusic_4capi_531get_midi_error_unknown_property, METH_NOARGS, __pyx_doc_9coremusic_4capi_530get_midi_error_unknown_property};
static PyObject *__pyx_pw_9coremusic_4capi_531get_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_530get_midi_error_unknown_property(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_530get_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":3748
 * 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, 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 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":3750
 *     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_533get_midi_error_wrong_property_type(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_532get_midi_error_wrong_property_type, "get_midi_error_wrong_property_type()\n\nGet the kMIDIWrongPropertyType error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_533get_midi_error_wrong_property_type = {"get_midi_error_wrong_property_type", (PyCFunction)__pyx_pw_9coremusic_4capi_533get_midi_error_wrong_property_type, METH_NOARGS, __pyx_doc_9coremusic_4capi_532get_midi_error_wrong_property_type};
static PyObject *__pyx_pw_9coremusic_4capi_533get_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_532get_midi_error_wrong_property_type(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_532get_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":3752
 * 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, 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 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":3754
 *     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_535get_midi_error_no_current_setup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_534get_midi_error_no_current_setup, "get_midi_error_no_current_setup()\n\nGet the kMIDINoCurrentSetup error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_535get_midi_error_no_current_setup = {"get_midi_error_no_current_setup", (PyCFunction)__pyx_pw_9coremusic_4capi_535get_midi_error_no_current_setup, METH_NOARGS, __pyx_doc_9coremusic_4capi_534get_midi_error_no_current_setup};
static PyObject *__pyx_pw_9coremusic_4capi_535get_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_534get_midi_error_no_current_setup(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_534get_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":3756
 * 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, 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 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":3758
 *     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_537get_midi_error_message_send_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_536get_midi_error_message_send_err, "get_midi_error_message_send_err()\n\nGet the kMIDIMessageSendErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_537get_midi_error_message_send_err = {"get_midi_error_message_send_err", (PyCFunction)__pyx_pw_9coremusic_4capi_537get_midi_error_message_send_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_536get_midi_error_message_send_err};
static PyObject *__pyx_pw_9coremusic_4capi_537get_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_536get_midi_error_message_send_err(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_536get_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":3760
 * 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, 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 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":3762
 *     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_539get_midi_error_server_start_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_538get_midi_error_server_start_err, "get_midi_error_server_start_err()\n\nGet the kMIDIServerStartErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_539get_midi_error_server_start_err = {"get_midi_error_server_start_err", (PyCFunction)__pyx_pw_9coremusic_4capi_539get_midi_error_server_start_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_538get_midi_error_server_start_err};
static PyObject *__pyx_pw_9coremusic_4capi_539get_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_538get_midi_error_server_start_err(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_538get_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":3764
 * 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, 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 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":3766
 *     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_541get_midi_error_setup_format_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_540get_midi_error_setup_format_err, "get_midi_error_setup_format_err()\n\nGet the kMIDISetupFormatErr error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_541get_midi_error_setup_format_err = {"get_midi_error_setup_format_err", (PyCFunction)__pyx_pw_9coremusic_4capi_541get_midi_error_setup_format_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_540get_midi_error_setup_format_err};
static PyObject *__pyx_pw_9coremusic_4capi_541get_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_540get_midi_error_setup_format_err(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_540get_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":3768
 * 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, 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 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":3770
 *     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_543get_midi_error_wrong_thread(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_542get_midi_error_wrong_thread, "get_midi_error_wrong_thread()\n\nGet the kMIDIWrongThread error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_543get_midi_error_wrong_thread = {"get_midi_error_wrong_thread", (PyCFunction)__pyx_pw_9coremusic_4capi_543get_midi_error_wrong_thread, METH_NOARGS, __pyx_doc_9coremusic_4capi_542get_midi_error_wrong_thread};
static PyObject *__pyx_pw_9coremusic_4capi_543get_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_542get_midi_error_wrong_thread(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_542get_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":3772
 * 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, 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 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":3774
 *     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_545get_midi_error_object_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_544get_midi_error_object_not_found, "get_midi_error_object_not_found()\n\nGet the kMIDIObjectNotFound error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_545get_midi_error_object_not_found = {"get_midi_error_object_not_found", (PyCFunction)__pyx_pw_9coremusic_4capi_545get_midi_error_object_not_found, METH_NOARGS, __pyx_doc_9coremusic_4capi_544get_midi_error_object_not_found};
static PyObject *__pyx_pw_9coremusic_4capi_545get_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_544get_midi_error_object_not_found(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_544get_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":3776
 * 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, 3776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3774
 *     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":3778
 *     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_547get_midi_error_id_not_unique(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_546get_midi_error_id_not_unique, "get_midi_error_id_not_unique()\n\nGet the kMIDIIDNotUnique error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_547get_midi_error_id_not_unique = {"get_midi_error_id_not_unique", (PyCFunction)__pyx_pw_9coremusic_4capi_547get_midi_error_id_not_unique, METH_NOARGS, __pyx_doc_9coremusic_4capi_546get_midi_error_id_not_unique};
static PyObject *__pyx_pw_9coremusic_4capi_547get_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_546get_midi_error_id_not_unique(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_546get_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":3780
 * 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, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3778
 *     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":3782
 *     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_549get_midi_error_not_permitted(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_548get_midi_error_not_permitted, "get_midi_error_not_permitted()\n\nGet the kMIDINotPermitted error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_549get_midi_error_not_permitted = {"get_midi_error_not_permitted", (PyCFunction)__pyx_pw_9coremusic_4capi_549get_midi_error_not_permitted, METH_NOARGS, __pyx_doc_9coremusic_4capi_548get_midi_error_not_permitted};
static PyObject *__pyx_pw_9coremusic_4capi_549get_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_548get_midi_error_not_permitted(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_548get_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":3784
 * 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, 3784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3782
 *     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":3786
 *     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_551get_midi_error_unknown_error(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_550get_midi_error_unknown_error, "get_midi_error_unknown_error()\n\nGet the kMIDIUnknownError error constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_551get_midi_error_unknown_error = {"get_midi_error_unknown_error", (PyCFunction)__pyx_pw_9coremusic_4capi_551get_midi_error_unknown_error, METH_NOARGS, __pyx_doc_9coremusic_4capi_550get_midi_error_unknown_error};
static PyObject *__pyx_pw_9coremusic_4capi_551get_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_550get_midi_error_unknown_error(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_550get_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":3788
 * 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, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3786
 *     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":3790
 *     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_553get_midi_object_type_other(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_552get_midi_object_type_other, "get_midi_object_type_other()\n\nGet the kMIDIObjectType_Other constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_553get_midi_object_type_other = {"get_midi_object_type_other", (PyCFunction)__pyx_pw_9coremusic_4capi_553get_midi_object_type_other, METH_NOARGS, __pyx_doc_9coremusic_4capi_552get_midi_object_type_other};
static PyObject *__pyx_pw_9coremusic_4capi_553get_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_552get_midi_object_type_other(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_552get_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":3792
 * 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, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3790
 *     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":3794
 *     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_555get_midi_object_type_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_554get_midi_object_type_device, "get_midi_object_type_device()\n\nGet the kMIDIObjectType_Device constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_555get_midi_object_type_device = {"get_midi_object_type_device", (PyCFunction)__pyx_pw_9coremusic_4capi_555get_midi_object_type_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_554get_midi_object_type_device};
static PyObject *__pyx_pw_9coremusic_4capi_555get_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_554get_midi_object_type_device(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_554get_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":3796
 * 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, 3796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3794
 *     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":3798
 *     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_557get_midi_object_type_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_556get_midi_object_type_entity, "get_midi_object_type_entity()\n\nGet the kMIDIObjectType_Entity constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_557get_midi_object_type_entity = {"get_midi_object_type_entity", (PyCFunction)__pyx_pw_9coremusic_4capi_557get_midi_object_type_entity, METH_NOARGS, __pyx_doc_9coremusic_4capi_556get_midi_object_type_entity};
static PyObject *__pyx_pw_9coremusic_4capi_557get_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_556get_midi_object_type_entity(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_556get_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":3800
 * 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, 3800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3798
 *     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":3802
 *     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_559get_midi_object_type_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_558get_midi_object_type_source, "get_midi_object_type_source()\n\nGet the kMIDIObjectType_Source constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_559get_midi_object_type_source = {"get_midi_object_type_source", (PyCFunction)__pyx_pw_9coremusic_4capi_559get_midi_object_type_source, METH_NOARGS, __pyx_doc_9coremusic_4capi_558get_midi_object_type_source};
static PyObject *__pyx_pw_9coremusic_4capi_559get_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_558get_midi_object_type_source(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_558get_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":3804
 * 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, 3804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3802
 *     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":3806
 *     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_561get_midi_object_type_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_560get_midi_object_type_destination, "get_midi_object_type_destination()\n\nGet the kMIDIObjectType_Destination constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_561get_midi_object_type_destination = {"get_midi_object_type_destination", (PyCFunction)__pyx_pw_9coremusic_4capi_561get_midi_object_type_destination, METH_NOARGS, __pyx_doc_9coremusic_4capi_560get_midi_object_type_destination};
static PyObject *__pyx_pw_9coremusic_4capi_561get_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_560get_midi_object_type_destination(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_560get_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":3808
 * 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, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3806
 *     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":3810
 *     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_563get_midi_object_type_external_device(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_562get_midi_object_type_external_device, "get_midi_object_type_external_device()\n\nGet the kMIDIObjectType_ExternalDevice constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_563get_midi_object_type_external_device = {"get_midi_object_type_external_device", (PyCFunction)__pyx_pw_9coremusic_4capi_563get_midi_object_type_external_device, METH_NOARGS, __pyx_doc_9coremusic_4capi_562get_midi_object_type_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_563get_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_562get_midi_object_type_external_device(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_562get_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":3812
 * 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, 3812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3810
 *     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":3814
 *     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_565get_midi_object_type_external_entity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_564get_midi_object_type_external_entity, "get_midi_object_type_external_entity()\n\nGet the kMIDIObjectType_ExternalEntity constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_565get_midi_object_type_external_entity = {"get_midi_object_type_external_entity", (PyCFunction)__pyx_pw_9coremusic_4capi_565get_midi_object_type_external_entity, METH_NOARGS, __pyx_doc_9coremusic_4capi_564get_midi_object_type_external_entity};
static PyObject *__pyx_pw_9coremusic_4capi_565get_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_564get_midi_object_type_external_entity(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_564get_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":3816
 * 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, 3816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3814
 *     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":3818
 *     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_567get_midi_object_type_external_source(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_566get_midi_object_type_external_source, "get_midi_object_type_external_source()\n\nGet the kMIDIObjectType_ExternalSource constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_567get_midi_object_type_external_source = {"get_midi_object_type_external_source", (PyCFunction)__pyx_pw_9coremusic_4capi_567get_midi_object_type_external_source, METH_NOARGS, __pyx_doc_9coremusic_4capi_566get_midi_object_type_external_source};
static PyObject *__pyx_pw_9coremusic_4capi_567get_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_566get_midi_object_type_external_source(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_566get_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":3820
 * 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, 3820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3818
 *     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":3822
 *     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_569get_midi_object_type_external_destination(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_568get_midi_object_type_external_destination, "get_midi_object_type_external_destination()\n\nGet the kMIDIObjectType_ExternalDestination constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_569get_midi_object_type_external_destination = {"get_midi_object_type_external_destination", (PyCFunction)__pyx_pw_9coremusic_4capi_569get_midi_object_type_external_destination, METH_NOARGS, __pyx_doc_9coremusic_4capi_568get_midi_object_type_external_destination};
static PyObject *__pyx_pw_9coremusic_4capi_569get_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_568get_midi_object_type_external_destination(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_568get_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":3824
 * 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, 3824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3822
 *     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":3826
 *     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_571get_midi_protocol_1_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_570get_midi_protocol_1_0, "get_midi_protocol_1_0()\n\nGet the kMIDIProtocol_1_0 constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_571get_midi_protocol_1_0 = {"get_midi_protocol_1_0", (PyCFunction)__pyx_pw_9coremusic_4capi_571get_midi_protocol_1_0, METH_NOARGS, __pyx_doc_9coremusic_4capi_570get_midi_protocol_1_0};
static PyObject *__pyx_pw_9coremusic_4capi_571get_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_570get_midi_protocol_1_0(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_570get_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":3828
 * 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, 3828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3826
 *     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":3830
 *     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_573get_midi_protocol_2_0(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_572get_midi_protocol_2_0, "get_midi_protocol_2_0()\n\nGet the kMIDIProtocol_2_0 constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_573get_midi_protocol_2_0 = {"get_midi_protocol_2_0", (PyCFunction)__pyx_pw_9coremusic_4capi_573get_midi_protocol_2_0, METH_NOARGS, __pyx_doc_9coremusic_4capi_572get_midi_protocol_2_0};
static PyObject *__pyx_pw_9coremusic_4capi_573get_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_572get_midi_protocol_2_0(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_572get_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":3832
 * 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, 3832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3830
 *     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":3836
 * # Common property name helpers
 * 
 * def get_midi_property_name():             # <<<<<<<<<<<<<<
 *     """Get the 'name' property key."""
 *     return "name"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_575get_midi_property_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_574get_midi_property_name, "get_midi_property_name()\n\nGet the 'name' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_575get_midi_property_name = {"get_midi_property_name", (PyCFunction)__pyx_pw_9coremusic_4capi_575get_midi_property_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_574get_midi_property_name};
static PyObject *__pyx_pw_9coremusic_4capi_575get_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_574get_midi_property_name(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_574get_midi_property_name(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_name", 0);

  /* "coremusic/capi.pyx":3838
 * 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":3836
 * # 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":3840
 *     return "name"
 * 
 * def get_midi_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_577get_midi_property_manufacturer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_576get_midi_property_manufacturer, "get_midi_property_manufacturer()\n\nGet the 'manufacturer' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_577get_midi_property_manufacturer = {"get_midi_property_manufacturer", (PyCFunction)__pyx_pw_9coremusic_4capi_577get_midi_property_manufacturer, METH_NOARGS, __pyx_doc_9coremusic_4capi_576get_midi_property_manufacturer};
static PyObject *__pyx_pw_9coremusic_4capi_577get_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_576get_midi_property_manufacturer(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_576get_midi_property_manufacturer(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_manufacturer", 0);

  /* "coremusic/capi.pyx":3842
 * 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":3840
 *     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":3844
 *     return "manufacturer"
 * 
 * def get_midi_property_model():             # <<<<<<<<<<<<<<
 *     """Get the 'model' property key."""
 *     return "model"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_579get_midi_property_model(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_578get_midi_property_model, "get_midi_property_model()\n\nGet the 'model' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_579get_midi_property_model = {"get_midi_property_model", (PyCFunction)__pyx_pw_9coremusic_4capi_579get_midi_property_model, METH_NOARGS, __pyx_doc_9coremusic_4capi_578get_midi_property_model};
static PyObject *__pyx_pw_9coremusic_4capi_579get_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_578get_midi_property_model(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_578get_midi_property_model(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_model", 0);

  /* "coremusic/capi.pyx":3846
 * 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":3844
 *     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":3848
 *     return "model"
 * 
 * def get_midi_property_unique_id():             # <<<<<<<<<<<<<<
 *     """Get the 'uniqueID' property key."""
 *     return "uniqueID"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_581get_midi_property_unique_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_580get_midi_property_unique_id, "get_midi_property_unique_id()\n\nGet the 'uniqueID' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_581get_midi_property_unique_id = {"get_midi_property_unique_id", (PyCFunction)__pyx_pw_9coremusic_4capi_581get_midi_property_unique_id, METH_NOARGS, __pyx_doc_9coremusic_4capi_580get_midi_property_unique_id};
static PyObject *__pyx_pw_9coremusic_4capi_581get_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_580get_midi_property_unique_id(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_580get_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":3850
 * 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":3848
 *     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":3852
 *     return "uniqueID"
 * 
 * def get_midi_property_device_id():             # <<<<<<<<<<<<<<
 *     """Get the 'deviceID' property key."""
 *     return "deviceID"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_583get_midi_property_device_id(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_582get_midi_property_device_id, "get_midi_property_device_id()\n\nGet the 'deviceID' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_583get_midi_property_device_id = {"get_midi_property_device_id", (PyCFunction)__pyx_pw_9coremusic_4capi_583get_midi_property_device_id, METH_NOARGS, __pyx_doc_9coremusic_4capi_582get_midi_property_device_id};
static PyObject *__pyx_pw_9coremusic_4capi_583get_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_582get_midi_property_device_id(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_582get_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":3854
 * 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":3852
 *     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":3856
 *     return "deviceID"
 * 
 * def get_midi_property_receive_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'receiveChannels' property key."""
 *     return "receiveChannels"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_585get_midi_property_receive_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_584get_midi_property_receive_channels, "get_midi_property_receive_channels()\n\nGet the 'receiveChannels' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_585get_midi_property_receive_channels = {"get_midi_property_receive_channels", (PyCFunction)__pyx_pw_9coremusic_4capi_585get_midi_property_receive_channels, METH_NOARGS, __pyx_doc_9coremusic_4capi_584get_midi_property_receive_channels};
static PyObject *__pyx_pw_9coremusic_4capi_585get_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_584get_midi_property_receive_channels(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_584get_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":3858
 * 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":3856
 *     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":3860
 *     return "receiveChannels"
 * 
 * def get_midi_property_transmit_channels():             # <<<<<<<<<<<<<<
 *     """Get the 'transmitChannels' property key."""
 *     return "transmitChannels"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_587get_midi_property_transmit_channels(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_586get_midi_property_transmit_channels, "get_midi_property_transmit_channels()\n\nGet the 'transmitChannels' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_587get_midi_property_transmit_channels = {"get_midi_property_transmit_channels", (PyCFunction)__pyx_pw_9coremusic_4capi_587get_midi_property_transmit_channels, METH_NOARGS, __pyx_doc_9coremusic_4capi_586get_midi_property_transmit_channels};
static PyObject *__pyx_pw_9coremusic_4capi_587get_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_586get_midi_property_transmit_channels(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_586get_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":3862
 * 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":3860
 *     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":3864
 *     return "transmitChannels"
 * 
 * def get_midi_property_offline():             # <<<<<<<<<<<<<<
 *     """Get the 'offline' property key."""
 *     return "offline"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_589get_midi_property_offline(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_588get_midi_property_offline, "get_midi_property_offline()\n\nGet the 'offline' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_589get_midi_property_offline = {"get_midi_property_offline", (PyCFunction)__pyx_pw_9coremusic_4capi_589get_midi_property_offline, METH_NOARGS, __pyx_doc_9coremusic_4capi_588get_midi_property_offline};
static PyObject *__pyx_pw_9coremusic_4capi_589get_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_588get_midi_property_offline(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_588get_midi_property_offline(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_offline", 0);

  /* "coremusic/capi.pyx":3866
 * 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":3864
 *     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":3868
 *     return "offline"
 * 
 * def get_midi_property_private():             # <<<<<<<<<<<<<<
 *     """Get the 'private' property key."""
 *     return "private"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_591get_midi_property_private(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_590get_midi_property_private, "get_midi_property_private()\n\nGet the 'private' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_591get_midi_property_private = {"get_midi_property_private", (PyCFunction)__pyx_pw_9coremusic_4capi_591get_midi_property_private, METH_NOARGS, __pyx_doc_9coremusic_4capi_590get_midi_property_private};
static PyObject *__pyx_pw_9coremusic_4capi_591get_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_590get_midi_property_private(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_590get_midi_property_private(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_midi_property_private", 0);

  /* "coremusic/capi.pyx":3870
 * 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":3868
 *     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":3872
 *     return "private"
 * 
 * def get_midi_property_driver_owner():             # <<<<<<<<<<<<<<
 *     """Get the 'driverOwner' property key."""
 *     return "driverOwner"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_593get_midi_property_driver_owner(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_592get_midi_property_driver_owner, "get_midi_property_driver_owner()\n\nGet the 'driverOwner' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_593get_midi_property_driver_owner = {"get_midi_property_driver_owner", (PyCFunction)__pyx_pw_9coremusic_4capi_593get_midi_property_driver_owner, METH_NOARGS, __pyx_doc_9coremusic_4capi_592get_midi_property_driver_owner};
static PyObject *__pyx_pw_9coremusic_4capi_593get_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_592get_midi_property_driver_owner(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_592get_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":3874
 * 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":3872
 *     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":3876
 *     return "driverOwner"
 * 
 * def get_midi_property_display_name():             # <<<<<<<<<<<<<<
 *     """Get the 'displayName' property key."""
 *     return "displayName"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_595get_midi_property_display_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_594get_midi_property_display_name, "get_midi_property_display_name()\n\nGet the 'displayName' property key.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_595get_midi_property_display_name = {"get_midi_property_display_name", (PyCFunction)__pyx_pw_9coremusic_4capi_595get_midi_property_display_name, METH_NOARGS, __pyx_doc_9coremusic_4capi_594get_midi_property_display_name};
static PyObject *__pyx_pw_9coremusic_4capi_595get_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_594get_midi_property_display_name(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_594get_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":3878
 * 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":3876
 *     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":3883
 * # 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_597midi_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_596midi_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_597midi_message_type_for_up_word = {"midi_message_type_for_up_word", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_597midi_message_type_for_up_word, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_596midi_message_type_for_up_word};
static PyObject *__pyx_pw_9coremusic_4capi_597midi_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, 3883, __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, 3883, __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, 3883, __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, 3883, __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, 3883, __pyx_L3_error)
    }
    __pyx_v_word = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_word == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3883, __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, 3883, __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_596midi_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_596midi_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":3892
 *         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, 3892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3883
 * # 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":3896
 * # 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_599midi1_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_598midi1_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_599midi1_up_channel_voice_message = {"midi1_up_channel_voice_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_599midi1_up_channel_voice_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_598midi1_up_channel_voice_message};
static PyObject *__pyx_pw_9coremusic_4capi_599midi1_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, 3896, __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, 3896, __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, 3896, __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, 3896, __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, 3896, __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, 3896, __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, 3896, __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, 3896, __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, 3896, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3896, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3896, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3896, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3896, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3896, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3896, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3896, __pyx_L3_error)
    __pyx_v_data1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3896, __pyx_L3_error)
    __pyx_v_data2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_data2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3896, __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, 3896, __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_598midi1_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_598midi1_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":3909
 *         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":3910
 *     """
 *     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, 3909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3896
 * # 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":3912
 *                                            <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_601midi1_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_600midi1_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_601midi1_up_note_off = {"midi1_up_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_601midi1_up_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_600midi1_up_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_601midi1_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, 3912, __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, 3912, __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, 3912, __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, 3912, __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, 3912, __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, 3912, __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, 3912, __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, 3912, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3912, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3912, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3912, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3912, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3912, __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, 3912, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3912, __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, 3912, __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_600midi1_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_600midi1_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":3924
 *         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":3925
 *     """
 *     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, 3924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3912
 *                                            <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":3927
 *                                <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_603midi1_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_602midi1_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_603midi1_up_note_on = {"midi1_up_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_603midi1_up_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_602midi1_up_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_603midi1_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, 3927, __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, 3927, __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, 3927, __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, 3927, __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, 3927, __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, 3927, __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, 3927, __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, 3927, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3927, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3927, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3927, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3927, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3927, __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, 3927, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3927, __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, 3927, __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_602midi1_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_602midi1_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":3939
 *         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":3940
 *     """
 *     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, 3939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3927
 *                                <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":3942
 *                               <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_605midi1_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_604midi1_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_605midi1_up_control_change = {"midi1_up_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_605midi1_up_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_604midi1_up_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_605midi1_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, 3942, __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, 3942, __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, 3942, __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, 3942, __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, 3942, __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, 3942, __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, 3942, __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, 3942, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3942, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3942, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3942, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L3_error)
    __pyx_v_data = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_data == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3942, __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, 3942, __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_604midi1_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_604midi1_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":3954
 *         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":3955
 *     """
 *     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, 3954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3942
 *                               <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":3957
 *                                      <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_607midi1_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_606midi1_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_607midi1_up_pitch_bend = {"midi1_up_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_607midi1_up_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_606midi1_up_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_607midi1_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, 3957, __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, 3957, __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, 3957, __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, 3957, __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, 3957, __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, 3957, __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, 3957, __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, 3957, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3957, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3957, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3957, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_lsb = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_lsb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_msb = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_msb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __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, 3957, __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_606midi1_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_606midi1_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":3969
 *         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":3970
 *     """
 *     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, 3969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3957
 *                                      <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":3972
 *                                  <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_609midi1_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_608midi1_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_609midi1_up_system_common = {"midi1_up_system_common", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_609midi1_up_system_common, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_608midi1_up_system_common};
static PyObject *__pyx_pw_9coremusic_4capi_609midi1_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, 3972, __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, 3972, __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, 3972, __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, 3972, __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, 3972, __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, 3972, __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, 3972, __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, 3972, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3972, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3972, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3972, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L3_error)
    __pyx_v_byte1 = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_byte1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L3_error)
    __pyx_v_byte2 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_byte2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __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, 3972, __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_608midi1_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_608midi1_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":3984
 *         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":3985
 *     """
 *     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, 3984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":3972
 *                                  <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":3987
 *                                     <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_611midi1_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_610midi1_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_611midi1_up_sysex = {"midi1_up_sysex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_611midi1_up_sysex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_610midi1_up_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_611midi1_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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __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, 3987, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3987, __pyx_L3_error)
      values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3987, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __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, 3987, __pyx_L3_error)
    __pyx_v_byte1 = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_byte1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_byte2 = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_byte2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_byte3 = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_byte3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_byte4 = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_byte4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_byte5 = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_byte5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
    __pyx_v_byte6 = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_byte6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3987, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi1_up_sysex", 1, 9, 9, __pyx_nargs); __PYX_ERR(0, 3987, __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_610midi1_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_610midi1_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":3999
 *         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":4002
 *                                                       <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, 4002, __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, 4002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4002, __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, 4002, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4002, __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":3987
 *                                     <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":4006
 * # 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_613midi2_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_612midi2_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_613midi2_channel_voice_message = {"midi2_channel_voice_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_613midi2_channel_voice_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_612midi2_channel_voice_message};
static PyObject *__pyx_pw_9coremusic_4capi_613midi2_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, 4006, __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, 4006, __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, 4006, __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, 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, "midi2_channel_voice_message", 0) < (0)) __PYX_ERR(0, 4006, __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, 4006, __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, 4006, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4006, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4006, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4006, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4006, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    __pyx_v_status = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[4]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4006, __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, 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.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_612midi2_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_612midi2_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":4019
 *         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":4021
 *     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, 4021, __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, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __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, 4021, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4021, __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":4006
 * # 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":4023
 *     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_615midi2_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_614midi2_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_615midi2_note_on = {"midi2_note_on", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_615midi2_note_on, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_614midi2_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_615midi2_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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __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, 4023, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4023, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4023, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4023, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4023, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4023, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4023, __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, 4023, __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, 4023, __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, 4023, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_note_on", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 4023, __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_614midi2_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_614midi2_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":4037
 *         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":4039
 *     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, 4039, __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, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4039, __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, 4039, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4039, __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":4023
 *     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":4041
 *     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_617midi2_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_616midi2_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_617midi2_note_off = {"midi2_note_off", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_617midi2_note_off, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_616midi2_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_617midi2_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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __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, 4041, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4041, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4041, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4041, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4041, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4041, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4041, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4041, __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, 4041, __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, 4041, __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, 4041, __pyx_L3_error)
    __pyx_v_velocity = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_velocity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4041, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_note_off", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 4041, __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_616midi2_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_616midi2_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":4055
 *         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":4057
 *     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, 4057, __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, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __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, 4057, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4057, __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":4041
 *     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":4059
 *     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_619midi2_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_618midi2_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_619midi2_control_change = {"midi2_control_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_619midi2_control_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_618midi2_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_619midi2_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, 4059, __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, 4059, __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, 4059, __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, 4059, __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, 4059, __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, 4059, __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, 4059, __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, 4059, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4059, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4059, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4059, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[3]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4059, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_control_change", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4059, __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_618midi2_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_618midi2_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":4071
 *         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":4073
 *     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, 4073, __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, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4073, __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, 4073, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4073, __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":4059
 *     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":4075
 *     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_621midi2_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_620midi2_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_621midi2_program_change = {"midi2_program_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_621midi2_program_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_620midi2_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_621midi2_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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __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, 4075, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4075, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4075, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4075, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4075, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4075, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4075, __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, 4075, __pyx_L3_error)
    __pyx_v_program = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_program == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4075, __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, 4075, __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, 4075, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_program_change", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 4075, __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_620midi2_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_620midi2_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":4089
 *         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":4091
 *     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, 4091, __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, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __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, 4091, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4091, __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":4075
 *     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":4093
 *     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_623midi2_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_622midi2_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_623midi2_pitch_bend = {"midi2_pitch_bend", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_623midi2_pitch_bend, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_622midi2_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_623midi2_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, 4093, __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, 4093, __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, 4093, __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, 4093, __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, 4093, __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, 4093, __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, 4093, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4093, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4093, __pyx_L3_error)
    }
    __pyx_v_group = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_group == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L3_error)
    __pyx_v_channel = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_channel == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_value == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi2_pitch_bend", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4093, __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_622midi2_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_622midi2_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":4104
 *         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":4105
 *     """
 *     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, 4105, __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, 4105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4105, __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, 4105, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4105, __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":4093
 *     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":4109
 * # 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_625get_midi_message_type_utility(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_624get_midi_message_type_utility, "get_midi_message_type_utility()\n\nGet the Utility message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_625get_midi_message_type_utility = {"get_midi_message_type_utility", (PyCFunction)__pyx_pw_9coremusic_4capi_625get_midi_message_type_utility, METH_NOARGS, __pyx_doc_9coremusic_4capi_624get_midi_message_type_utility};
static PyObject *__pyx_pw_9coremusic_4capi_625get_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_624get_midi_message_type_utility(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_624get_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":4111
 * 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, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4109
 * # 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":4113
 *     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_627get_midi_message_type_system(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_626get_midi_message_type_system, "get_midi_message_type_system()\n\nGet the System message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_627get_midi_message_type_system = {"get_midi_message_type_system", (PyCFunction)__pyx_pw_9coremusic_4capi_627get_midi_message_type_system, METH_NOARGS, __pyx_doc_9coremusic_4capi_626get_midi_message_type_system};
static PyObject *__pyx_pw_9coremusic_4capi_627get_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_626get_midi_message_type_system(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_626get_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":4115
 * 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, 4115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4113
 *     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":4117
 *     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_629get_midi_message_type_channel_voice1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_628get_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_629get_midi_message_type_channel_voice1 = {"get_midi_message_type_channel_voice1", (PyCFunction)__pyx_pw_9coremusic_4capi_629get_midi_message_type_channel_voice1, METH_NOARGS, __pyx_doc_9coremusic_4capi_628get_midi_message_type_channel_voice1};
static PyObject *__pyx_pw_9coremusic_4capi_629get_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_628get_midi_message_type_channel_voice1(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_628get_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":4119
 * 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, 4119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4117
 *     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":4121
 *     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_631get_midi_message_type_sysex(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_630get_midi_message_type_sysex, "get_midi_message_type_sysex()\n\nGet the SysEx message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_631get_midi_message_type_sysex = {"get_midi_message_type_sysex", (PyCFunction)__pyx_pw_9coremusic_4capi_631get_midi_message_type_sysex, METH_NOARGS, __pyx_doc_9coremusic_4capi_630get_midi_message_type_sysex};
static PyObject *__pyx_pw_9coremusic_4capi_631get_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_630get_midi_message_type_sysex(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_630get_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":4123
 * 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, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4121
 *     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":4125
 *     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_633get_midi_message_type_channel_voice2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_632get_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_633get_midi_message_type_channel_voice2 = {"get_midi_message_type_channel_voice2", (PyCFunction)__pyx_pw_9coremusic_4capi_633get_midi_message_type_channel_voice2, METH_NOARGS, __pyx_doc_9coremusic_4capi_632get_midi_message_type_channel_voice2};
static PyObject *__pyx_pw_9coremusic_4capi_633get_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_632get_midi_message_type_channel_voice2(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_632get_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":4127
 * 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, 4127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4125
 *     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":4129
 *     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_635get_midi_message_type_data128(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_634get_midi_message_type_data128, "get_midi_message_type_data128()\n\nGet the Data128 message type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_635get_midi_message_type_data128 = {"get_midi_message_type_data128", (PyCFunction)__pyx_pw_9coremusic_4capi_635get_midi_message_type_data128, METH_NOARGS, __pyx_doc_9coremusic_4capi_634get_midi_message_type_data128};
static PyObject *__pyx_pw_9coremusic_4capi_635get_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_634get_midi_message_type_data128(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_634get_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":4131
 * 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, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4129
 *     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":4135
 * # 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_637get_midi_cv_status_note_off(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_636get_midi_cv_status_note_off, "get_midi_cv_status_note_off()\n\nGet the Note Off status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_637get_midi_cv_status_note_off = {"get_midi_cv_status_note_off", (PyCFunction)__pyx_pw_9coremusic_4capi_637get_midi_cv_status_note_off, METH_NOARGS, __pyx_doc_9coremusic_4capi_636get_midi_cv_status_note_off};
static PyObject *__pyx_pw_9coremusic_4capi_637get_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_636get_midi_cv_status_note_off(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_636get_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":4137
 * 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, 4137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4135
 * # 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":4139
 *     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_639get_midi_cv_status_note_on(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_638get_midi_cv_status_note_on, "get_midi_cv_status_note_on()\n\nGet the Note On status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_639get_midi_cv_status_note_on = {"get_midi_cv_status_note_on", (PyCFunction)__pyx_pw_9coremusic_4capi_639get_midi_cv_status_note_on, METH_NOARGS, __pyx_doc_9coremusic_4capi_638get_midi_cv_status_note_on};
static PyObject *__pyx_pw_9coremusic_4capi_639get_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_638get_midi_cv_status_note_on(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_638get_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":4141
 * 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, 4141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4139
 *     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":4143
 *     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_641get_midi_cv_status_poly_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_640get_midi_cv_status_poly_pressure, "get_midi_cv_status_poly_pressure()\n\nGet the Poly Pressure status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_641get_midi_cv_status_poly_pressure = {"get_midi_cv_status_poly_pressure", (PyCFunction)__pyx_pw_9coremusic_4capi_641get_midi_cv_status_poly_pressure, METH_NOARGS, __pyx_doc_9coremusic_4capi_640get_midi_cv_status_poly_pressure};
static PyObject *__pyx_pw_9coremusic_4capi_641get_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_640get_midi_cv_status_poly_pressure(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_640get_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":4145
 * 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, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4143
 *     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":4147
 *     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_643get_midi_cv_status_control_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_642get_midi_cv_status_control_change, "get_midi_cv_status_control_change()\n\nGet the Control Change status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_643get_midi_cv_status_control_change = {"get_midi_cv_status_control_change", (PyCFunction)__pyx_pw_9coremusic_4capi_643get_midi_cv_status_control_change, METH_NOARGS, __pyx_doc_9coremusic_4capi_642get_midi_cv_status_control_change};
static PyObject *__pyx_pw_9coremusic_4capi_643get_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_642get_midi_cv_status_control_change(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_642get_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":4149
 * 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, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4147
 *     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":4151
 *     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_645get_midi_cv_status_program_change(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_644get_midi_cv_status_program_change, "get_midi_cv_status_program_change()\n\nGet the Program Change status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_645get_midi_cv_status_program_change = {"get_midi_cv_status_program_change", (PyCFunction)__pyx_pw_9coremusic_4capi_645get_midi_cv_status_program_change, METH_NOARGS, __pyx_doc_9coremusic_4capi_644get_midi_cv_status_program_change};
static PyObject *__pyx_pw_9coremusic_4capi_645get_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_644get_midi_cv_status_program_change(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_644get_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":4153
 * 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, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4151
 *     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":4155
 *     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_647get_midi_cv_status_channel_pressure(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_646get_midi_cv_status_channel_pressure, "get_midi_cv_status_channel_pressure()\n\nGet the Channel Pressure status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_647get_midi_cv_status_channel_pressure = {"get_midi_cv_status_channel_pressure", (PyCFunction)__pyx_pw_9coremusic_4capi_647get_midi_cv_status_channel_pressure, METH_NOARGS, __pyx_doc_9coremusic_4capi_646get_midi_cv_status_channel_pressure};
static PyObject *__pyx_pw_9coremusic_4capi_647get_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_646get_midi_cv_status_channel_pressure(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_646get_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":4157
 * 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, 4157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4155
 *     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":4159
 *     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_649get_midi_cv_status_pitch_bend(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_648get_midi_cv_status_pitch_bend, "get_midi_cv_status_pitch_bend()\n\nGet the Pitch Bend status constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_649get_midi_cv_status_pitch_bend = {"get_midi_cv_status_pitch_bend", (PyCFunction)__pyx_pw_9coremusic_4capi_649get_midi_cv_status_pitch_bend, METH_NOARGS, __pyx_doc_9coremusic_4capi_648get_midi_cv_status_pitch_bend};
static PyObject *__pyx_pw_9coremusic_4capi_649get_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_648get_midi_cv_status_pitch_bend(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_648get_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":4161
 * 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, 4161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4159
 *     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":4166
 * # 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_651midi_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_650midi_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_651midi_device_new_entity = {"midi_device_new_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_651midi_device_new_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_650midi_device_new_entity};
static PyObject *__pyx_pw_9coremusic_4capi_651midi_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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4166, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4166, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4166, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4166, __pyx_L3_error)
      values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4166, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4166, __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, 4166, __pyx_L3_error)
    __pyx_v_embedded = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_embedded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4166, __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, 4166, __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, 4166, __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, 4166, __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, 4166, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_650midi_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_650midi_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;
  PyObject *__pyx_v_name_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;
  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("midi_device_new_entity", 0);

  /* "coremusic/capi.pyx":4185
 *     cdef cm.MIDIEntityRef entity
 *     cdef cf.CFStringRef cf_name
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     cf_name = cf.CFStringCreateWithCString(
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4185, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4189
 *     cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault,
 *         name_bytes,             # <<<<<<<<<<<<<<
 *         cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4189, __pyx_L1_error)

  /* "coremusic/capi.pyx":4187
 *     cdef bytes name_bytes = name.encode('utf-8')
 * 
 *     cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         name_bytes,
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":4194
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDeviceNewEntity(
 *             <cm.MIDIDeviceRef>device,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4195
 *     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":4205
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceNewEntity failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4206
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIDeviceNewEntity failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return entity
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4206, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4206, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceNewEntity_failed_with, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4206, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4206, __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, 4206, __pyx_L4_error)

      /* "coremusic/capi.pyx":4205
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceNewEntity failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4208
 *             raise RuntimeError(f"MIDIDeviceNewEntity failed with status: {status}")
 * 
 *         return entity             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4208, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":4211
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
  /*finally:*/ {
    __pyx_L4_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_4); __pyx_t_4 = 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;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":4212
 *     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":4211
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
        }
      }
      __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_L3_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_3 = (__pyx_v_cf_name != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":4212
 *     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":4211
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
      }
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4166
 * # 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_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.midi_device_new_entity", __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":4214
 *             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_653midi_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_652midi_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_653midi_device_add_entity = {"midi_device_add_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_653midi_device_add_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_652midi_device_add_entity};
static PyObject *__pyx_pw_9coremusic_4capi_653midi_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, 4214, __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, 4214, __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, 4214, __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, 4214, __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, 4214, __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, 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, "midi_device_add_entity", 0) < (0)) __PYX_ERR(0, 4214, __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, 4214, __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, 4214, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4214, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4214, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4214, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4214, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4214, __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, 4214, __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, 4214, __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, 4214, __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, 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.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, 4214, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_652midi_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_652midi_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;
  PyObject *__pyx_v_name_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;
  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("midi_device_add_entity", 0);

  /* "coremusic/capi.pyx":4232
 *     cdef cm.MIDIEntityRef entity
 *     cdef cf.CFStringRef cf_name
 *     cdef bytes name_bytes = name.encode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     cf_name = cf.CFStringCreateWithCString(
*/
  if (unlikely(__pyx_v_name == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
    __PYX_ERR(0, 4232, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4236
 *     cf_name = cf.CFStringCreateWithCString(
 *         cf.kCFAllocatorDefault,
 *         name_bytes,             # <<<<<<<<<<<<<<
 *         cf.kCFStringEncodingUTF8
 *     )
*/
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_name_bytes); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4236, __pyx_L1_error)

  /* "coremusic/capi.pyx":4234
 *     cdef bytes name_bytes = name.encode('utf-8')
 * 
 *     cf_name = cf.CFStringCreateWithCString(             # <<<<<<<<<<<<<<
 *         cf.kCFAllocatorDefault,
 *         name_bytes,
*/
  __pyx_v_cf_name = CFStringCreateWithCString(kCFAllocatorDefault, __pyx_t_2, kCFStringEncodingUTF8);

  /* "coremusic/capi.pyx":4241
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIDeviceAddEntity(
 *             <cm.MIDIDeviceRef>device,
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4242
 *     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":4251
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceAddEntity failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4252
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIDeviceAddEntity failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return entity
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4252, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4252, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceAddEntity_failed_with, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4252, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4252, __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, 4252, __pyx_L4_error)

      /* "coremusic/capi.pyx":4251
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceAddEntity failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4254
 *             raise RuntimeError(f"MIDIDeviceAddEntity failed with status: {status}")
 * 
 *         return entity             # <<<<<<<<<<<<<<
 * 
 *     finally:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_UInt32(__pyx_v_entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4254, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":4257
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
  /*finally:*/ {
    __pyx_L4_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_4); __pyx_t_4 = 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;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":4258
 *     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":4257
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
        }
      }
      __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_L3_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_3 = (__pyx_v_cf_name != 0);
      if (__pyx_t_3) {

        /* "coremusic/capi.pyx":4258
 *     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":4257
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 * 
*/
      }
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4214
 *             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_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("coremusic.capi.midi_device_add_entity", __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":4260
 *             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_655midi_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_654midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If entity removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_655midi_device_remove_entity = {"midi_device_remove_entity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_655midi_device_remove_entity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_654midi_device_remove_entity};
static PyObject *__pyx_pw_9coremusic_4capi_655midi_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, 4260, __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, 4260, __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, 4260, __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, 4260, __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, 4260, __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, 4260, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4260, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4260, __pyx_L3_error)
    __pyx_v_entity = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4260, __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, 4260, __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_654midi_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_654midi_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;
  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("midi_device_remove_entity", 0);

  /* "coremusic/capi.pyx":4273
 *         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":4278
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceRemoveEntity failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4279
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIDeviceRemoveEntity failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceRemoveEntity_failed_wi, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4279, __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, 4279, __pyx_L1_error)

    /* "coremusic/capi.pyx":4278
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceRemoveEntity failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4281
 *         raise RuntimeError(f"MIDIDeviceRemoveEntity failed with status: {status}")
 * 
 *     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, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4260
 *             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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4283
 *     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_657midi_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_656midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If endpoint modification fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_657midi_entity_add_or_remove_endpoints = {"midi_entity_add_or_remove_endpoints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_657midi_entity_add_or_remove_endpoints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_656midi_entity_add_or_remove_endpoints};
static PyObject *__pyx_pw_9coremusic_4capi_657midi_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, 4283, __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, 4283, __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, 4283, __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, 4283, __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, 4283, __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, 4283, __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, 4283, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4283, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4283, __pyx_L3_error)
    }
    __pyx_v_entity = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_entity == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4283, __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, 4283, __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, 4283, __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, 4283, __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_656midi_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_656midi_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;
  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("midi_entity_add_or_remove_endpoints", 0);

  /* "coremusic/capi.pyx":4297
 *         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":4303
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEntityAddOrRemoveEndpoints failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4304
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEntityAddOrRemoveEndpoints failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIEntityAddOrRemoveEndpoints_f, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4304, __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, 4304, __pyx_L1_error)

    /* "coremusic/capi.pyx":4303
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEntityAddOrRemoveEndpoints failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4306
 *         raise RuntimeError(f"MIDIEntityAddOrRemoveEndpoints failed with status: {status}")
 * 
 *     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, 4306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4283
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4308
 *     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_659midi_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_658midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If device addition fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_659midi_setup_add_device = {"midi_setup_add_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_659midi_setup_add_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_658midi_setup_add_device};
static PyObject *__pyx_pw_9coremusic_4capi_659midi_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, 4308, __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, 4308, __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, 4308, __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, 4308, __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, 4308, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4308, __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, 4308, __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_658midi_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_658midi_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;
  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("midi_setup_add_device", 0);

  /* "coremusic/capi.pyx":4320
 *         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":4322
 *     cdef cf.OSStatus status = cm.MIDISetupAddDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupAddDevice failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4323
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDISetupAddDevice failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISetupAddDevice_failed_with_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4323, __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, 4323, __pyx_L1_error)

    /* "coremusic/capi.pyx":4322
 *     cdef cf.OSStatus status = cm.MIDISetupAddDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupAddDevice failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4325
 *         raise RuntimeError(f"MIDISetupAddDevice failed with status: {status}")
 * 
 *     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, 4325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4308
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4327
 *     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_661midi_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_660midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If device removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_661midi_setup_remove_device = {"midi_setup_remove_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_661midi_setup_remove_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_660midi_setup_remove_device};
static PyObject *__pyx_pw_9coremusic_4capi_661midi_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, 4327, __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, 4327, __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, 4327, __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, 4327, __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, 4327, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4327, __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, 4327, __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_660midi_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_660midi_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;
  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("midi_setup_remove_device", 0);

  /* "coremusic/capi.pyx":4339
 *         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":4341
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupRemoveDevice failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4342
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDISetupRemoveDevice failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISetupRemoveDevice_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4342, __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, 4342, __pyx_L1_error)

    /* "coremusic/capi.pyx":4341
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupRemoveDevice failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4344
 *         raise RuntimeError(f"MIDISetupRemoveDevice failed with status: {status}")
 * 
 *     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, 4344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4327
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4346
 *     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_663midi_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_662midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If external device addition fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_663midi_setup_add_external_device = {"midi_setup_add_external_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_663midi_setup_add_external_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_662midi_setup_add_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_663midi_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, 4346, __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, 4346, __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, 4346, __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, 4346, __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, 4346, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4346, __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, 4346, __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_662midi_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_662midi_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;
  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("midi_setup_add_external_device", 0);

  /* "coremusic/capi.pyx":4358
 *         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":4360
 *     cdef cf.OSStatus status = cm.MIDISetupAddExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupAddExternalDevice failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4361
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDISetupAddExternalDevice failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISetupAddExternalDevice_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4361, __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, 4361, __pyx_L1_error)

    /* "coremusic/capi.pyx":4360
 *     cdef cf.OSStatus status = cm.MIDISetupAddExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupAddExternalDevice failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4363
 *         raise RuntimeError(f"MIDISetupAddExternalDevice failed with status: {status}")
 * 
 *     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, 4363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4346
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4365
 *     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_665midi_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_664midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If external device removal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_665midi_setup_remove_external_device = {"midi_setup_remove_external_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_665midi_setup_remove_external_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_664midi_setup_remove_external_device};
static PyObject *__pyx_pw_9coremusic_4capi_665midi_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, 4365, __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, 4365, __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, 4365, __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, 4365, __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, 4365, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4365, __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, 4365, __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_664midi_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_664midi_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;
  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("midi_setup_remove_external_device", 0);

  /* "coremusic/capi.pyx":4377
 *         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":4379
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupRemoveExternalDevice failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4380
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDISetupRemoveExternalDevice failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDISetupRemoveExternalDevice_fa, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4380, __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, 4380, __pyx_L1_error)

    /* "coremusic/capi.pyx":4379
 *     cdef cf.OSStatus status = cm.MIDISetupRemoveExternalDevice(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDISetupRemoveExternalDevice failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4382
 *         raise RuntimeError(f"MIDISetupRemoveExternalDevice failed with status: {status}")
 * 
 *     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, 4382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4365
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4384
 *     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_667midi_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_666midi_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_667midi_external_device_create = {"midi_external_device_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_667midi_external_device_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_666midi_external_device_create};
static PyObject *__pyx_pw_9coremusic_4capi_667midi_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, 4384, __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, 4384, __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, 4384, __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, 4384, __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, 4384, __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, 4384, __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, 4384, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4384, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4384, __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, 4384, __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, 4384, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manufacturer), (&PyUnicode_Type), 1, "manufacturer", 1))) __PYX_ERR(0, 4384, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model), (&PyUnicode_Type), 1, "model", 1))) __PYX_ERR(0, 4384, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_666midi_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_666midi_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;
  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("midi_external_device_create", 0);

  /* "coremusic/capi.pyx":4400
 *     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, 4400, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4401
 *     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, 4401, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_manufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_manufacturer_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4402
 *     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, 4402, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4405
 * 
 *     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, 4405, __pyx_L1_error)

  /* "coremusic/capi.pyx":4404
 *     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":4408
 *     )
 *     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, 4408, __pyx_L1_error)

  /* "coremusic/capi.pyx":4407
 *         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":4411
 *     )
 *     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, 4411, __pyx_L1_error)

  /* "coremusic/capi.pyx":4410
 *         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":4415
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIExternalDeviceCreate(
 *             cf_name, cf_manufacturer, cf_model, &device
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4416
 *     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":4420
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIExternalDeviceCreate failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4421
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIExternalDeviceCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return device
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4421, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4421, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIExternalDeviceCreate_failed, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4421, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4421, __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, 4421, __pyx_L4_error)

      /* "coremusic/capi.pyx":4420
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIExternalDeviceCreate failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4423
 *             raise RuntimeError(f"MIDIExternalDeviceCreate failed with status: {status}")
 * 
 *         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, 4423, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":4426
 * 
 *     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_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_4); __pyx_t_4 = 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;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":4427
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":4426
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
        }

        /* "coremusic/capi.pyx":4428
 *         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":4429
 *             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":4428
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        }

        /* "coremusic/capi.pyx":4430
 *         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":4431
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * 
*/
          CFRelease(__pyx_v_cf_model);

          /* "coremusic/capi.pyx":4430
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        }
      }
      __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_L3_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":4426
 * 
 *     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":4427
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":4426
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      }

      /* "coremusic/capi.pyx":4428
 *         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":4429
 *             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":4428
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      }

      /* "coremusic/capi.pyx":4430
 *         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":4431
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
 *             cf.CFRelease(cf_model)             # <<<<<<<<<<<<<<
 * 
 * 
*/
        CFRelease(__pyx_v_cf_model);

        /* "coremusic/capi.pyx":4430
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      }
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4384
 *     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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":4436
 * # 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_669midi_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_668midi_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_669midi_device_create = {"midi_device_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_669midi_device_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_668midi_device_create};
static PyObject *__pyx_pw_9coremusic_4capi_669midi_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, 4436, __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, 4436, __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, 4436, __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, 4436, __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, 4436, __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, 4436, __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, 4436, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4436, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4436, __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, 4436, __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, 4436, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manufacturer), (&PyUnicode_Type), 1, "manufacturer", 1))) __PYX_ERR(0, 4436, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model), (&PyUnicode_Type), 1, "model", 1))) __PYX_ERR(0, 4436, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_668midi_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_668midi_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;
  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("midi_device_create", 0);

  /* "coremusic/capi.pyx":4452
 *     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, 4452, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4453
 *     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, 4453, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_manufacturer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_manufacturer_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4454
 *     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, 4454, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_model); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":4457
 * 
 *     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, 4457, __pyx_L1_error)

  /* "coremusic/capi.pyx":4456
 *     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":4460
 *     )
 *     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, 4460, __pyx_L1_error)

  /* "coremusic/capi.pyx":4459
 *         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":4463
 *     )
 *     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, 4463, __pyx_L1_error)

  /* "coremusic/capi.pyx":4462
 *         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":4467
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         # NULL owner indicates non-driver creation
 *         status = cm.MIDIDeviceCreate(
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4469
 *     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":4474
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceCreate failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":4475
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIDeviceCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return device
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4475, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4475, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceCreate_failed_with_sta, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4475, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __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, 4475, __pyx_L4_error)

      /* "coremusic/capi.pyx":4474
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIDeviceCreate failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4477
 *             raise RuntimeError(f"MIDIDeviceCreate failed with status: {status}")
 * 
 *         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, 4477, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "coremusic/capi.pyx":4480
 * 
 *     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_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_4); __pyx_t_4 = 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;
      {
        __pyx_t_3 = (__pyx_v_cf_name != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":4481
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
          CFRelease(__pyx_v_cf_name);

          /* "coremusic/capi.pyx":4480
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
        }

        /* "coremusic/capi.pyx":4482
 *         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":4483
 *             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":4482
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
        }

        /* "coremusic/capi.pyx":4484
 *         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":4485
 *             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":4484
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
        }
      }
      __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_L3_return: {
      __pyx_t_17 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":4480
 * 
 *     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":4481
 *     finally:
 *         if cf_name:
 *             cf.CFRelease(cf_name)             # <<<<<<<<<<<<<<
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
*/
        CFRelease(__pyx_v_cf_name);

        /* "coremusic/capi.pyx":4480
 * 
 *     finally:
 *         if cf_name:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:
*/
      }

      /* "coremusic/capi.pyx":4482
 *         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":4483
 *             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":4482
 *         if cf_name:
 *             cf.CFRelease(cf_name)
 *         if cf_manufacturer:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:
*/
      }

      /* "coremusic/capi.pyx":4484
 *         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":4485
 *             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":4484
 *         if cf_manufacturer:
 *             cf.CFRelease(cf_manufacturer)
 *         if cf_model:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_model)
 * 
*/
      }
      __pyx_r = __pyx_t_17;
      __pyx_t_17 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4436
 * # 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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":4487
 *             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_671midi_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_670midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If device disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_671midi_device_dispose = {"midi_device_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_671midi_device_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_670midi_device_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_671midi_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, 4487, __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, 4487, __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, 4487, __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, 4487, __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, 4487, __pyx_L3_error)
    }
    __pyx_v_device = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4487, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("midi_device_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4487, __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_670midi_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_670midi_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;
  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("midi_device_dispose", 0);

  /* "coremusic/capi.pyx":4499
 *         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":4501
 *     cdef cf.OSStatus status = cm.MIDIDeviceDispose(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4502
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIDeviceDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceDispose_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4502, __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, 4502, __pyx_L1_error)

    /* "coremusic/capi.pyx":4501
 *     cdef cf.OSStatus status = cm.MIDIDeviceDispose(<cm.MIDIDeviceRef>device)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4504
 *         raise RuntimeError(f"MIDIDeviceDispose failed with status: {status}")
 * 
 *     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, 4504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4487
 *             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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4506
 *     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_673midi_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_672midi_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_673midi_device_list_get_number_of_devices = {"midi_device_list_get_number_of_devices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_673midi_device_list_get_number_of_devices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_672midi_device_list_get_number_of_devices};
static PyObject *__pyx_pw_9coremusic_4capi_673midi_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, 4506, __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, 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, "midi_device_list_get_number_of_devices", 0) < (0)) __PYX_ERR(0, 4506, __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, 4506, __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, 4506, __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, 4506, __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, 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.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_672midi_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_672midi_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":4515
 *         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, 4515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4506
 *     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":4517
 *     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_675midi_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_674midi_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_675midi_device_list_get_device = {"midi_device_list_get_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_675midi_device_list_get_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_674midi_device_list_get_device};
static PyObject *__pyx_pw_9coremusic_4capi_675midi_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, 4517, __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, 4517, __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, 4517, __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, 4517, __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, 4517, __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, 4517, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4517, __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, 4517, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4517, __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, 4517, __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_674midi_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_674midi_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 = NULL;
  PyObject *__pyx_t_8[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("midi_device_list_get_device", 0);

  /* "coremusic/capi.pyx":4530
 *         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":4532
 *     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":4533
 * 
 *     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_INCREF(__pyx_builtin_IndexError);
    __pyx_t_5 = __pyx_builtin_IndexError; 
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_long((__pyx_v_num_devices - 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Device_index;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_out_of_bounds_0;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __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_4, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4533, __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, 4533, __pyx_L1_error)

    /* "coremusic/capi.pyx":4532
 *     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":4535
 *         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":4539
 *     )
 * 
 *     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":4540
 * 
 *     if device == 0:
 *         raise RuntimeError(f"Failed to get device at index {index}")             # <<<<<<<<<<<<<<
 * 
 *     return device
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_9 = __pyx_builtin_RuntimeError; 
    __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_index, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_get_device_at_index, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4540, __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, 4540, __pyx_L1_error)

    /* "coremusic/capi.pyx":4539
 *     )
 * 
 *     if device == 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"Failed to get device at index {index}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4542
 *         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, 4542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4517
 *     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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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":4544
 *     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_677midi_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_676midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If adding device fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_677midi_device_list_add_device = {"midi_device_list_add_device", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_677midi_device_list_add_device, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_676midi_device_list_add_device};
static PyObject *__pyx_pw_9coremusic_4capi_677midi_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, 4544, __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, 4544, __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, 4544, __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, 4544, __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, 4544, __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, 4544, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4544, __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, 4544, __pyx_L3_error)
    __pyx_v_device = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_device == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4544, __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, 4544, __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_676midi_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_676midi_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;
  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("midi_device_list_add_device", 0);

  /* "coremusic/capi.pyx":4557
 *         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":4561
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceListAddDevice failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4562
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIDeviceListAddDevice failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceListAddDevice_failed_w, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4562, __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, 4562, __pyx_L1_error)

    /* "coremusic/capi.pyx":4561
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceListAddDevice failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4564
 *         raise RuntimeError(f"MIDIDeviceListAddDevice failed with status: {status}")
 * 
 *     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, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4544
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4566
 *     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_679midi_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_678midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_679midi_device_list_dispose = {"midi_device_list_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_679midi_device_list_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_678midi_device_list_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_679midi_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, 4566, __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, 4566, __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, 4566, __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, 4566, __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, 4566, __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, 4566, __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, 4566, __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_678midi_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_678midi_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;
  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("midi_device_list_dispose", 0);

  /* "coremusic/capi.pyx":4578
 *         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":4580
 *     cdef cf.OSStatus status = cm.MIDIDeviceListDispose(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceListDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4581
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIDeviceListDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDeviceListDispose_failed_wit, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4581, __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, 4581, __pyx_L1_error)

    /* "coremusic/capi.pyx":4580
 *     cdef cf.OSStatus status = cm.MIDIDeviceListDispose(<cm.MIDIDeviceListRef>dev_list)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDeviceListDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4583
 *         raise RuntimeError(f"MIDIDeviceListDispose failed with status: {status}")
 * 
 *     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, 4583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4566
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4585
 *     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_681midi_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_680midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting refCons fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_681midi_endpoint_set_ref_cons = {"midi_endpoint_set_ref_cons", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_681midi_endpoint_set_ref_cons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_680midi_endpoint_set_ref_cons};
static PyObject *__pyx_pw_9coremusic_4capi_681midi_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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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, 4585, __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_680midi_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_680midi_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;
  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("midi_endpoint_set_ref_cons", 0);

  /* "coremusic/capi.pyx":4599
 *         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":4605
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointSetRefCons failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4606
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEndpointSetRefCons failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIEndpointSetRefCons_failed_wi, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4606, __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, 4606, __pyx_L1_error)

    /* "coremusic/capi.pyx":4605
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointSetRefCons failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4608
 *         raise RuntimeError(f"MIDIEndpointSetRefCons failed with status: {status}")
 * 
 *     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, 4608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4585
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4610
 *     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_683midi_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_682midi_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_683midi_endpoint_get_ref_cons = {"midi_endpoint_get_ref_cons", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_683midi_endpoint_get_ref_cons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_682midi_endpoint_get_ref_cons};
static PyObject *__pyx_pw_9coremusic_4capi_683midi_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, 4610, __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, 4610, __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, 4610, __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, 4610, __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, 4610, __pyx_L3_error)
    }
    __pyx_v_endpoint = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_endpoint == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4610, __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, 4610, __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_682midi_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_682midi_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;
  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("midi_endpoint_get_ref_cons", 0);

  /* "coremusic/capi.pyx":4624
 *     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":4628
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointGetRefCons failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4629
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIEndpointGetRefCons failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return (<long>ref1, <long>ref2)
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIEndpointGetRefCons_failed_wi, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4629, __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, 4629, __pyx_L1_error)

    /* "coremusic/capi.pyx":4628
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIEndpointGetRefCons failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4631
 *         raise RuntimeError(f"MIDIEndpointGetRefCons failed with status: {status}")
 * 
 *     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, 4631, __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, 4631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4631, __pyx_L1_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, 4631, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 4631, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4610
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4633
 *     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_685midi_get_driver_io_runloop(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_684midi_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_685midi_get_driver_io_runloop = {"midi_get_driver_io_runloop", (PyCFunction)__pyx_pw_9coremusic_4capi_685midi_get_driver_io_runloop, METH_NOARGS, __pyx_doc_9coremusic_4capi_684midi_get_driver_io_runloop};
static PyObject *__pyx_pw_9coremusic_4capi_685midi_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_684midi_get_driver_io_runloop(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_684midi_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":4642
 *         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":4643
 *     """
 *     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, 4643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4633
 *     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":4645
 *     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_687midi_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_686midi_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_687midi_get_driver_device_list = {"midi_get_driver_device_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_687midi_get_driver_device_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_686midi_get_driver_device_list};
static PyObject *__pyx_pw_9coremusic_4capi_687midi_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, 4645, __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, 4645, __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, 4645, __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, 4645, __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, 4645, __pyx_L3_error)
    }
    __pyx_v_driver = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_driver == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4645, __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, 4645, __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_686midi_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_686midi_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":4658
 *         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":4659
 *     """
 *     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, 4659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4645
 *     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":4661
 *     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_689midi_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_688midi_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  f OSStatus result code\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_689midi_driver_enable_monitoring = {"midi_driver_enable_monitoring", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_689midi_driver_enable_monitoring, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_688midi_driver_enable_monitoring};
static PyObject *__pyx_pw_9coremusic_4capi_689midi_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, 4661, __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, 4661, __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, 4661, __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, 4661, __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, 4661, __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, 4661, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4661, __pyx_L3_error)
    }
    __pyx_v_driver = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_driver == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4661, __pyx_L3_error)
    __pyx_v_enabled = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_enabled == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4661, __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, 4661, __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_688midi_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_688midi_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;
  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("midi_driver_enable_monitoring", 0);

  /* "coremusic/capi.pyx":4678
 *         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":4682
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDriverEnableMonitoring failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4683
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIDriverEnableMonitoring failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIDriverEnableMonitoring_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4683, __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, 4683, __pyx_L1_error)

    /* "coremusic/capi.pyx":4682
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIDriverEnableMonitoring failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4685
 *         raise RuntimeError(f"MIDIDriverEnableMonitoring failed with status: {status}")
 * 
 *     return status             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4661
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4690
 * # 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_691midi_thru_connection_params_initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_690midi_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_691midi_thru_connection_params_initialize = {"midi_thru_connection_params_initialize", (PyCFunction)__pyx_pw_9coremusic_4capi_691midi_thru_connection_params_initialize, METH_NOARGS, __pyx_doc_9coremusic_4capi_690midi_thru_connection_params_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_691midi_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_690midi_thru_connection_params_initialize(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_690midi_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":4701
 *     """
 *     cdef cm.MIDIThruConnectionParams params
 *     cm.MIDIThruConnectionParamsInitialize(&params)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to Python dictionary for easier manipulation
*/
  MIDIThruConnectionParamsInitialize((&__pyx_v_params));

  /* "coremusic/capi.pyx":4705
 *     # 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, 4705, __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, 4705, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4706
 *     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, 4706, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4707
 *         '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, 4707, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  { /* enter inner scope */

    /* "coremusic/capi.pyx":4708
 *         '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, 4708, __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, 4708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4708, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4709
 *         '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, 4709, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4710
 *         '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, 4710, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4711
 *         '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, 4711, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4712
 *         '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, 4712, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4713
 *         '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, 4713, __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, 4713, __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, 4713, __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, 4713, __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, 4713, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4714
 *         '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, 4714, __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, 4714, __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, 4714, __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, 4714, __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, 4714, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4715
 *         '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, 4715, __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, 4715, __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, 4715, __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, 4715, __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, 4715, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4716
 *         '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, 4716, __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, 4716, __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, 4716, __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, 4716, __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, 4716, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4717
 *         '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, 4717, __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, 4717, __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, 4717, __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, 4717, __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, 4717, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4718
 *         '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, 4718, __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, 4718, __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, 4718, __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, 4718, __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, 4718, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4719
 *         '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, 4719, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4720
 *         '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, 4720, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4721
 *         '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, 4721, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4722
 *         '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, 4722, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4723
 *         '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, 4723, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4724
 *         'filterOutTuneRequest': params.filterOutTuneRequest,
 *         'filterOutAllControls': params.filterOutAllControls,
 *         'controlTransforms': [],             # <<<<<<<<<<<<<<
 *         'valueMaps': []
 *     }
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4724, __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, 4705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4725
 *         'filterOutAllControls': params.filterOutAllControls,
 *         'controlTransforms': [],
 *         'valueMaps': []             # <<<<<<<<<<<<<<
 *     }
 * 
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4725, __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, 4705, __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":4728
 *     }
 * 
 *     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":4690
 * # 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":4730
 *     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_693midi_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_692midi_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_693midi_thru_connection_create = {"midi_thru_connection_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_693midi_thru_connection_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_692midi_thru_connection_create};
static PyObject *__pyx_pw_9coremusic_4capi_693midi_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, 4730, __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, 4730, __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, 4730, __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, 4730, __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, 4730, __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, 4730, __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, 4730, __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, 4730, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection_params), (&PyDict_Type), 1, "connection_params", 1))) __PYX_ERR(0, 4730, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_692midi_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_692midi_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;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  char const *__pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = 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":4743
 *         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":4744
 *     """
 *     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, 4744, __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(__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, 4744, __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, 4744, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_connection_params, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":4743
 *         RuntimeError: If connection creation fails
 *     """
 *     if connection_params is None:             # <<<<<<<<<<<<<<
 *         connection_params = midi_thru_connection_params_initialize()
 * 
*/
  }

  /* "coremusic/capi.pyx":4750
 *     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":4753
 * 
 *     # 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, 4753, __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, 4753, __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, 4753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.version = __pyx_t_6;

  /* "coremusic/capi.pyx":4756
 * 
 *     # 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, 4756, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4756, __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, 4756, __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":4757
 *     # 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, 4757, __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":4758
 *     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":4759
 *     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); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4759, __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":4760
 *     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); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4760, __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, 4760, __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[11], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4760, __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, 4760, __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":4761
 *         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); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4761, __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, 4761, __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[12], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4761, __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, 4761, __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":4759
 *     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":4764
 * 
 *     # 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, 4764, __pyx_L1_error)
  }
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4764, __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, 4764, __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":4765
 *     # 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, 4765, __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":4766
 *     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":4767
 *     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); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4767, __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":4768
 *     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); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4768, __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, 4768, __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[11], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4768, __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, 4768, __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":4769
 *         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); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4769, __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, 4769, __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[12], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4769, __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, 4769, __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":4767
 *     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":4772
 * 
 *     # 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, 4772, __pyx_L1_error)
  }
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_builtin_range);
  __pyx_t_3 = __pyx_builtin_range; 
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_16};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __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, 4772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_channel_map = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4773
 *     # 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":4774
 *     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, 4774, __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); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4774, __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, 4774, __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":4777
 * 
 *     # 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, 4777, __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, 4777, __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, 4777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.lowVelocity = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4778
 *     # 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, 4778, __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, 4778, __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, 4778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.highVelocity = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4779
 *     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, 4779, __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, 4779, __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, 4779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.lowNote = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4780
 *     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, 4780, __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, 4780, __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, 4780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.highNote = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4783
 * 
 *     # 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, 4783, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __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, 4783, __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, 4783, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_noteNumber, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_note_number = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4784
 *     # 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_note_number, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[13], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_note_transform = __pyx_t_15;

  /* "coremusic/capi.pyx":4785
 *     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":4786
 *     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, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[14], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_16 = __Pyx_PyLong_As_SInt16(__pyx_t_3); if (unlikely((__pyx_t_16 == ((SInt16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_params.noteNumber.param = ((SInt16)__pyx_t_16);

  /* "coremusic/capi.pyx":4788
 *     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, 4788, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_transform, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 4788, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_param, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_connection_params, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_velocity = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":4789
 * 
 *     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, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[13], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_velocity_transform = __pyx_t_15;

  /* "coremusic/capi.pyx":4790
 *     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":4791
 *     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_velocity, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[14], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_16 = __Pyx_PyLong_As_SInt16(__pyx_t_2); if (unlikely((__pyx_t_16 == ((SInt16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.velocity.param = ((SInt16)__pyx_t_16);

  /* "coremusic/capi.pyx":4794
 * 
 *     # 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, 4794, __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, 4794, __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, 4794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutSysEx = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4795
 *     # 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, 4795, __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, 4795, __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, 4795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutMTC = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4796
 *     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, 4796, __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, 4796, __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, 4796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutBeatClock = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4797
 *     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, 4797, __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, 4797, __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, 4797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutTuneRequest = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4798
 *     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, 4798, __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, 4798, __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, 4798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_params.filterOutAllControls = ((UInt8)__pyx_t_13);

  /* "coremusic/capi.pyx":4802
 *     # 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":4803
 *     # (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":4806
 * 
 *     # 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":4812
 *     )
 * 
 *     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":4814
 *     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":4815
 *     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, 4815, __pyx_L1_error)
    }
    __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_persistent_owner_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_owner_id_bytes = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":4817
 *         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, 4817, __pyx_L1_error)

    /* "coremusic/capi.pyx":4816
 *     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":4814
 *     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":4823
 *     cdef cf.OSStatus status
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4824
 * 
 *     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":4826
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionCreate failed with status: {status}")
 * 
*/
    __pyx_t_1 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_1)) {

      /* "coremusic/capi.pyx":4827
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIThruConnectionCreate failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return connection
*/
      __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_4 = __pyx_builtin_RuntimeError; 
      __pyx_t_18 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4827, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = __Pyx_PyObject_FormatSimple(__pyx_t_18, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 4827, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_18 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIThruConnectionCreate_failed, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4827, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_18};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __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_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4827, __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, 4827, __pyx_L14_error)

      /* "coremusic/capi.pyx":4826
 *         status = cm.MIDIThruConnectionCreate(cf_owner_id, cf_params, &connection)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionCreate failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4829
 *             raise RuntimeError(f"MIDIThruConnectionCreate failed with status: {status}")
 * 
 *         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, 4829, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L13_return;
  }

  /* "coremusic/capi.pyx":4832
 * 
 *     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_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_19); __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_25, &__pyx_t_26, &__pyx_t_27);
      if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_26);
      __Pyx_XGOTREF(__pyx_t_27);
      __pyx_t_15 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
      {
        __pyx_t_1 = (__pyx_v_cf_params != 0);
        if (__pyx_t_1) {

          /* "coremusic/capi.pyx":4833
 *     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":4832
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
        }

        /* "coremusic/capi.pyx":4834
 *         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":4835
 *             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":4834
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
        }
      }
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_XGIVEREF(__pyx_t_26);
      __Pyx_XGIVEREF(__pyx_t_27);
      __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
      __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
      __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21;
      goto __pyx_L1_error;
    }
    __pyx_L13_return: {
      __pyx_t_27 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":4832
 * 
 *     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":4833
 *     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":4832
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:
*/
      }

      /* "coremusic/capi.pyx":4834
 *         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":4835
 *             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":4834
 *         if cf_params:
 *             cf.CFRelease(cf_params)
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 * 
*/
      }
      __pyx_r = __pyx_t_27;
      __pyx_t_27 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4730
 *     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_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __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":4837
 *             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_695midi_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_694midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If disposal fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_695midi_thru_connection_dispose = {"midi_thru_connection_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_695midi_thru_connection_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_694midi_thru_connection_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_695midi_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, 4837, __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, 4837, __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, 4837, __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, 4837, __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, 4837, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4837, __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, 4837, __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_694midi_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_694midi_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;
  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("midi_thru_connection_dispose", 0);

  /* "coremusic/capi.pyx":4849
 *         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":4851
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionDispose(<cm.MIDIThruConnectionRef>connection)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIThruConnectionDispose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4852
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIThruConnectionDispose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return status
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIThruConnectionDispose_failed, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4852, __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, 4852, __pyx_L1_error)

    /* "coremusic/capi.pyx":4851
 *     cdef cf.OSStatus status = cm.MIDIThruConnectionDispose(<cm.MIDIThruConnectionRef>connection)
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIThruConnectionDispose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4854
 *         raise RuntimeError(f"MIDIThruConnectionDispose failed with status: {status}")
 * 
 *     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, 4854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":4837
 *             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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4856
 *     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_697midi_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_696midi_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_697midi_thru_connection_get_params = {"midi_thru_connection_get_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_697midi_thru_connection_get_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_696midi_thru_connection_get_params};
static PyObject *__pyx_pw_9coremusic_4capi_697midi_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, 4856, __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, 4856, __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, 4856, __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, 4856, __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, 4856, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4856, __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, 4856, __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_696midi_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_696midi_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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  long __pyx_t_8;
  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("midi_thru_connection_get_params", 0);

  /* "coremusic/capi.pyx":4869
 *     """
 *     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":4873
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIThruConnectionGetParams failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":4874
 * 
 *     if status != 0:
 *         raise RuntimeError(f"MIDIThruConnectionGetParams failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     cdef cf.CFIndex data_length
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIThruConnectionGetParams_fail, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4874, __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, 4874, __pyx_L1_error)

    /* "coremusic/capi.pyx":4873
 *     )
 * 
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"MIDIThruConnectionGetParams failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":4880
 *     cdef cm.MIDIThruConnectionParams* params
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         # Extract the data
 *         data_length = ca.CFDataGetLength(cf_params)
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4882
 *     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":4883
 *         # 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":4885
 *         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":4886
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):
 *             raise RuntimeError("Invalid connection parameters data")             # <<<<<<<<<<<<<<
 * 
 *         params = <cm.MIDIThruConnectionParams*>data_ptr
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Invalid_connection_parameters_da};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __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_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4886, __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, 4886, __pyx_L5_error)

      /* "coremusic/capi.pyx":4885
 *         data_ptr = <cf.UInt8*>ca.CFDataGetBytePtr(cf_params)
 * 
 *         if data_length < sizeof(cm.MIDIThruConnectionParams):             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Invalid connection parameters data")
 * 
*/
    }

    /* "coremusic/capi.pyx":4888
 *             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":4892
 *         # 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, 4892, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyLong_From_UInt32(__pyx_v_params->version); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4893
 *         result = {
 *             'version': params.version,
 *             'sources': [],             # <<<<<<<<<<<<<<
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],
*/
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4893, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sources, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4894
 *             'version': params.version,
 *             'sources': [],
 *             'destinations': [],             # <<<<<<<<<<<<<<
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,
*/
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4894, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_destinations, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    { /* enter inner scope */

      /* "coremusic/capi.pyx":4895
 *             'sources': [],
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],             # <<<<<<<<<<<<<<
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,
*/
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4895, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      for (__pyx_t_8 = 0; __pyx_t_8 < 16; __pyx_t_8+=1) {
        __pyx_8genexpr1__pyx_v_i = __pyx_t_8;
        __pyx_t_4 = __Pyx_PyLong_From_UInt8((__pyx_v_params->channelMap[__pyx_8genexpr1__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4895, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4895, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_channelMap, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4896
 *             'destinations': [],
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,             # <<<<<<<<<<<<<<
 *             'highVelocity': params.highVelocity,
 *             'lowNote': params.lowNote,
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->lowVelocity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4896, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lowVelocity, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4897
 *             'channelMap': [params.channelMap[i] for i in range(16)],
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,             # <<<<<<<<<<<<<<
 *             'lowNote': params.lowNote,
 *             'highNote': params.highNote,
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->highVelocity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4897, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_highVelocity, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4898
 *             'lowVelocity': params.lowVelocity,
 *             'highVelocity': params.highVelocity,
 *             'lowNote': params.lowNote,             # <<<<<<<<<<<<<<
 *             'highNote': params.highNote,
 *             'noteNumber': {'transform': params.noteNumber.transform, 'param': params.noteNumber.param},
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->lowNote); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4898, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_lowNote, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4899
 *             '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_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->highNote); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4899, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_highNote, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4900
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4900, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->noteNumber.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4900, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4900, __pyx_L5_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, 4900, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4900, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_noteNumber, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4901
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4901, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->velocity.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4901, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4901, __pyx_L5_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, 4901, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4901, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_velocity, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4902
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4902, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->keyPressure.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4902, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4902, __pyx_L5_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, 4902, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4902, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_keyPressure, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4903
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4903, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->channelPressure.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4903, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4903, __pyx_L5_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, 4903, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4903, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_channelPressure, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4904
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4904, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->programChange.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4904, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4904, __pyx_L5_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, 4904, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4904, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_programChange, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4905
 *             '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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4905, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyLong_From_MIDITransformType(__pyx_v_params->pitchBend.transform); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4905, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_transform, __pyx_t_4) < (0)) __PYX_ERR(0, 4905, __pyx_L5_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, 4905, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_param, __pyx_t_4) < (0)) __PYX_ERR(0, 4905, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pitchBend, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4906
 *             '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_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutSysEx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4906, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutSysEx, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4907
 *             'pitchBend': {'transform': params.pitchBend.transform, 'param': params.pitchBend.param},
 *             'filterOutSysEx': params.filterOutSysEx,
 *             'filterOutMTC': params.filterOutMTC,             # <<<<<<<<<<<<<<
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutMTC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4907, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutMTC, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4908
 *             'filterOutSysEx': params.filterOutSysEx,
 *             'filterOutMTC': params.filterOutMTC,
 *             'filterOutBeatClock': params.filterOutBeatClock,             # <<<<<<<<<<<<<<
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutBeatClock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4908, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutBeatClock, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4909
 *             'filterOutMTC': params.filterOutMTC,
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,             # <<<<<<<<<<<<<<
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutTuneRequest); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4909, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutTuneRequest, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4910
 *             'filterOutBeatClock': params.filterOutBeatClock,
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,             # <<<<<<<<<<<<<<
 *             'numControlTransforms': params.numControlTransforms,
 *             'numMaps': params.numMaps
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt8(__pyx_v_params->filterOutAllControls); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4910, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_filterOutAllControls, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4911
 *             'filterOutTuneRequest': params.filterOutTuneRequest,
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,             # <<<<<<<<<<<<<<
 *             'numMaps': params.numMaps
 *         }
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt16(__pyx_v_params->numControlTransforms); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4911, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numControlTransforms, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "coremusic/capi.pyx":4912
 *             'filterOutAllControls': params.filterOutAllControls,
 *             'numControlTransforms': params.numControlTransforms,
 *             'numMaps': params.numMaps             # <<<<<<<<<<<<<<
 *         }
 * 
*/
    __pyx_t_5 = __Pyx_PyLong_From_UInt16(__pyx_v_params->numMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4912, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numMaps, __pyx_t_5) < (0)) __PYX_ERR(0, 4892, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "coremusic/capi.pyx":4916
 * 
 *         # Add sources
 *         for i in range(params.numSources):             # <<<<<<<<<<<<<<
 *             source = {
 *                 'endpointRef': params.sources[i].endpointRef,
*/
    __pyx_t_9 = __pyx_v_params->numSources;
    __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":4918
 *         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, 4918, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyLong_From_UInt32((__pyx_v_params->sources[__pyx_v_i]).endpointRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4918, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_t_5) < (0)) __PYX_ERR(0, 4918, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "coremusic/capi.pyx":4919
 *             source = {
 *                 'endpointRef': params.sources[i].endpointRef,
 *                 'uniqueID': params.sources[i].uniqueID             # <<<<<<<<<<<<<<
 *             }
 *             result['sources'].append(source)
*/
      __pyx_t_5 = __Pyx_PyLong_From_UInt32((__pyx_v_params->sources[__pyx_v_i]).uniqueID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4919, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_t_5) < (0)) __PYX_ERR(0, 4918, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_source, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":4921
 *                 '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, 4921, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_source); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 4921, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "coremusic/capi.pyx":4924
 * 
 *         # Add destinations
 *         for i in range(params.numDestinations):             # <<<<<<<<<<<<<<
 *             dest = {
 *                 'endpointRef': params.destinations[i].endpointRef,
*/
    __pyx_t_9 = __pyx_v_params->numDestinations;
    __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":4926
 *         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, 4926, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyLong_From_UInt32((__pyx_v_params->destinations[__pyx_v_i]).endpointRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4926, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_t_5) < (0)) __PYX_ERR(0, 4926, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "coremusic/capi.pyx":4927
 *             dest = {
 *                 'endpointRef': params.destinations[i].endpointRef,
 *                 'uniqueID': params.destinations[i].uniqueID             # <<<<<<<<<<<<<<
 *             }
 *             result['destinations'].append(dest)
*/
      __pyx_t_5 = __Pyx_PyLong_From_UInt32((__pyx_v_params->destinations[__pyx_v_i]).uniqueID); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4927, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_t_5) < (0)) __PYX_ERR(0, 4926, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_dest, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "coremusic/capi.pyx":4929
 *                 '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, 4929, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_dest); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 4929, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "coremusic/capi.pyx":4931
 *             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":4934
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
  /*finally:*/ {
    __pyx_L5_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_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_XDECREF(__pyx_t_6); __pyx_t_6 = 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;
      {
        __pyx_t_1 = (__pyx_v_cf_params != 0);
        if (__pyx_t_1) {

          /* "coremusic/capi.pyx":4935
 *     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":4934
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_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_L4_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_1 = (__pyx_v_cf_params != 0);
      if (__pyx_t_1) {

        /* "coremusic/capi.pyx":4935
 *     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":4934
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4856
 *     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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":4937
 *             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_699midi_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_698midi_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  f OSStatus result code\n\nRaises:\n    RuntimeError: If setting parameters fails");
static PyMethodDef __pyx_mdef_9coremusic_4capi_699midi_thru_connection_set_params = {"midi_thru_connection_set_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_699midi_thru_connection_set_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_698midi_thru_connection_set_params};
static PyObject *__pyx_pw_9coremusic_4capi_699midi_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, 4937, __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, 4937, __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, 4937, __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, 4937, __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, 4937, __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, 4937, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4937, __pyx_L3_error)
    }
    __pyx_v_connection = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_connection == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4937, __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, 4937, __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, 4937, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_698midi_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_698midi_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;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  int __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_set_params", 0);

  /* "coremusic/capi.pyx":4952
 *     # 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":4955
 * 
 *     # 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, 4955, __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, 4955, __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, 4955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.version = __pyx_t_2;

  /* "coremusic/capi.pyx":4958
 * 
 *     # 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, 4958, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4958, __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, 4958, __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":4959
 *     # 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, 4959, __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":4960
 *     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":4961
 *     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); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4961, __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":4962
 *     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); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4962, __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, 4962, __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[11], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4962, __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, 4962, __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":4963
 *         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); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4963, __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, 4963, __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[12], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4963, __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, 4963, __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":4961
 *     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":4966
 * 
 *     # 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, 4966, __pyx_L1_error)
  }
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4966, __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, 4966, __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":4967
 *     # 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, 4967, __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":4968
 *     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":4969
 *     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); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4969, __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":4970
 *     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); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4970, __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, 4970, __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[11], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4970, __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, 4970, __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":4971
 *         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); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4971, __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, 4971, __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[12], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4971, __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, 4971, __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":4969
 *     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":4974
 * 
 *     # 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, 4974, __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, 4974, __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, 4974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutSysEx = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":4975
 *     # 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, 4975, __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, 4975, __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, 4975, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutMTC = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":4976
 *     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, 4976, __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, 4976, __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, 4976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutBeatClock = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":4977
 *     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, 4977, __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, 4977, __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, 4977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_params.filterOutAllControls = ((UInt8)__pyx_t_12);

  /* "coremusic/capi.pyx":4980
 * 
 *     # 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":4987
 * 
 *     cdef cf.OSStatus status
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionSetParams(
 *             <cm.MIDIThruConnectionRef>connection, cf_params
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":4988
 *     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":4992
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionSetParams failed with status: {status}")
 * 
*/
    __pyx_t_7 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_7)) {

      /* "coremusic/capi.pyx":4993
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIThruConnectionSetParams failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         return status
*/
      __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_13 = __pyx_builtin_RuntimeError; 
      __pyx_t_14 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4993, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_t_14, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4993, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIThruConnectionSetParams_fail, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4993, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_16 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_14};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4993, __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, 4993, __pyx_L10_error)

      /* "coremusic/capi.pyx":4992
 *         )
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionSetParams failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":4995
 *             raise RuntimeError(f"MIDIThruConnectionSetParams failed with status: {status}")
 * 
 *         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, 4995, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L9_return;
  }

  /* "coremusic/capi.pyx":4998
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
  /*finally:*/ {
    __pyx_L10_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_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_17 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
      {
        __pyx_t_7 = (__pyx_v_cf_params != 0);
        if (__pyx_t_7) {

          /* "coremusic/capi.pyx":4999
 *     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":4998
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
        }
      }
      __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_17; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
      goto __pyx_L1_error;
    }
    __pyx_L9_return: {
      __pyx_t_25 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_7 = (__pyx_v_cf_params != 0);
      if (__pyx_t_7) {

        /* "coremusic/capi.pyx":4999
 *     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":4998
 * 
 *     finally:
 *         if cf_params:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_params)
 * 
*/
      }
      __pyx_r = __pyx_t_25;
      __pyx_t_25 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":4937
 *             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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __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":5001
 *             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_701midi_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_700midi_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_701midi_thru_connection_find = {"midi_thru_connection_find", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_701midi_thru_connection_find, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_700midi_thru_connection_find};
static PyObject *__pyx_pw_9coremusic_4capi_701midi_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, 5001, __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, 5001, __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, 5001, __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, 5001, __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, 5001, __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, 5001, __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, 5001, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_700midi_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_700midi_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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  CFIndex __pyx_t_9;
  CFIndex __pyx_t_10;
  CFIndex __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("midi_thru_connection_find", 0);

  /* "coremusic/capi.pyx":5013
 *         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, 5013, __pyx_L1_error)
  }
  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_persistent_owner_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_owner_id_bytes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "coremusic/capi.pyx":5015
 *     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, 5015, __pyx_L1_error)

  /* "coremusic/capi.pyx":5014
 *     """
 *     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":5025
 *     cdef cm.MIDIThruConnectionRef* connections
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
*/
  /*try:*/ {

    /* "coremusic/capi.pyx":5026
 * 
 *     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":5028
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionFind failed with status: {status}")
 * 
*/
    __pyx_t_3 = (__pyx_v_status != 0);
    if (unlikely(__pyx_t_3)) {

      /* "coremusic/capi.pyx":5029
 * 
 *         if status != 0:
 *             raise RuntimeError(f"MIDIThruConnectionFind failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *         # Extract the connection list
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_RuntimeError);
      __pyx_t_5 = __pyx_builtin_RuntimeError; 
      __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5029, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5029, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_MIDIThruConnectionFind_failed_wi, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5029, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5029, __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, 5029, __pyx_L4_error)

      /* "coremusic/capi.pyx":5028
 *         status = cm.MIDIThruConnectionFind(cf_owner_id, &cf_connection_list)
 * 
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"MIDIThruConnectionFind failed with status: {status}")
 * 
*/
    }

    /* "coremusic/capi.pyx":5032
 * 
 *         # 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":5033
 *         # 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":5036
 * 
 *         # Each connection is a MIDIThruConnectionRef (which is a MIDIObjectRef)
 *         num_connections = data_length // sizeof(cm.MIDIThruConnectionRef)             # <<<<<<<<<<<<<<
 *         connections = <cm.MIDIThruConnectionRef*>data_ptr
 * 
*/
    __pyx_t_8 = (sizeof(MIDIThruConnectionRef));
    if (unlikely(__pyx_t_8 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(0, 5036, __pyx_L4_error)
    }
    __pyx_v_num_connections = (__pyx_v_data_length / __pyx_t_8);

    /* "coremusic/capi.pyx":5037
 *         # 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":5039
 *         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, 5039, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "coremusic/capi.pyx":5040
 * 
 *         result = []
 *         for i in range(num_connections):             # <<<<<<<<<<<<<<
 *             result.append(connections[i])
 * 
*/
    __pyx_t_9 = __pyx_v_num_connections;
    __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":5041
 *         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, 5041, __pyx_L4_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, 5041, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "coremusic/capi.pyx":5043
 *             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":5046
 * 
 *     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_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_4); __pyx_t_4 = 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_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;
      {
        __pyx_t_3 = (__pyx_v_cf_owner_id != 0);
        if (__pyx_t_3) {

          /* "coremusic/capi.pyx":5047
 *     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":5046
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
        }

        /* "coremusic/capi.pyx":5048
 *         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":5049
 *             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":5048
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_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_L3_return: {
      __pyx_t_21 = __pyx_r;
      __pyx_r = 0;

      /* "coremusic/capi.pyx":5046
 * 
 *     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":5047
 *     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":5046
 * 
 *     finally:
 *         if cf_owner_id:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:
*/
      }

      /* "coremusic/capi.pyx":5048
 *         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":5049
 *             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":5048
 *         if cf_owner_id:
 *             cf.CFRelease(cf_owner_id)
 *         if cf_connection_list:             # <<<<<<<<<<<<<<
 *             cf.CFRelease(cf_connection_list)
 * 
*/
      }
      __pyx_r = __pyx_t_21;
      __pyx_t_21 = 0;
      goto __pyx_L0;
    }
  }

  /* "coremusic/capi.pyx":5001
 *             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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":5053
 * # 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_703get_midi_transform_none(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_702get_midi_transform_none, "get_midi_transform_none()\n\nGet the 'None' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_703get_midi_transform_none = {"get_midi_transform_none", (PyCFunction)__pyx_pw_9coremusic_4capi_703get_midi_transform_none, METH_NOARGS, __pyx_doc_9coremusic_4capi_702get_midi_transform_none};
static PyObject *__pyx_pw_9coremusic_4capi_703get_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_702get_midi_transform_none(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_702get_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":5055
 * 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, 5055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5053
 * # 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":5057
 *     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_705get_midi_transform_filter_out(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_704get_midi_transform_filter_out, "get_midi_transform_filter_out()\n\nGet the 'FilterOut' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_705get_midi_transform_filter_out = {"get_midi_transform_filter_out", (PyCFunction)__pyx_pw_9coremusic_4capi_705get_midi_transform_filter_out, METH_NOARGS, __pyx_doc_9coremusic_4capi_704get_midi_transform_filter_out};
static PyObject *__pyx_pw_9coremusic_4capi_705get_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_704get_midi_transform_filter_out(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_704get_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":5059
 * 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, 5059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5057
 *     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":5061
 *     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_707get_midi_transform_map_control(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_706get_midi_transform_map_control, "get_midi_transform_map_control()\n\nGet the 'MapControl' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_707get_midi_transform_map_control = {"get_midi_transform_map_control", (PyCFunction)__pyx_pw_9coremusic_4capi_707get_midi_transform_map_control, METH_NOARGS, __pyx_doc_9coremusic_4capi_706get_midi_transform_map_control};
static PyObject *__pyx_pw_9coremusic_4capi_707get_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_706get_midi_transform_map_control(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_706get_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":5063
 * 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, 5063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5061
 *     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":5065
 *     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_709get_midi_transform_add(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_708get_midi_transform_add, "get_midi_transform_add()\n\nGet the 'Add' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_709get_midi_transform_add = {"get_midi_transform_add", (PyCFunction)__pyx_pw_9coremusic_4capi_709get_midi_transform_add, METH_NOARGS, __pyx_doc_9coremusic_4capi_708get_midi_transform_add};
static PyObject *__pyx_pw_9coremusic_4capi_709get_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_708get_midi_transform_add(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_708get_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":5067
 * 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, 5067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5065
 *     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":5069
 *     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_711get_midi_transform_scale(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_710get_midi_transform_scale, "get_midi_transform_scale()\n\nGet the 'Scale' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_711get_midi_transform_scale = {"get_midi_transform_scale", (PyCFunction)__pyx_pw_9coremusic_4capi_711get_midi_transform_scale, METH_NOARGS, __pyx_doc_9coremusic_4capi_710get_midi_transform_scale};
static PyObject *__pyx_pw_9coremusic_4capi_711get_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_710get_midi_transform_scale(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_710get_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":5071
 * 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, 5071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5069
 *     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":5073
 *     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_713get_midi_transform_min_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_712get_midi_transform_min_value, "get_midi_transform_min_value()\n\nGet the 'MinValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_713get_midi_transform_min_value = {"get_midi_transform_min_value", (PyCFunction)__pyx_pw_9coremusic_4capi_713get_midi_transform_min_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_712get_midi_transform_min_value};
static PyObject *__pyx_pw_9coremusic_4capi_713get_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_712get_midi_transform_min_value(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_712get_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":5075
 * 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, 5075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5073
 *     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":5077
 *     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_715get_midi_transform_max_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_714get_midi_transform_max_value, "get_midi_transform_max_value()\n\nGet the 'MaxValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_715get_midi_transform_max_value = {"get_midi_transform_max_value", (PyCFunction)__pyx_pw_9coremusic_4capi_715get_midi_transform_max_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_714get_midi_transform_max_value};
static PyObject *__pyx_pw_9coremusic_4capi_715get_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_714get_midi_transform_max_value(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_714get_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":5079
 * 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, 5079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5077
 *     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":5081
 *     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_717get_midi_transform_map_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_716get_midi_transform_map_value, "get_midi_transform_map_value()\n\nGet the 'MapValue' transform type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_717get_midi_transform_map_value = {"get_midi_transform_map_value", (PyCFunction)__pyx_pw_9coremusic_4capi_717get_midi_transform_map_value, METH_NOARGS, __pyx_doc_9coremusic_4capi_716get_midi_transform_map_value};
static PyObject *__pyx_pw_9coremusic_4capi_717get_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_716get_midi_transform_map_value(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_716get_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":5083
 * 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, 5083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5081
 *     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":5085
 *     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_719get_midi_control_type_7bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_718get_midi_control_type_7bit, "get_midi_control_type_7bit()\n\nGet the '7Bit' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_719get_midi_control_type_7bit = {"get_midi_control_type_7bit", (PyCFunction)__pyx_pw_9coremusic_4capi_719get_midi_control_type_7bit, METH_NOARGS, __pyx_doc_9coremusic_4capi_718get_midi_control_type_7bit};
static PyObject *__pyx_pw_9coremusic_4capi_719get_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_718get_midi_control_type_7bit(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_718get_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":5087
 * 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, 5087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5085
 *     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":5089
 *     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_721get_midi_control_type_14bit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_720get_midi_control_type_14bit, "get_midi_control_type_14bit()\n\nGet the '14Bit' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_721get_midi_control_type_14bit = {"get_midi_control_type_14bit", (PyCFunction)__pyx_pw_9coremusic_4capi_721get_midi_control_type_14bit, METH_NOARGS, __pyx_doc_9coremusic_4capi_720get_midi_control_type_14bit};
static PyObject *__pyx_pw_9coremusic_4capi_721get_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_720get_midi_control_type_14bit(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_720get_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":5091
 * 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, 5091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5089
 *     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":5093
 *     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_723get_midi_control_type_7bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_722get_midi_control_type_7bit_rpn, "get_midi_control_type_7bit_rpn()\n\nGet the '7BitRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_723get_midi_control_type_7bit_rpn = {"get_midi_control_type_7bit_rpn", (PyCFunction)__pyx_pw_9coremusic_4capi_723get_midi_control_type_7bit_rpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_722get_midi_control_type_7bit_rpn};
static PyObject *__pyx_pw_9coremusic_4capi_723get_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_722get_midi_control_type_7bit_rpn(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_722get_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":5095
 * 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, 5095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5093
 *     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":5097
 *     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_725get_midi_control_type_14bit_rpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_724get_midi_control_type_14bit_rpn, "get_midi_control_type_14bit_rpn()\n\nGet the '14BitRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_725get_midi_control_type_14bit_rpn = {"get_midi_control_type_14bit_rpn", (PyCFunction)__pyx_pw_9coremusic_4capi_725get_midi_control_type_14bit_rpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_724get_midi_control_type_14bit_rpn};
static PyObject *__pyx_pw_9coremusic_4capi_725get_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_724get_midi_control_type_14bit_rpn(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_724get_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":5099
 * 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, 5099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5097
 *     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":5101
 *     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_727get_midi_control_type_7bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_726get_midi_control_type_7bit_nrpn, "get_midi_control_type_7bit_nrpn()\n\nGet the '7BitNRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_727get_midi_control_type_7bit_nrpn = {"get_midi_control_type_7bit_nrpn", (PyCFunction)__pyx_pw_9coremusic_4capi_727get_midi_control_type_7bit_nrpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_726get_midi_control_type_7bit_nrpn};
static PyObject *__pyx_pw_9coremusic_4capi_727get_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_726get_midi_control_type_7bit_nrpn(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_726get_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":5103
 * 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, 5103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5101
 *     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":5105
 *     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_729get_midi_control_type_14bit_nrpn(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_728get_midi_control_type_14bit_nrpn, "get_midi_control_type_14bit_nrpn()\n\nGet the '14BitNRPN' control type constant.");
static PyMethodDef __pyx_mdef_9coremusic_4capi_729get_midi_control_type_14bit_nrpn = {"get_midi_control_type_14bit_nrpn", (PyCFunction)__pyx_pw_9coremusic_4capi_729get_midi_control_type_14bit_nrpn, METH_NOARGS, __pyx_doc_9coremusic_4capi_728get_midi_control_type_14bit_nrpn};
static PyObject *__pyx_pw_9coremusic_4capi_729get_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_728get_midi_control_type_14bit_nrpn(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_728get_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":5107
 * 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, 5107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5105
 *     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":5109
 *     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_731get_midi_thru_connection_max_endpoints(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_730get_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_731get_midi_thru_connection_max_endpoints = {"get_midi_thru_connection_max_endpoints", (PyCFunction)__pyx_pw_9coremusic_4capi_731get_midi_thru_connection_max_endpoints, METH_NOARGS, __pyx_doc_9coremusic_4capi_730get_midi_thru_connection_max_endpoints};
static PyObject *__pyx_pw_9coremusic_4capi_731get_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_730get_midi_thru_connection_max_endpoints(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_730get_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":5111
 * 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":5109
 *     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":5133
 *     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":5134
 * 
 *     def __cinit__(self):
 *         self._object_id = 0             # <<<<<<<<<<<<<<
 *         self._is_disposed = False
 * 
*/
  __pyx_v_self->_object_id = 0;

  /* "coremusic/capi.pyx":5135
 *     def __cinit__(self):
 *         self._object_id = 0
 *         self._is_disposed = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __pyx_v_self->_is_disposed = 0;

  /* "coremusic/capi.pyx":5133
 *     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":5137
 *         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":5139
 *     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":5140
 *         """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, 5140, __pyx_L1_error)

    /* "coremusic/capi.pyx":5139
 *     def __dealloc__(self):
 *         """Automatic cleanup when object is garbage collected"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  }

  /* "coremusic/capi.pyx":5137
 *         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":5142
 *             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":5145
 *     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, 5145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5142
 *             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":5147
 *         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":5149
 *     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":5150
 *         """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, 5150, __pyx_L1_error)

    /* "coremusic/capi.pyx":5149
 *     def dispose(self) -> None:
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:             # <<<<<<<<<<<<<<
 *             self._dispose_internal()
 * 
*/
  }

  /* "coremusic/capi.pyx":5147
 *         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":5152
 *             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":5154
 *     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":5155
 *         """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":5152
 *             self._dispose_internal()
 * 
 *     cdef void _dispose_internal(self):             # <<<<<<<<<<<<<<
 *         """Internal disposal implementation"""
 *         self._is_disposed = True
*/

  /* function exit code */
}

/* "coremusic/capi.pyx":5157
 *         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;
  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("_ensure_not_disposed", 0);

  /* "coremusic/capi.pyx":5159
 *     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":5160
 *         """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_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_3 = __pyx_builtin_RuntimeError; 
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_has_been_disposed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5160, __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_2, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __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_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5160, __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, 5160, __pyx_L1_error)

    /* "coremusic/capi.pyx":5159
 *     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":5157
 *         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_XDECREF(__pyx_t_5);
  __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":5162
 *             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":5165
 *     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, 5165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5162
 *             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":5167
 *         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, 5167, __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, 5167, __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, 5167, __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, 5167, __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, 5167, __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, 5167, __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, 5167, __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":5169
 *     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, 5169, __pyx_L1_error)
  __pyx_v_self->_object_id = __pyx_t_1;

  /* "coremusic/capi.pyx":5167
 *         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(__pyx_builtin_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(__pyx_builtin_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":5176
 * # ============================================================================
 * 
 * def au_graph_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_733au_graph_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_732au_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_733au_graph_new = {"au_graph_new", (PyCFunction)__pyx_pw_9coremusic_4capi_733au_graph_new, METH_NOARGS, __pyx_doc_9coremusic_4capi_732au_graph_new};
static PyObject *__pyx_pw_9coremusic_4capi_733au_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_732au_graph_new(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_732au_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;
  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("au_graph_new", 0);

  /* "coremusic/capi.pyx":5188
 *     cdef cf.OSStatus status
 * 
 *     status = at.NewAUGraph(&graph)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"NewAUGraph failed with status: {status}")
*/
  __pyx_v_status = NewAUGraph((&__pyx_v_graph));

  /* "coremusic/capi.pyx":5189
 * 
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewAUGraph failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5190
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:
 *         raise RuntimeError(f"NewAUGraph failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return <long>graph
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_NewAUGraph_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5190, __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, 5190, __pyx_L1_error)

    /* "coremusic/capi.pyx":5189
 * 
 *     status = at.NewAUGraph(&graph)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"NewAUGraph failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5192
 *         raise RuntimeError(f"NewAUGraph failed with status: {status}")
 * 
 *     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, 5192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyLong_CheckExact(__pyx_t_2)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(0, 5192, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5176
 * # ============================================================================
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5195
 * 
 * 
 * def au_graph_dispose(long graph_id):             # <<<<<<<<<<<<<<
 *     """Dispose an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_735au_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_734au_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_735au_graph_dispose = {"au_graph_dispose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_735au_graph_dispose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_734au_graph_dispose};
static PyObject *__pyx_pw_9coremusic_4capi_735au_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, 5195, __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, 5195, __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, 5195, __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, 5195, __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, 5195, __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, 5195, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_dispose", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5195, __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_734au_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_734au_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;
  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("au_graph_dispose", 0);

  /* "coremusic/capi.pyx":5204
 *         RuntimeError: If disposal fails
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"DisposeAUGraph failed with status: {status}")
*/
  __pyx_v_status = DisposeAUGraph(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5205
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeAUGraph failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5206
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"DisposeAUGraph failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_DisposeAUGraph_failed_with_statu, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __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, 5206, __pyx_L1_error)

    /* "coremusic/capi.pyx":5205
 *     """
 *     cdef cf.OSStatus status = at.DisposeAUGraph(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"DisposeAUGraph failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5195
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5209
 * 
 * 
 * def au_graph_open(long graph_id):             # <<<<<<<<<<<<<<
 *     """Open an AUGraph (opens AudioUnits but doesn't initialize)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_737au_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_736au_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_737au_graph_open = {"au_graph_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_737au_graph_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_736au_graph_open};
static PyObject *__pyx_pw_9coremusic_4capi_737au_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, 5209, __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, 5209, __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, 5209, __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, 5209, __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, 5209, __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, 5209, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_open", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5209, __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_736au_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_736au_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;
  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("au_graph_open", 0);

  /* "coremusic/capi.pyx":5218
 *         RuntimeError: If open fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphOpen failed with status: {status}")
*/
  __pyx_v_status = AUGraphOpen(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5219
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphOpen failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5220
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphOpen failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphOpen_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5220, __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, 5220, __pyx_L1_error)

    /* "coremusic/capi.pyx":5219
 *     """
 *     cdef cf.OSStatus status = at.AUGraphOpen(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphOpen failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5209
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5223
 * 
 * 
 * def au_graph_close(long graph_id):             # <<<<<<<<<<<<<<
 *     """Close an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_739au_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_738au_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_739au_graph_close = {"au_graph_close", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_739au_graph_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_738au_graph_close};
static PyObject *__pyx_pw_9coremusic_4capi_739au_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, 5223, __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, 5223, __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, 5223, __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, 5223, __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, 5223, __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, 5223, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_close", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5223, __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_738au_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_738au_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;
  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("au_graph_close", 0);

  /* "coremusic/capi.pyx":5232
 *         RuntimeError: If close fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphClose failed with status: {status}")
*/
  __pyx_v_status = AUGraphClose(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5233
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphClose failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5234
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphClose failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphClose_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5234, __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, 5234, __pyx_L1_error)

    /* "coremusic/capi.pyx":5233
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClose(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphClose failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5223
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5237
 * 
 * 
 * def au_graph_initialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Initialize an AUGraph (prepares for rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_741au_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_740au_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_741au_graph_initialize = {"au_graph_initialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_741au_graph_initialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_740au_graph_initialize};
static PyObject *__pyx_pw_9coremusic_4capi_741au_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, 5237, __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, 5237, __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, 5237, __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, 5237, __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, 5237, __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, 5237, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_initialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5237, __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_740au_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_740au_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;
  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("au_graph_initialize", 0);

  /* "coremusic/capi.pyx":5246
 *         RuntimeError: If initialization fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphInitialize failed with status: {status}")
*/
  __pyx_v_status = AUGraphInitialize(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5247
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphInitialize failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5248
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphInitialize failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphInitialize_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5248, __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, 5248, __pyx_L1_error)

    /* "coremusic/capi.pyx":5247
 *     """
 *     cdef cf.OSStatus status = at.AUGraphInitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphInitialize failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5237
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5251
 * 
 * 
 * def au_graph_uninitialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an AUGraph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_743au_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_742au_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_743au_graph_uninitialize = {"au_graph_uninitialize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_743au_graph_uninitialize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_742au_graph_uninitialize};
static PyObject *__pyx_pw_9coremusic_4capi_743au_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, 5251, __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, 5251, __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, 5251, __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, 5251, __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, 5251, __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, 5251, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_uninitialize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5251, __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_742au_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_742au_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;
  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("au_graph_uninitialize", 0);

  /* "coremusic/capi.pyx":5260
 *         RuntimeError: If uninitialization fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphUninitialize failed with status: {status}")
*/
  __pyx_v_status = AUGraphUninitialize(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5261
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphUninitialize failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5262
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphUninitialize failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphUninitialize_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5262, __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, 5262, __pyx_L1_error)

    /* "coremusic/capi.pyx":5261
 *     """
 *     cdef cf.OSStatus status = at.AUGraphUninitialize(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphUninitialize failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5251
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5265
 * 
 * 
 * def au_graph_start(long graph_id):             # <<<<<<<<<<<<<<
 *     """Start an AUGraph (begins rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_745au_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_744au_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_745au_graph_start = {"au_graph_start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_745au_graph_start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_744au_graph_start};
static PyObject *__pyx_pw_9coremusic_4capi_745au_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, 5265, __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, 5265, __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, 5265, __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, 5265, __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, 5265, __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, 5265, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5265, __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_744au_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_744au_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;
  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("au_graph_start", 0);

  /* "coremusic/capi.pyx":5274
 *         RuntimeError: If start fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphStart failed with status: {status}")
*/
  __pyx_v_status = AUGraphStart(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5275
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphStart failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5276
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphStart failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphStart_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5276, __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, 5276, __pyx_L1_error)

    /* "coremusic/capi.pyx":5275
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStart(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphStart failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5265
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5279
 * 
 * 
 * def au_graph_stop(long graph_id):             # <<<<<<<<<<<<<<
 *     """Stop an AUGraph (stops rendering)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_747au_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_746au_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_747au_graph_stop = {"au_graph_stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_747au_graph_stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_746au_graph_stop};
static PyObject *__pyx_pw_9coremusic_4capi_747au_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, 5279, __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, 5279, __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, 5279, __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, 5279, __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, 5279, __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, 5279, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_stop", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5279, __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_746au_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_746au_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;
  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("au_graph_stop", 0);

  /* "coremusic/capi.pyx":5288
 *         RuntimeError: If stop fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphStop failed with status: {status}")
*/
  __pyx_v_status = AUGraphStop(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5289
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphStop failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5290
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphStop failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphStop_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5290, __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, 5290, __pyx_L1_error)

    /* "coremusic/capi.pyx":5289
 *     """
 *     cdef cf.OSStatus status = at.AUGraphStop(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphStop failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5279
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5293
 * 
 * 
 * def au_graph_is_open(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is open
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_749au_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_748au_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_749au_graph_is_open = {"au_graph_is_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_749au_graph_is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_748au_graph_is_open};
static PyObject *__pyx_pw_9coremusic_4capi_749au_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, 5293, __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, 5293, __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, 5293, __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, 5293, __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, 5293, __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, 5293, __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, 5293, __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_748au_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_748au_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;
  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("au_graph_is_open", 0);

  /* "coremusic/capi.pyx":5306
 *     """
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsOpen failed with status: {status}")
*/
  __pyx_v_status = AUGraphIsOpen(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_open));

  /* "coremusic/capi.pyx":5307
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsOpen failed with status: {status}")
 *     return bool(is_open)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5308
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsOpen failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return bool(is_open)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphIsOpen_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5308, __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, 5308, __pyx_L1_error)

    /* "coremusic/capi.pyx":5307
 *     cdef cf.Boolean is_open
 *     cdef cf.OSStatus status = at.AUGraphIsOpen(<at.AUGraph>graph_id, &is_open)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsOpen failed with status: {status}")
 *     return bool(is_open)
*/
  }

  /* "coremusic/capi.pyx":5309
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsOpen failed with status: {status}")
 *     return bool(is_open)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_Boolean(__pyx_v_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5293
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5312
 * 
 * 
 * def au_graph_is_initialized(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is initialized
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_751au_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_750au_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_751au_graph_is_initialized = {"au_graph_is_initialized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_751au_graph_is_initialized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_750au_graph_is_initialized};
static PyObject *__pyx_pw_9coremusic_4capi_751au_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, 5312, __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, 5312, __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, 5312, __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, 5312, __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, 5312, __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, 5312, __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, 5312, __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_750au_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_750au_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;
  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("au_graph_is_initialized", 0);

  /* "coremusic/capi.pyx":5325
 *     """
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsInitialized failed with status: {status}")
*/
  __pyx_v_status = AUGraphIsInitialized(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_initialized));

  /* "coremusic/capi.pyx":5326
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsInitialized failed with status: {status}")
 *     return bool(is_initialized)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5327
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsInitialized failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return bool(is_initialized)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphIsInitialized_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5327, __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, 5327, __pyx_L1_error)

    /* "coremusic/capi.pyx":5326
 *     cdef cf.Boolean is_initialized
 *     cdef cf.OSStatus status = at.AUGraphIsInitialized(<at.AUGraph>graph_id, &is_initialized)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsInitialized failed with status: {status}")
 *     return bool(is_initialized)
*/
  }

  /* "coremusic/capi.pyx":5328
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsInitialized failed with status: {status}")
 *     return bool(is_initialized)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_Boolean(__pyx_v_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5312
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5331
 * 
 * 
 * def au_graph_is_running(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is running
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_753au_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_752au_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_753au_graph_is_running = {"au_graph_is_running", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_753au_graph_is_running, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_752au_graph_is_running};
static PyObject *__pyx_pw_9coremusic_4capi_753au_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, 5331, __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, 5331, __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, 5331, __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, 5331, __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, 5331, __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, 5331, __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, 5331, __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_752au_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_752au_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;
  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("au_graph_is_running", 0);

  /* "coremusic/capi.pyx":5344
 *     """
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsRunning failed with status: {status}")
*/
  __pyx_v_status = AUGraphIsRunning(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_running));

  /* "coremusic/capi.pyx":5345
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsRunning failed with status: {status}")
 *     return bool(is_running)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5346
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsRunning failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return bool(is_running)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphIsRunning_failed_with_sta, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5346, __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, 5346, __pyx_L1_error)

    /* "coremusic/capi.pyx":5345
 *     cdef cf.Boolean is_running
 *     cdef cf.OSStatus status = at.AUGraphIsRunning(<at.AUGraph>graph_id, &is_running)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphIsRunning failed with status: {status}")
 *     return bool(is_running)
*/
  }

  /* "coremusic/capi.pyx":5347
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphIsRunning failed with status: {status}")
 *     return bool(is_running)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_Boolean(__pyx_v_is_running); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5331
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5350
 * 
 * 
 * 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_755au_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_754au_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_755au_graph_add_node = {"au_graph_add_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_755au_graph_add_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_754au_graph_add_node};
static PyObject *__pyx_pw_9coremusic_4capi_755au_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, 5350, __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, 5350, __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, 5350, __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, 5350, __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, 5350, __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, 5350, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5350, __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, 5350, __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, 5350, __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, 5350, __pyx_L1_error)
  __pyx_r = __pyx_pf_9coremusic_4capi_754au_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_754au_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;
  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("au_graph_add_node", 0);

  /* "coremusic/capi.pyx":5369
 * 
 *     # 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, 5369, __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, 5369, __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, 5369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentType = __pyx_t_2;

  /* "coremusic/capi.pyx":5370
 *     # 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, 5370, __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, 5370, __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, 5370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentSubType = __pyx_t_2;

  /* "coremusic/capi.pyx":5371
 *     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, 5371, __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, 5371, __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, 5371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentManufacturer = __pyx_t_2;

  /* "coremusic/capi.pyx":5372
 *     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, 5372, __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, 5372, __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, 5372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentFlags = __pyx_t_2;

  /* "coremusic/capi.pyx":5373
 *     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, 5373, __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, 5373, __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, 5373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc.componentFlagsMask = __pyx_t_2;

  /* "coremusic/capi.pyx":5375
 *     desc.componentFlagsMask = description.get('flags_mask', 0)
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphAddNode failed with status: {status}")
*/
  __pyx_v_status = AUGraphAddNode(((AUGraph)__pyx_v_graph_id), (&__pyx_v_desc), (&__pyx_v_node));

  /* "coremusic/capi.pyx":5376
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphAddNode failed with status: {status}")
 * 
*/
  __pyx_t_3 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_3)) {

    /* "coremusic/capi.pyx":5377
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphAddNode failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     return node
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_5 = __pyx_builtin_RuntimeError; 
    __pyx_t_6 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphAddNode_failed_with_statu, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5377, __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, 5377, __pyx_L1_error)

    /* "coremusic/capi.pyx":5376
 * 
 *     status = at.AUGraphAddNode(<at.AUGraph>graph_id, &desc, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphAddNode failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5379
 *         raise RuntimeError(f"AUGraphAddNode failed with status: {status}")
 * 
 *     return node             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_SInt32(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyLong_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 5379, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5350
 * 
 * 
 * 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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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":5382
 * 
 * 
 * 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_757au_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_756au_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_757au_graph_remove_node = {"au_graph_remove_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_757au_graph_remove_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_756au_graph_remove_node};
static PyObject *__pyx_pw_9coremusic_4capi_757au_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, 5382, __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, 5382, __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, 5382, __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, 5382, __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, 5382, __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, 5382, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5382, __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, 5382, __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, 5382, __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, 5382, __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_756au_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_756au_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;
  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("au_graph_remove_node", 0);

  /* "coremusic/capi.pyx":5392
 *         RuntimeError: If removing node fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphRemoveNode failed with status: {status}")
*/
  __pyx_v_status = AUGraphRemoveNode(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_node_id));

  /* "coremusic/capi.pyx":5393
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphRemoveNode failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5394
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphRemoveNode failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphRemoveNode_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5394, __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, 5394, __pyx_L1_error)

    /* "coremusic/capi.pyx":5393
 *     """
 *     cdef cf.OSStatus status = at.AUGraphRemoveNode(<at.AUGraph>graph_id, <at.AUNode>node_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphRemoveNode failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5382
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5397
 * 
 * 
 * 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_759au_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_758au_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_759au_graph_get_node_count = {"au_graph_get_node_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_759au_graph_get_node_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_758au_graph_get_node_count};
static PyObject *__pyx_pw_9coremusic_4capi_759au_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, 5397, __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, 5397, __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, 5397, __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, 5397, __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, 5397, __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, 5397, __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, 5397, __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_758au_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_758au_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;
  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("au_graph_get_node_count", 0);

  /* "coremusic/capi.pyx":5410
 *     """
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetNodeCount failed with status: {status}")
*/
  __pyx_v_status = AUGraphGetNodeCount(((AUGraph)__pyx_v_graph_id), (&__pyx_v_count));

  /* "coremusic/capi.pyx":5411
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetNodeCount failed with status: {status}")
 *     return count
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5412
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetNodeCount failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return count
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphGetNodeCount_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5412, __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, 5412, __pyx_L1_error)

    /* "coremusic/capi.pyx":5411
 *     cdef cf.UInt32 count
 *     cdef cf.OSStatus status = at.AUGraphGetNodeCount(<at.AUGraph>graph_id, &count)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetNodeCount failed with status: {status}")
 *     return count
*/
  }

  /* "coremusic/capi.pyx":5413
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetNodeCount failed with status: {status}")
 *     return count             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_UInt32(__pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyLong_CheckExact(__pyx_t_2)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(0, 5413, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5397
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5416
 * 
 * 
 * def au_graph_get_ind_node(long graph_id, int index) -> int:             # <<<<<<<<<<<<<<
 *     """Get node at index
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_761au_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_760au_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_761au_graph_get_ind_node = {"au_graph_get_ind_node", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_761au_graph_get_ind_node, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_760au_graph_get_ind_node};
static PyObject *__pyx_pw_9coremusic_4capi_761au_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, 5416, __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, 5416, __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, 5416, __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, 5416, __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, 5416, __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, 5416, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5416, __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, 5416, __pyx_L3_error)
    __pyx_v_index = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5416, __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, 5416, __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_760au_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_760au_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;
  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("au_graph_get_ind_node", 0);

  /* "coremusic/capi.pyx":5430
 *     """
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetIndNode failed with status: {status}")
*/
  __pyx_v_status = AUGraphGetIndNode(((AUGraph)__pyx_v_graph_id), __pyx_v_index, (&__pyx_v_node));

  /* "coremusic/capi.pyx":5431
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetIndNode failed with status: {status}")
 *     return node
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5432
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetIndNode failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return node
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphGetIndNode_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5432, __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, 5432, __pyx_L1_error)

    /* "coremusic/capi.pyx":5431
 *     cdef at.AUNode node
 *     cdef cf.OSStatus status = at.AUGraphGetIndNode(<at.AUGraph>graph_id, index, &node)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetIndNode failed with status: {status}")
 *     return node
*/
  }

  /* "coremusic/capi.pyx":5433
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetIndNode failed with status: {status}")
 *     return node             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_SInt32(__pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyLong_CheckExact(__pyx_t_2)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(0, 5433, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5416
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5436
 * 
 * 
 * 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_763au_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_762au_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_763au_graph_node_info = {"au_graph_node_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_763au_graph_node_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_762au_graph_node_info};
static PyObject *__pyx_pw_9coremusic_4capi_763au_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, 5436, __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, 5436, __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, 5436, __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, 5436, __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, 5436, __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, 5436, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5436, __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, 5436, __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, 5436, __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, 5436, __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_762au_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_762au_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;
  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("au_graph_node_info", 0);

  /* "coremusic/capi.pyx":5453
 *     cdef cf.OSStatus status
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphNodeInfo failed with status: {status}")
*/
  __pyx_v_status = AUGraphNodeInfo(((AUGraph)__pyx_v_graph_id), ((AUNode)__pyx_v_node_id), (&__pyx_v_desc), (&__pyx_v_audio_unit));

  /* "coremusic/capi.pyx":5454
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphNodeInfo failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5455
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphNodeInfo failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 *     desc_dict = {
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphNodeInfo_failed_with_stat, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5455, __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, 5455, __pyx_L1_error)

    /* "coremusic/capi.pyx":5454
 * 
 *     status = at.AUGraphNodeInfo(<at.AUGraph>graph_id, <at.AUNode>node_id, &desc, &audio_unit)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphNodeInfo failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5458
 * 
 *     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, 5458, __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, 5458, __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, 5458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5459
 *     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, 5459, __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, 5458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5460
 *         '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, 5460, __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, 5458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5461
 *         '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, 5461, __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, 5458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":5462
 *         '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, 5462, __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, 5458, __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":5465
 *     }
 * 
 *     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, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5465, __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, 5465, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 5465, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5436
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5468
 * 
 * 
 * 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_765au_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_764au_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_765au_graph_connect_node_input = {"au_graph_connect_node_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_765au_graph_connect_node_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_764au_graph_connect_node_input};
static PyObject *__pyx_pw_9coremusic_4capi_765au_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, 5468, __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, 5468, __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, 5468, __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, 5468, __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, 5468, __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, 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, "au_graph_connect_node_input", 0) < (0)) __PYX_ERR(0, 5468, __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, 5468, __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, 5468, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5468, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5468, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5468, __pyx_L3_error)
      values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5468, __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, 5468, __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, 5468, __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, 5468, __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, 5469, __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, 5469, __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, 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.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_764au_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_764au_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;
  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("au_graph_connect_node_input", 0);

  /* "coremusic/capi.pyx":5484
 *     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":5491
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphConnectNodeInput failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5492
 *     )
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphConnectNodeInput failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphConnectNodeInput_failed_w, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5492, __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, 5492, __pyx_L1_error)

    /* "coremusic/capi.pyx":5491
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphConnectNodeInput failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5468
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5495
 * 
 * 
 * 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_767au_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_766au_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_767au_graph_disconnect_node_input = {"au_graph_disconnect_node_input", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_767au_graph_disconnect_node_input, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_766au_graph_disconnect_node_input};
static PyObject *__pyx_pw_9coremusic_4capi_767au_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, 5495, __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, 5495, __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, 5495, __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, 5495, __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, 5495, __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, 5495, __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, 5495, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5495, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5495, __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, 5495, __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, 5495, __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, 5495, __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, 5495, __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_766au_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_766au_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;
  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("au_graph_disconnect_node_input", 0);

  /* "coremusic/capi.pyx":5508
 *     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":5513
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphDisconnectNodeInput failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5514
 *     )
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphDisconnectNodeInput failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphDisconnectNodeInput_faile, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5514, __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, 5514, __pyx_L1_error)

    /* "coremusic/capi.pyx":5513
 *         dest_input
 *     )
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphDisconnectNodeInput failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5495
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5517
 * 
 * 
 * def au_graph_clear_connections(long graph_id):             # <<<<<<<<<<<<<<
 *     """Clear all connections in a graph
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_769au_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_768au_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_769au_graph_clear_connections = {"au_graph_clear_connections", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_769au_graph_clear_connections, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_768au_graph_clear_connections};
static PyObject *__pyx_pw_9coremusic_4capi_769au_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, 5517, __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, 5517, __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, 5517, __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, 5517, __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, 5517, __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, 5517, __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, 5517, __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_768au_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_768au_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;
  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("au_graph_clear_connections", 0);

  /* "coremusic/capi.pyx":5526
 *         RuntimeError: If clearing connections fails
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphClearConnections failed with status: {status}")
*/
  __pyx_v_status = AUGraphClearConnections(((AUGraph)__pyx_v_graph_id));

  /* "coremusic/capi.pyx":5527
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphClearConnections failed with status: {status}")
 * 
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5528
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphClearConnections failed with status: {status}")             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphClearConnections_failed_w, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5528, __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, 5528, __pyx_L1_error)

    /* "coremusic/capi.pyx":5527
 *     """
 *     cdef cf.OSStatus status = at.AUGraphClearConnections(<at.AUGraph>graph_id)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphClearConnections failed with status: {status}")
 * 
*/
  }

  /* "coremusic/capi.pyx":5517
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5531
 * 
 * 
 * def au_graph_update(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Update the graph after making changes
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9coremusic_4capi_771au_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_770au_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_771au_graph_update = {"au_graph_update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_771au_graph_update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_770au_graph_update};
static PyObject *__pyx_pw_9coremusic_4capi_771au_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, 5531, __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, 5531, __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, 5531, __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, 5531, __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, 5531, __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, 5531, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("au_graph_update", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5531, __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_770au_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_770au_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;
  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("au_graph_update", 0);

  /* "coremusic/capi.pyx":5544
 *     """
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphUpdate failed with status: {status}")
*/
  __pyx_v_status = AUGraphUpdate(((AUGraph)__pyx_v_graph_id), (&__pyx_v_is_updated));

  /* "coremusic/capi.pyx":5545
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphUpdate failed with status: {status}")
 *     return bool(is_updated)
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5546
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphUpdate failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return bool(is_updated)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphUpdate_failed_with_status, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5546, __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, 5546, __pyx_L1_error)

    /* "coremusic/capi.pyx":5545
 *     cdef cf.Boolean is_updated
 *     cdef cf.OSStatus status = at.AUGraphUpdate(<at.AUGraph>graph_id, &is_updated)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphUpdate failed with status: {status}")
 *     return bool(is_updated)
*/
  }

  /* "coremusic/capi.pyx":5547
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphUpdate failed with status: {status}")
 *     return bool(is_updated)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_Boolean(__pyx_v_is_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5531
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5550
 * 
 * 
 * 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_773au_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_772au_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_773au_graph_get_cpu_load = {"au_graph_get_cpu_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_773au_graph_get_cpu_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_772au_graph_get_cpu_load};
static PyObject *__pyx_pw_9coremusic_4capi_773au_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, 5550, __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, 5550, __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, 5550, __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, 5550, __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, 5550, __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, 5550, __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, 5550, __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_772au_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_772au_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;
  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("au_graph_get_cpu_load", 0);

  /* "coremusic/capi.pyx":5563
 *     """
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetCPULoad failed with status: {status}")
*/
  __pyx_v_status = AUGraphGetCPULoad(((AUGraph)__pyx_v_graph_id), (&__pyx_v_cpu_load));

  /* "coremusic/capi.pyx":5564
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetCPULoad failed with status: {status}")
 *     return cpu_load
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5565
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetCPULoad failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return cpu_load
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphGetCPULoad_failed_with_st, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5565, __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, 5565, __pyx_L1_error)

    /* "coremusic/capi.pyx":5564
 *     cdef cf.Float32 cpu_load
 *     cdef cf.OSStatus status = at.AUGraphGetCPULoad(<at.AUGraph>graph_id, &cpu_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetCPULoad failed with status: {status}")
 *     return cpu_load
*/
  }

  /* "coremusic/capi.pyx":5566
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetCPULoad failed with status: {status}")
 *     return cpu_load             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_cpu_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5550
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5569
 * 
 * 
 * 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_775au_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_774au_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_775au_graph_get_max_cpu_load = {"au_graph_get_max_cpu_load", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_775au_graph_get_max_cpu_load, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_774au_graph_get_max_cpu_load};
static PyObject *__pyx_pw_9coremusic_4capi_775au_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, 5569, __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, 5569, __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, 5569, __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, 5569, __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, 5569, __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, 5569, __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, 5569, __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_774au_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_774au_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;
  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("au_graph_get_max_cpu_load", 0);

  /* "coremusic/capi.pyx":5582
 *     """
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)             # <<<<<<<<<<<<<<
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetMaxCPULoad failed with status: {status}")
*/
  __pyx_v_status = AUGraphGetMaxCPULoad(((AUGraph)__pyx_v_graph_id), (&__pyx_v_max_load));

  /* "coremusic/capi.pyx":5583
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetMaxCPULoad failed with status: {status}")
 *     return max_load
*/
  __pyx_t_1 = (__pyx_v_status != 0);
  if (unlikely(__pyx_t_1)) {

    /* "coremusic/capi.pyx":5584
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetMaxCPULoad failed with status: {status}")             # <<<<<<<<<<<<<<
 *     return max_load
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_RuntimeError);
    __pyx_t_4 = __pyx_builtin_RuntimeError; 
    __pyx_t_5 = __Pyx_PyLong_From_SInt32(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_AUGraphGetMaxCPULoad_failed_with, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5584, __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, 5584, __pyx_L1_error)

    /* "coremusic/capi.pyx":5583
 *     cdef cf.Float32 max_load
 *     cdef cf.OSStatus status = at.AUGraphGetMaxCPULoad(<at.AUGraph>graph_id, &max_load)
 *     if status != 0:             # <<<<<<<<<<<<<<
 *         raise RuntimeError(f"AUGraphGetMaxCPULoad failed with status: {status}")
 *     return max_load
*/
  }

  /* "coremusic/capi.pyx":5585
 *     if status != 0:
 *         raise RuntimeError(f"AUGraphGetMaxCPULoad failed with status: {status}")
 *     return max_load             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_max_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "coremusic/capi.pyx":5569
 * 
 * 
 * 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":5589
 * 
 * # 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_777get_au_graph_err_node_not_found(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_776get_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_777get_au_graph_err_node_not_found = {"get_au_graph_err_node_not_found", (PyCFunction)__pyx_pw_9coremusic_4capi_777get_au_graph_err_node_not_found, METH_NOARGS, __pyx_doc_9coremusic_4capi_776get_au_graph_err_node_not_found};
static PyObject *__pyx_pw_9coremusic_4capi_777get_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_776get_au_graph_err_node_not_found(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_776get_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":5591
 * 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":5589
 * 
 * # 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":5593
 *     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_779get_au_graph_err_invalid_connection(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_778get_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_779get_au_graph_err_invalid_connection = {"get_au_graph_err_invalid_connection", (PyCFunction)__pyx_pw_9coremusic_4capi_779get_au_graph_err_invalid_connection, METH_NOARGS, __pyx_doc_9coremusic_4capi_778get_au_graph_err_invalid_connection};
static PyObject *__pyx_pw_9coremusic_4capi_779get_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_778get_au_graph_err_invalid_connection(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_778get_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":5595
 * 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":5593
 *     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":5597
 *     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_781get_au_graph_err_output_node_err(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_780get_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_781get_au_graph_err_output_node_err = {"get_au_graph_err_output_node_err", (PyCFunction)__pyx_pw_9coremusic_4capi_781get_au_graph_err_output_node_err, METH_NOARGS, __pyx_doc_9coremusic_4capi_780get_au_graph_err_output_node_err};
static PyObject *__pyx_pw_9coremusic_4capi_781get_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_780get_au_graph_err_output_node_err(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_780get_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":5599
 * 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":5597
 *     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":5601
 *     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_783get_au_graph_err_cannot_do_in_current_context(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_782get_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_783get_au_graph_err_cannot_do_in_current_context = {"get_au_graph_err_cannot_do_in_current_context", (PyCFunction)__pyx_pw_9coremusic_4capi_783get_au_graph_err_cannot_do_in_current_context, METH_NOARGS, __pyx_doc_9coremusic_4capi_782get_au_graph_err_cannot_do_in_current_context};
static PyObject *__pyx_pw_9coremusic_4capi_783get_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_782get_au_graph_err_cannot_do_in_current_context(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_782get_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":5603
 * 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":5601
 *     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":5605
 *     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_785get_au_graph_err_invalid_audio_unit(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_9coremusic_4capi_784get_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_785get_au_graph_err_invalid_audio_unit = {"get_au_graph_err_invalid_audio_unit", (PyCFunction)__pyx_pw_9coremusic_4capi_785get_au_graph_err_invalid_audio_unit, METH_NOARGS, __pyx_doc_9coremusic_4capi_784get_au_graph_err_invalid_audio_unit};
static PyObject *__pyx_pw_9coremusic_4capi_785get_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_784get_au_graph_err_invalid_audio_unit(__pyx_self);

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

static PyObject *__pyx_pf_9coremusic_4capi_784get_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":5607
 * 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":5605
 *     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;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_9coremusic_4capi_AudioPlayer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  return o;
}

static void __pyx_tp_dealloc_9coremusic_4capi_AudioPlayer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __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_AudioPlayer) {
      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_11AudioPlayer_19__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  #if CYTHON_USE_TYPE_SLOTS
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

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},
  {"stop", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_9stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_8stop},
  {"set_looping", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_11set_looping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_10set_looping},
  {"reset_playback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_13reset_playback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_12reset_playback},
  {"is_playing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_15is_playing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_14is_playing},
  {"get_progress", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_17get_progress, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_16get_progress},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_20__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9coremusic_4capi_11AudioPlayer_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9coremusic_4capi_11AudioPlayer_22__setstate_cython__},
  {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()\n\nPython wrapper for the C audio_player implementation")},
  {Py_tp_methods, (void *)__pyx_methods_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,
  __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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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("AudioPlayer()\n\nPython wrapper for the C audio_player implementation"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9coremusic_4capi_AudioPlayer, /*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_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 PY_VERSION_HEX >= 0x030800b1 && (!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;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  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((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __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);
  }
  #if CYTHON_USE_TYPE_SLOTS
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #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*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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 PY_VERSION_HEX >= 0x030800b1 && (!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_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);
  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, 1555, __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, 1555, __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, 1555, __pyx_L1_error)
  #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, 1555, __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, 1555, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_AudioPlayer) < (0)) __PYX_ERR(0, 1555, __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, 5123, __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, 5123, __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, 5123, __pyx_L1_error)
  #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, 5123, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 5123, __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, 5123, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9coremusic_4capi_CoreAudioObject) < (0)) __PYX_ERR(0, 5123, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __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
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
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#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;
  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);
  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)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __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)
  /*--- 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 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED)
  if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  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 ---*/

  /* "coremusic/capi.pyx":11
 * from libc.string cimport memcpy, memset
 * 
 * def fourchar_to_int(code: str) -> int:             # <<<<<<<<<<<<<<
 *    """Convert fourcc chars to an int
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_code, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 11, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 11, __pyx_L1_error)
  __pyx_t_3 = __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_3)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fourchar_to_int, __pyx_t_3) < (0)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":21
 *            (ord(code[2]) << 8)  | ord(code[3]))
 * 
 * def int_to_fourchar(n: int) -> str:             # <<<<<<<<<<<<<<
 *     """convert int to fourcc 4 chars
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_n, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
  __pyx_t_2 = __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_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int_to_fourchar, __pyx_t_2) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":34
 *     )
 * 
 * def audio_object_show(int object_id):             # <<<<<<<<<<<<<<
 *     ca.AudioObjectShow(object_id)
 * 
*/
  __pyx_t_2 = __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_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_show, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":37
 *     ca.AudioObjectShow(object_id)
 * 
 * def audio_hardware_unload() -> int:             # <<<<<<<<<<<<<<
 *     return ca.AudioHardwareUnload()
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 37, __pyx_L1_error)
  __pyx_t_3 = __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_3)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_unload, __pyx_t_3) < (0)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":41
 * 
 * 
 * def audio_hardware_destroy_aggregate_device(int in_device_id) -> int:             # <<<<<<<<<<<<<<
 *     return ca.AudioHardwareDestroyAggregateDevice(in_device_id)
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 41, __pyx_L1_error)
  __pyx_t_2 = __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_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_destroy_aggregate, __pyx_t_2) < (0)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":46
 * 
 * # 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_2 = __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_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_data, __pyx_t_2) < (0)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":87
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_13audio_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[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_object_get_property_string, __pyx_t_2) < (0)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":138
 * 
 * 
 * def audio_hardware_get_devices() -> list:             # <<<<<<<<<<<<<<
 *     """Get list of all audio device IDs"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_list) < (0)) __PYX_ERR(0, 138, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_15audio_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[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_devices, __pyx_t_3) < (0)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":176
 * 
 * 
 * def audio_hardware_get_default_output_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default output device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_17audio_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[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_outpu, __pyx_t_2) < (0)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":194
 * 
 * 
 * def audio_hardware_get_default_input_device() -> int:             # <<<<<<<<<<<<<<
 *     """Get the default input device ID"""
 *     cdef ca.AudioObjectPropertyAddress address
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 194, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_19audio_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[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_hardware_get_default_input, __pyx_t_3) < (0)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":213
 * 
 * # 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_3 = __Pyx_PyLong_From_int(((int)1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_21audio_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[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __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_file_open_url, __pyx_t_2) < (0)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":244
 * 
 * 
 * def audio_file_close(long audio_file_id):             # <<<<<<<<<<<<<<
 *     """Close an audio file"""
 *     cdef at.AudioFileID audio_file = <at.AudioFileID>audio_file_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_23audio_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[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_close, __pyx_t_2) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":253
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_25audio_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[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_get_property, __pyx_t_2) < (0)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":293
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_27audio_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[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_read_packets, __pyx_t_2) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":354
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_29audio_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[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[15]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_open, __pyx_t_2) < (0)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":372
 * 
 * 
 * def audio_file_stream_close(long stream_id):             # <<<<<<<<<<<<<<
 *     """Close an AudioFileStream parser"""
 *     cdef at.AudioFileStreamID stream = <at.AudioFileStreamID>stream_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_31audio_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[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_close, __pyx_t_2) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":381
 * 
 * 
 * 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_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_33audio_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[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __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_file_stream_parse_bytes, __pyx_t_2) < (0)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":400
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_35audio_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[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_get_property, __pyx_t_2) < (0)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":472
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_37audio_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[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_file_stream_seek, __pyx_t_2) < (0)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":500
 * # ============================================================================
 * 
 * def audio_converter_new(source_format: dict, dest_format: dict) -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AudioConverter
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_source_format, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 500, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dest_format, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 500, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_39audio_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[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_new, __pyx_t_4) < (0)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":545
 * 
 * 
 * def audio_converter_dispose(long converter_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an AudioConverter"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_41audio_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[20])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":553
 * 
 * 
 * def audio_converter_convert_buffer(long converter_id, bytes input_data) -> bytes:             # <<<<<<<<<<<<<<
 *     """Convert audio data using AudioConverter
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __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_bytes) < (0)) __PYX_ERR(0, 553, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_43audio_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[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_converter_convert_buffer, __pyx_t_2) < (0)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":591
 * 
 * 
 * def audio_converter_get_property(long converter_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an AudioConverter
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes) < (0)) __PYX_ERR(0, 591, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_45audio_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[22])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_get_property, __pyx_t_4) < (0)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":628
 * 
 * 
 * def audio_converter_set_property(long converter_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an AudioConverter
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_47audio_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[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_set_property, __pyx_t_4) < (0)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":645
 * 
 * 
 * def audio_converter_reset(long converter_id):             # <<<<<<<<<<<<<<
 *     """Reset an AudioConverter to its initial state"""
 *     cdef at.AudioConverterRef converter = <at.AudioConverterRef>converter_id
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_49audio_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[24])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_converter_reset, __pyx_t_4) < (0)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":726
 * 
 * 
 * def audio_converter_fill_complex_buffer(             # <<<<<<<<<<<<<<
 *     long converter_id,
 *     bytes input_data,
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __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, 726, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_51audio_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[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_converter_fill_complex_buf, __pyx_t_2) < (0)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":830
 * 
 * # AudioConverter property getters
 * def get_audio_converter_property_min_input_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 830, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_53get_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[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_min, __pyx_t_4) < (0)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":833
 *     return at.kAudioConverterPropertyMinimumInputBufferSize
 * 
 * def get_audio_converter_property_min_output_buffer_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __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, 833, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_55get_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[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_get_audio_converter_property_min_2, __pyx_t_2) < (0)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":836
 *     return at.kAudioConverterPropertyMinimumOutputBufferSize
 * 
 * def get_audio_converter_property_max_input_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 836, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_57get_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[28])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_max, __pyx_t_4) < (0)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":839
 *     return at.kAudioConverterPropertyMaximumInputPacketSize
 * 
 * def get_audio_converter_property_max_output_packet_size() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __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, 839, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_59get_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[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_get_audio_converter_property_max_2, __pyx_t_2) < (0)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":842
 *     return at.kAudioConverterPropertyMaximumOutputPacketSize
 * 
 * def get_audio_converter_property_sample_rate_converter_quality() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_61get_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[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_property_sam, __pyx_t_4) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":845
 *     return at.kAudioConverterSampleRateConverterQuality
 * 
 * def get_audio_converter_property_codec_quality() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterCodecQuality
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __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, 845, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_63get_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[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_get_audio_converter_property_cod, __pyx_t_2) < (0)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":848
 *     return at.kAudioConverterCodecQuality
 * 
 * def get_audio_converter_quality_max() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Max
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_65get_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[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_max, __pyx_t_4) < (0)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":851
 *     return at.kAudioConverterQuality_Max
 * 
 * def get_audio_converter_quality_high() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_High
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __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, 851, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_67get_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[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_get_audio_converter_quality_high, __pyx_t_2) < (0)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":854
 *     return at.kAudioConverterQuality_High
 * 
 * def get_audio_converter_quality_medium() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Medium
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_69get_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[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_medi, __pyx_t_4) < (0)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":857
 *     return at.kAudioConverterQuality_Medium
 * 
 * def get_audio_converter_quality_low() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Low
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __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, 857, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_71get_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[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_get_audio_converter_quality_low, __pyx_t_2) < (0)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":860
 *     return at.kAudioConverterQuality_Low
 * 
 * def get_audio_converter_quality_min() -> int:             # <<<<<<<<<<<<<<
 *     return at.kAudioConverterQuality_Min
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 860, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_73get_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[36])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_converter_quality_min, __pyx_t_4) < (0)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":868
 * # ============================================================================
 * 
 * def extended_audio_file_open_url(str file_path) -> int:             # <<<<<<<<<<<<<<
 *     """Open an audio file with ExtendedAudioFile
 * 
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __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, 868, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_75extended_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[37])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __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_open_url, __pyx_t_2) < (0)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":897
 * 
 * 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_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "coremusic/capi.pyx":896
 * 
 * 
 * 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_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_source_format, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_77extended_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[38])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_create_with, __pyx_t_3) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":948
 * 
 * 
 * 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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_79extended_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[39])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_dispose, __pyx_t_3) < (0)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":956
 * 
 * 
 * def extended_audio_file_read(long ext_file_id, int num_frames) -> tuple:             # <<<<<<<<<<<<<<
 *     """Read audio frames from ExtendedAudioFile
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_81extended_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[40])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_read, __pyx_t_2) < (0)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":993
 * 
 * 
 * def extended_audio_file_write(long ext_file_id, int num_frames, bytes audio_data):             # <<<<<<<<<<<<<<
 *     """Write audio frames to ExtendedAudioFile
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_83extended_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[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_write, __pyx_t_2) < (0)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1017
 * 
 * 
 * def extended_audio_file_get_property(long ext_file_id, int property_id) -> bytes:             # <<<<<<<<<<<<<<
 *     """Get a property from an ExtendedAudioFile
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes) < (0)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_85extended_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[42])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_get_property, __pyx_t_3) < (0)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1046
 * 
 * 
 * def extended_audio_file_set_property(long ext_file_id, int property_id, bytes data):             # <<<<<<<<<<<<<<
 *     """Set a property on an ExtendedAudioFile
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_87extended_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[43])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extended_audio_file_set_property, __pyx_t_3) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1064
 * 
 * # ExtendedAudioFile property getters
 * def get_extended_audio_file_property_file_data_format() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_89get_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[44])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1067
 *     return at.kExtAudioFileProperty_FileDataFormat
 * 
 * def get_extended_audio_file_property_client_data_format() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_91get_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[45])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_2, __pyx_t_3) < (0)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1070
 *     return at.kExtAudioFileProperty_ClientDataFormat
 * 
 * def get_extended_audio_file_property_file_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_93get_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[46])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1073
 *     return at.kExtAudioFileProperty_FileChannelLayout
 * 
 * def get_extended_audio_file_property_client_channel_layout() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_95get_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[47])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_4, __pyx_t_3) < (0)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1076
 *     return at.kExtAudioFileProperty_ClientChannelLayout
 * 
 * def get_extended_audio_file_property_codec_manufacturer() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_97get_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[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_5, __pyx_t_2) < (0)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1079
 *     return at.kExtAudioFileProperty_CodecManufacturer
 * 
 * def get_extended_audio_file_property_audio_file() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_AudioFile
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_99get_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[49])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_6, __pyx_t_3) < (0)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1082
 *     return at.kExtAudioFileProperty_AudioFile
 * 
 * def get_extended_audio_file_property_file_length_frames() -> int:             # <<<<<<<<<<<<<<
 *     return at.kExtAudioFileProperty_FileLengthFrames
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_101get_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[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_extended_audio_file_property_7, __pyx_t_2) < (0)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1094
 * 
 * 
 * def audio_queue_new_output(audio_format):             # <<<<<<<<<<<<<<
 *     """Create a new audio output queue"""
 *     cdef at.AudioStreamBasicDescription format
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_103audio_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[51])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_new_output, __pyx_t_2) < (0)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1127
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_105audio_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[52])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_allocate_buffer, __pyx_t_2) < (0)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1144
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_107audio_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[53])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_enqueue_buffer, __pyx_t_2) < (0)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1157
 * 
 * 
 * def audio_queue_start(long queue_id):             # <<<<<<<<<<<<<<
 *     """Start an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_109audio_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[54])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_start, __pyx_t_2) < (0)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1169
 * 
 * 
 * def audio_queue_stop(long queue_id, bint immediate=True):             # <<<<<<<<<<<<<<
 *     """Stop an audio queue"""
 *     cdef at.AudioQueueRef queue = <at.AudioQueueRef>queue_id
*/
  __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_111audio_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[55])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_stop, __pyx_t_2) < (0)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1181
 * 
 * 
 * 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_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_113audio_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[56])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_queue_dispose, __pyx_t_2) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1194
 * 
 * # Constant getter functions
 * def get_audio_format_linear_pcm():             # <<<<<<<<<<<<<<
 *     return ca.kAudioFormatLinearPCM
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_115get_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[57])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_format_linear_pcm, __pyx_t_2) < (0)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1197
 *     return ca.kAudioFormatLinearPCM
 * 
 * def get_linear_pcm_format_flag_is_signed_integer():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_117get_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[58])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_si, __pyx_t_2) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1200
 *     return ca.kLinearPCMFormatFlagIsSignedInteger
 * 
 * def get_linear_pcm_format_flag_is_packed():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_119get_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[59])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_pa, __pyx_t_2) < (0)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1203
 *     return ca.kLinearPCMFormatFlagIsPacked
 * 
 * def get_audio_file_wave_type():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileWAVEType
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_121get_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[60])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_wave_type, __pyx_t_2) < (0)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1206
 *     return at.kAudioFileWAVEType
 * 
 * def get_audio_file_read_permission():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileReadPermission
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_123get_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[61])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_read_permission, __pyx_t_2) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1209
 *     return at.kAudioFileReadPermission
 * 
 * def get_audio_file_property_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyDataFormat
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_125get_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[62])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_data_for, __pyx_t_2) < (0)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1212
 *     return at.kAudioFilePropertyDataFormat
 * 
 * def get_audio_file_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_127get_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[63])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_maximum, __pyx_t_2) < (0)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1215
 *     return at.kAudioFilePropertyMaximumPacketSize
 * 
 * def get_audio_file_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_129get_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[64])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_audio_da, __pyx_t_2) < (0)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1218
 *     return at.kAudioFilePropertyAudioDataPacketCount
 * 
 * def get_audio_file_property_estimated_duration():             # <<<<<<<<<<<<<<
 *     return at.kAudioFilePropertyEstimatedDuration
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_131get_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[65])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_property_estimate, __pyx_t_2) < (0)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1222
 * 
 * # AudioObject/Device property constants
 * def get_audio_object_property_name():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyName
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_133get_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[66])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_name, __pyx_t_2) < (0)) __PYX_ERR(0, 1222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1225
 *     return ca.kAudioObjectPropertyName
 * 
 * def get_audio_object_property_manufacturer():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyManufacturer
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_135get_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[67])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_manufa, __pyx_t_2) < (0)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1228
 *     return ca.kAudioObjectPropertyManufacturer
 * 
 * def get_audio_device_property_device_uid():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_137get_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[68])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device, __pyx_t_2) < (0)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1231
 *     return ca.kAudioDevicePropertyDeviceUID
 * 
 * def get_audio_device_property_model_uid():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyModelUID
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_139get_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[69])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_model, __pyx_t_2) < (0)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1234
 *     return ca.kAudioDevicePropertyModelUID
 * 
 * def get_audio_device_property_transport_type():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyTransportType
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_141get_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[70])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_transp, __pyx_t_2) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1237
 *     return ca.kAudioDevicePropertyTransportType
 * 
 * def get_audio_device_property_device_is_alive():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_143get_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[71])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_device_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1240
 *     return ca.kAudioDevicePropertyDeviceIsAlive
 * 
 * def get_audio_device_property_nominal_sample_rate():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_145get_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[72])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_nomina, __pyx_t_2) < (0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1243
 *     return ca.kAudioDevicePropertyNominalSampleRate
 * 
 * def get_audio_device_property_available_nominal_sample_rates():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_147get_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[73])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_availa, __pyx_t_2) < (0)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1246
 *     return ca.kAudioDevicePropertyAvailableNominalSampleRates
 * 
 * def get_audio_device_property_is_hidden():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyIsHidden
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_149get_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[74])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_is_hid, __pyx_t_2) < (0)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1249
 *     return ca.kAudioDevicePropertyIsHidden
 * 
 * def get_audio_device_property_preferred_channels_for_stereo():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_151get_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[75])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_prefer, __pyx_t_2) < (0)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1252
 *     return ca.kAudioDevicePropertyPreferredChannelsForStereo
 * 
 * def get_audio_device_property_stream_configuration():             # <<<<<<<<<<<<<<
 *     return ca.kAudioDevicePropertyStreamConfiguration
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_153get_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[76])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_device_property_stream, __pyx_t_2) < (0)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1256
 * 
 * # AudioObject scope constants
 * def get_audio_object_property_scope_global():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_155get_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[77])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope, __pyx_t_2) < (0)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1259
 *     return ca.kAudioObjectPropertyScopeGlobal
 * 
 * def get_audio_object_property_scope_input():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeInput
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_157get_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[78])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1262
 *     return ca.kAudioObjectPropertyScopeInput
 * 
 * def get_audio_object_property_scope_output():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_159get_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[79])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_scope_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1265
 *     return ca.kAudioObjectPropertyScopeOutput
 * 
 * def get_audio_object_property_element_main():             # <<<<<<<<<<<<<<
 *     return ca.kAudioObjectPropertyElementMain
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_161get_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[80])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_object_property_elemen, __pyx_t_2) < (0)) __PYX_ERR(0, 1265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1270
 * 
 * # AudioComponent Functions
 * def audio_component_find_next(description_dict, long previous_component_id=0):             # <<<<<<<<<<<<<<
 *     """Find an audio component matching the description
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_163audio_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[81])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_find_next, __pyx_t_2) < (0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1300
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_165audio_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[82])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_instance_new, __pyx_t_2) < (0)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1312
 * 
 * 
 * def audio_component_instance_dispose(long instance_id):             # <<<<<<<<<<<<<<
 *     """Dispose of an audio component instance"""
 *     cdef at.AudioComponentInstance instance = <at.AudioComponentInstance>instance_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_167audio_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[83])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_instance_dispose, __pyx_t_2) < (0)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1323
 * 
 * 
 * def audio_component_copy_name(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the name of an audio component
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_169audio_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[84])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_copy_name, __pyx_t_2) < (0)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1350
 * 
 * 
 * def audio_component_get_description(long component_id):             # <<<<<<<<<<<<<<
 *     """Get the description of an audio component
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_171audio_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[85])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_component_get_description, __pyx_t_2) < (0)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1377
 * 
 * # 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_173audio_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[86])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_initialize, __pyx_t_2) < (0)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1388
 * 
 * 
 * def audio_unit_uninitialize(long audio_unit_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_175audio_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[87])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_uninitialize, __pyx_t_2) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1399
 * 
 * 
 * def audio_unit_set_property(long audio_unit_id, int property_id, int scope, int element, data):             # <<<<<<<<<<<<<<
 *     """Set a property on an audio unit"""
 *     cdef at.AudioUnit unit = <at.AudioUnit>audio_unit_id
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_177audio_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[88])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_set_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1421
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_179audio_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[89])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_unit_get_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1460
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_181audio_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[90])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_output_unit_start, __pyx_t_2) < (0)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1471
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_183audio_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[91])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_output_unit_stop, __pyx_t_2) < (0)) __PYX_ERR(0, 1471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1483
 * 
 * # AudioUnit constant getter functions
 * def get_audio_unit_type_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitType_Output
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_185get_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[92])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_type_output, __pyx_t_2) < (0)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1486
 *     return at.kAudioUnitType_Output
 * 
 * def get_audio_component_type_music_device():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitType_MusicDevice
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_187get_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[93])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_component_type_music_d, __pyx_t_2) < (0)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1489
 *     return at.kAudioUnitType_MusicDevice
 * 
 * def get_audio_unit_subtype_default_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_189get_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[94])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_subtype_default_o, __pyx_t_2) < (0)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1492
 *     return at.kAudioUnitSubType_DefaultOutput
 * 
 * def get_audio_unit_manufacturer_apple():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitManufacturer_Apple
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_191get_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[95])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_manufacturer_appl, __pyx_t_2) < (0)) __PYX_ERR(0, 1492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1495
 *     return at.kAudioUnitManufacturer_Apple
 * 
 * def get_audio_unit_property_stream_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitProperty_StreamFormat
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_193get_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[96])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_stream_f, __pyx_t_2) < (0)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1498
 *     return at.kAudioUnitProperty_StreamFormat
 * 
 * def get_audio_unit_property_set_render_callback():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_195get_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[97])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_property_set_rend, __pyx_t_2) < (0)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1501
 *     return at.kAudioUnitProperty_SetRenderCallback
 * 
 * def get_audio_unit_scope_input():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Input
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_197get_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[98])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_input, __pyx_t_2) < (0)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1504
 *     return at.kAudioUnitScope_Input
 * 
 * def get_audio_unit_scope_output():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Output
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_199get_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[99])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_output, __pyx_t_2) < (0)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1507
 *     return at.kAudioUnitScope_Output
 * 
 * def get_audio_unit_scope_global():             # <<<<<<<<<<<<<<
 *     return at.kAudioUnitScope_Global
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_201get_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[100])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_unit_scope_global, __pyx_t_2) < (0)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1510
 *     return at.kAudioUnitScope_Global
 * 
 * def get_linear_pcm_format_flag_is_non_interleaved():             # <<<<<<<<<<<<<<
 *     return ca.kLinearPCMFormatFlagIsNonInterleaved
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_203get_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[101])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linear_pcm_format_flag_is_no, __pyx_t_2) < (0)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1529
 * 
 * 
 * def demonstrate_callback_infrastructure():             # <<<<<<<<<<<<<<
 *     """
 *     Demonstrate that we have all the infrastructure needed for audio callbacks.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_205demonstrate_callback_infrastructure, 0, __pyx_mstate_global->__pyx_n_u_demonstrate_callback_infrastruct, 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_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_demonstrate_callback_infrastruct, __pyx_t_2) < (0)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1565
 *         self.initialized = False
 * 
 *     def load_file(self, str file_path):             # <<<<<<<<<<<<<<
 *         """Load an audio file for playback"""
 *         cdef bytes path_bytes = file_path.encode('utf-8')
*/
  __pyx_t_2 = __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[103])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_load_file, __pyx_t_2) < (0)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1586
 *         return result
 * 
 *     def setup_output(self):             # <<<<<<<<<<<<<<
 *         """Setup the audio output unit"""
 *         cdef cf.OSStatus result = ap.SetupAudioOutput(&self.audio_output)
*/
  __pyx_t_2 = __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[104])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_setup_output, __pyx_t_2) < (0)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1594
 *         return result
 * 
 *     def start(self):             # <<<<<<<<<<<<<<
 *         """Start audio playback"""
 *         if not self.initialized:
*/
  __pyx_t_2 = __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[105])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_2) < (0)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1604
 *         return result
 * 
 *     def stop(self):             # <<<<<<<<<<<<<<
 *         """Stop audio playback"""
 *         if not self.initialized:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_9stop, __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[106])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_2) < (0)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1614
 *         return result
 * 
 *     def set_looping(self, bint loop):             # <<<<<<<<<<<<<<
 *         """Enable/disable looping playback"""
 *         ap.SetLooping(&self.audio_output.playerData, loop)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_11set_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[107])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_set_looping, __pyx_t_2) < (0)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1618
 *         ap.SetLooping(&self.audio_output.playerData, loop)
 * 
 *     def reset_playback(self):             # <<<<<<<<<<<<<<
 *         """Reset playback to beginning"""
 *         ap.ResetPlayback(&self.audio_output.playerData)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_13reset_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[108])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_reset_playback, __pyx_t_2) < (0)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1622
 *         ap.ResetPlayback(&self.audio_output.playerData)
 * 
 *     def is_playing(self):             # <<<<<<<<<<<<<<
 *         """Check if audio is currently playing"""
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_15is_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[109])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_is_playing, __pyx_t_2) < (0)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1626
 *         return bool(ap.IsPlaying(&self.audio_output.playerData))
 * 
 *     def get_progress(self):             # <<<<<<<<<<<<<<
 *         """Get current playback progress as a float (0.0 to 1.0)"""
 *         return ap.GetPlaybackProgress(&self.audio_output.playerData)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_17get_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[110])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_AudioPlayer, __pyx_mstate_global->__pyx_n_u_get_progress, __pyx_t_2) < (0)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_21__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[111])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.audio_output cannot be converted to a Python object for pickling"
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_11AudioPlayer_23__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[112])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1640
 * 
 * # AudioFileStream constant getter functions
 * def get_audio_file_stream_property_ready_to_produce_packets():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_207get_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[113])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_r, __pyx_t_2) < (0)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1643
 *     return at.kAudioFileStreamProperty_ReadyToProducePackets
 * 
 * def get_audio_file_stream_property_file_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_209get_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[114])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f, __pyx_t_2) < (0)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1646
 *     return at.kAudioFileStreamProperty_FileFormat
 * 
 * def get_audio_file_stream_property_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_211get_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[115])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d, __pyx_t_2) < (0)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1649
 *     return at.kAudioFileStreamProperty_DataFormat
 * 
 * def get_audio_file_stream_property_format_list():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FormatList
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_213get_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[116])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1652
 *     return at.kAudioFileStreamProperty_FormatList
 * 
 * def get_audio_file_stream_property_magic_cookie_data():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_215get_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[117])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m, __pyx_t_2) < (0)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1655
 *     return at.kAudioFileStreamProperty_MagicCookieData
 * 
 * def get_audio_file_stream_property_audio_data_byte_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_217get_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[118])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a, __pyx_t_2) < (0)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1658
 *     return at.kAudioFileStreamProperty_AudioDataByteCount
 * 
 * def get_audio_file_stream_property_audio_data_packet_count():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_219get_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[119])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1661
 *     return at.kAudioFileStreamProperty_AudioDataPacketCount
 * 
 * def get_audio_file_stream_property_maximum_packet_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_221get_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[120])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_m_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1664
 *     return at.kAudioFileStreamProperty_MaximumPacketSize
 * 
 * def get_audio_file_stream_property_data_offset():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_223get_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[121])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_d_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1667
 *     return at.kAudioFileStreamProperty_DataOffset
 * 
 * def get_audio_file_stream_property_channel_layout():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_225get_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[122])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_c, __pyx_t_2) < (0)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1670
 *     return at.kAudioFileStreamProperty_ChannelLayout
 * 
 * def get_audio_file_stream_property_packet_to_frame():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_227get_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[123])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p, __pyx_t_2) < (0)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1673
 *     return at.kAudioFileStreamProperty_PacketToFrame
 * 
 * def get_audio_file_stream_property_frame_to_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_229get_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[124])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1676
 *     return at.kAudioFileStreamProperty_FrameToPacket
 * 
 * def get_audio_file_stream_property_packet_to_byte():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_231get_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[125])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1679
 *     return at.kAudioFileStreamProperty_PacketToByte
 * 
 * def get_audio_file_stream_property_byte_to_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_233get_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[126])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b, __pyx_t_2) < (0)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1682
 *     return at.kAudioFileStreamProperty_ByteToPacket
 * 
 * def get_audio_file_stream_property_packet_table_info():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_235get_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[127])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1685
 *     return at.kAudioFileStreamProperty_PacketTableInfo
 * 
 * def get_audio_file_stream_property_packet_size_upper_bound():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_237get_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[128])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_p_4, __pyx_t_2) < (0)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1688
 *     return at.kAudioFileStreamProperty_PacketSizeUpperBound
 * 
 * def get_audio_file_stream_property_average_bytes_per_packet():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_239get_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[129])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_a_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1691
 *     return at.kAudioFileStreamProperty_AverageBytesPerPacket
 * 
 * def get_audio_file_stream_property_bit_rate():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_BitRate
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_241get_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[130])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_b_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1694
 *     return at.kAudioFileStreamProperty_BitRate
 * 
 * def get_audio_file_stream_property_info_dictionary():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamProperty_InfoDictionary
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_243get_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[131])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_i, __pyx_t_2) < (0)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1698
 * 
 * # AudioFileStream flag getter functions
 * def get_audio_file_stream_property_flag_property_is_cached():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_245get_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[132])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_4, __pyx_t_2) < (0)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1701
 *     return at.kAudioFileStreamPropertyFlag_PropertyIsCached
 * 
 * def get_audio_file_stream_property_flag_cache_property():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_247get_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[133])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_property_f_5, __pyx_t_2) < (0)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1704
 *     return at.kAudioFileStreamPropertyFlag_CacheProperty
 * 
 * def get_audio_file_stream_parse_flag_discontinuity():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_249get_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[134])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_parse_flag, __pyx_t_2) < (0)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1707
 *     return at.kAudioFileStreamParseFlag_Discontinuity
 * 
 * def get_audio_file_stream_seek_flag_offset_is_estimated():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamSeekFlag_OffsetIsEstimated
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_251get_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[135])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_seek_flag, __pyx_t_2) < (0)) __PYX_ERR(0, 1707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1711
 * 
 * # AudioFileStream error code getter functions
 * def get_audio_file_stream_error_unsupported_file_type():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_253get_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[136])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu, __pyx_t_2) < (0)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1714
 *     return at.kAudioFileStreamError_UnsupportedFileType
 * 
 * def get_audio_file_stream_error_unsupported_data_format():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_255get_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[137])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1717
 *     return at.kAudioFileStreamError_UnsupportedDataFormat
 * 
 * def get_audio_file_stream_error_unsupported_property():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_257get_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[138])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsu_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1720
 *     return at.kAudioFileStreamError_UnsupportedProperty
 * 
 * def get_audio_file_stream_error_bad_property_size():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_259get_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[139])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_bad, __pyx_t_2) < (0)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1723
 *     return at.kAudioFileStreamError_BadPropertySize
 * 
 * def get_audio_file_stream_error_not_optimized():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_NotOptimized
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_261get_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[140])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_not, __pyx_t_2) < (0)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1726
 *     return at.kAudioFileStreamError_NotOptimized
 * 
 * def get_audio_file_stream_error_invalid_packet_offset():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_263get_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[141])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva, __pyx_t_2) < (0)) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1729
 *     return at.kAudioFileStreamError_InvalidPacketOffset
 * 
 * def get_audio_file_stream_error_invalid_file():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_InvalidFile
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_265get_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[142])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_inva_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1732
 *     return at.kAudioFileStreamError_InvalidFile
 * 
 * def get_audio_file_stream_error_value_unknown():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_267get_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[143])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_valu, __pyx_t_2) < (0)) __PYX_ERR(0, 1732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1735
 *     return at.kAudioFileStreamError_ValueUnknown
 * 
 * def get_audio_file_stream_error_data_unavailable():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_269get_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[144])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_data, __pyx_t_2) < (0)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1738
 *     return at.kAudioFileStreamError_DataUnavailable
 * 
 * def get_audio_file_stream_error_illegal_operation():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_271get_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[145])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_ille, __pyx_t_2) < (0)) __PYX_ERR(0, 1738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1741
 *     return at.kAudioFileStreamError_IllegalOperation
 * 
 * def get_audio_file_stream_error_unspecified_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_273get_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[146])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_unsp, __pyx_t_2) < (0)) __PYX_ERR(0, 1741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1744
 *     return at.kAudioFileStreamError_UnspecifiedError
 * 
 * def get_audio_file_stream_error_discontinuity_cant_recover():             # <<<<<<<<<<<<<<
 *     return at.kAudioFileStreamError_DiscontinuityCantRecover
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_275get_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[147])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_file_stream_error_disc, __pyx_t_2) < (0)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1749
 * 
 * # 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_277audio_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[148])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_create_system_sou, __pyx_t_2) < (0)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1778
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_279audio_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[149])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_dispose_system_so, __pyx_t_2) < (0)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1789
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_281audio_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[150])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_play_system_sound, __pyx_t_2) < (0)) __PYX_ERR(0, 1789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1795
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_283audio_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[151])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_play_alert_sound, __pyx_t_2) < (0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1801
 * 
 * 
 * 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_2 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_285audio_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[152])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_get_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1848
 * 
 * 
 * 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_2 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_287audio_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[153])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_audio_services_set_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1884
 * 
 * # AudioServices constant getter functions
 * def get_audio_services_no_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesNoError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_289get_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[154])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_no_error, __pyx_t_2) < (0)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1887
 *     return at.kAudioServicesNoError
 * 
 * def get_audio_services_unsupported_property_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_291get_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[155])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_unsupported_p, __pyx_t_2) < (0)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1890
 *     return at.kAudioServicesUnsupportedPropertyError
 * 
 * def get_audio_services_bad_property_size_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesBadPropertySizeError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_293get_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[156])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_property, __pyx_t_2) < (0)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1893
 *     return at.kAudioServicesBadPropertySizeError
 * 
 * def get_audio_services_bad_specifier_size_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_295get_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[157])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_bad_specifier, __pyx_t_2) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1896
 *     return at.kAudioServicesBadSpecifierSizeError
 * 
 * def get_audio_services_system_sound_unspecified_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_297get_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[158])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound, __pyx_t_2) < (0)) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1899
 *     return at.kAudioServicesSystemSoundUnspecifiedError
 * 
 * def get_audio_services_system_sound_client_timed_out_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_299get_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[159])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_2, __pyx_t_2) < (0)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1902
 *     return at.kAudioServicesSystemSoundClientTimedOutError
 * 
 * def get_audio_services_system_sound_exceeded_maximum_duration_error():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_301get_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[160])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_system_sound_3, __pyx_t_2) < (0)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1905
 *     return at.kAudioServicesSystemSoundExceededMaximumDurationError
 * 
 * def get_system_sound_id_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_303get_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[161])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_user_preferr, __pyx_t_2) < (0)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1908
 *     return at.kSystemSoundID_UserPreferredAlert
 * 
 * def get_system_sound_id_flash_screen():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_FlashScreen
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_305get_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[162])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_flash_screen, __pyx_t_2) < (0)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1911
 *     return at.kSystemSoundID_FlashScreen
 * 
 * def get_system_sound_id_vibrate():             # <<<<<<<<<<<<<<
 *     return at.kSystemSoundID_Vibrate
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_307get_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[163])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_system_sound_id_vibrate, __pyx_t_2) < (0)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1914
 *     return at.kSystemSoundID_Vibrate
 * 
 * def get_user_preferred_alert():             # <<<<<<<<<<<<<<
 *     return at.kUserPreferredAlert
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_309get_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[164])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_user_preferred_alert, __pyx_t_2) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1917
 *     return at.kUserPreferredAlert
 * 
 * def get_audio_services_property_is_ui_sound():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesPropertyIsUISound
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_311get_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[165])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_is_u, __pyx_t_2) < (0)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1920
 *     return at.kAudioServicesPropertyIsUISound
 * 
 * def get_audio_services_property_complete_playback_if_app_dies():             # <<<<<<<<<<<<<<
 *     return at.kAudioServicesPropertyCompletePlaybackIfAppDies
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_313get_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[166])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_audio_services_property_comp, __pyx_t_2) < (0)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1924
 * 
 * 
 * def test_error() -> int:             # <<<<<<<<<<<<<<
 *     """Test function to verify the module works"""
 *     return ca.kAudio_UnimplementedError
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_315test_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[167])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_error, __pyx_t_3) < (0)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1931
 * # ===== 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_3 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_317music_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[168])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_midi_event, __pyx_t_3) < (0)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1958
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_319music_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[169])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_sysex, __pyx_t_3) < (0)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":1983
 *     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_3 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_321music_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[170])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_start_note, __pyx_t_3) < (0)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2044
 *         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_3 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_323music_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[171])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_device_stop_note, __pyx_t_3) < (0)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2071
 * # 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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_325create_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[172])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_music_device_std_note_par, __pyx_t_3) < (0)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2087
 *     }
 * 
 * def create_music_device_note_params(float pitch, float velocity, list controls):             # <<<<<<<<<<<<<<
 *     """Create note parameters with pitch, velocity, and additional controls.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_327create_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[173])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_music_device_note_params, __pyx_t_3) < (0)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2107
 * # 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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_329get_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[174])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_note_event_use_group_i, __pyx_t_3) < (0)) __PYX_ERR(0, 2107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2111
 *     return at.kMusicNoteEvent_UseGroupInstrument
 * 
 * def get_music_note_event_unused():             # <<<<<<<<<<<<<<
 *     """Get the constant for unused instrument ID."""
 *     return at.kMusicNoteEvent_Unused
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_331get_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[175])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_note_event_unused, __pyx_t_3) < (0)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2115
 *     return at.kMusicNoteEvent_Unused
 * 
 * def get_music_device_range():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice selector range start."""
 *     return at.kMusicDeviceRange
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_333get_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[176])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_range, __pyx_t_3) < (0)) __PYX_ERR(0, 2115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2119
 *     return at.kMusicDeviceRange
 * 
 * def get_music_device_midi_event_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event selector."""
 *     return at.kMusicDeviceMIDIEventSelect
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_335get_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[177])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_sele, __pyx_t_3) < (0)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2123
 *     return at.kMusicDeviceMIDIEventSelect
 * 
 * def get_music_device_sysex_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice SysEx selector."""
 *     return at.kMusicDeviceSysExSelect
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_337get_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[178])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_sysex_select, __pyx_t_3) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2127
 *     return at.kMusicDeviceSysExSelect
 * 
 * def get_music_device_start_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice start note selector."""
 *     return at.kMusicDeviceStartNoteSelect
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_339get_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[179])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_start_note_sele, __pyx_t_3) < (0)) __PYX_ERR(0, 2127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2131
 *     return at.kMusicDeviceStartNoteSelect
 * 
 * def get_music_device_stop_note_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice stop note selector."""
 *     return at.kMusicDeviceStopNoteSelect
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_341get_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[180])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_stop_note_selec, __pyx_t_3) < (0)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2135
 *     return at.kMusicDeviceStopNoteSelect
 * 
 * def get_music_device_midi_event_list_select():             # <<<<<<<<<<<<<<
 *     """Get the MusicDevice MIDI event list selector."""
 *     return at.kMusicDeviceMIDIEventListSelect
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_343get_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[181])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_device_midi_event_list, __pyx_t_3) < (0)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2141
 * # Helper functions for MIDI data
 * 
 * def midi_note_on(int channel, int note, int velocity):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Note On status byte.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_345midi_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[182])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_note_on, __pyx_t_3) < (0)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2155
 *     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_3 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_347midi_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[183])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_note_off, __pyx_t_3) < (0)) __PYX_ERR(0, 2155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2169
 *     return (status, note & 0x7F, velocity & 0x7F)
 * 
 * def midi_control_change(int channel, int controller, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Control Change message.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_349midi_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[184])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_control_change, __pyx_t_3) < (0)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2183
 *     return (status, controller & 0x7F, value & 0x7F)
 * 
 * def midi_program_change(int channel, int program):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Program Change message.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_351midi_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[185])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_program_change, __pyx_t_3) < (0)) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2196
 *     return (status, program & 0x7F, 0)
 * 
 * def midi_pitch_bend(int channel, int value):             # <<<<<<<<<<<<<<
 *     """Create a MIDI Pitch Bend message.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_353midi_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[186])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_pitch_bend, __pyx_t_3) < (0)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2216
 * # MusicPlayer functions
 * 
 * def new_music_player():             # <<<<<<<<<<<<<<
 *     """Create a new music player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_355new_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[187])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_new_music_player, __pyx_t_3) < (0)) __PYX_ERR(0, 2216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2232
 *     return <long>player
 * 
 * def dispose_music_player(long player):             # <<<<<<<<<<<<<<
 *     """Dispose a music player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_357dispose_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[188])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dispose_music_player, __pyx_t_3) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2250
 *     return status
 * 
 * def music_player_set_sequence(long player, long sequence):             # <<<<<<<<<<<<<<
 *     """Set the sequence for the player to play.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_359music_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[189])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_sequence, __pyx_t_3) < (0)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2270
 *     return status
 * 
 * def music_player_get_sequence(long player):             # <<<<<<<<<<<<<<
 *     """Get the sequence attached to a player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_361music_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[190])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_sequence, __pyx_t_3) < (0)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2289
 *     return <long>sequence
 * 
 * def music_player_set_time(long player, double time):             # <<<<<<<<<<<<<<
 *     """Set the current time on the player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_363music_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[191])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_time, __pyx_t_3) < (0)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2308
 *     return status
 * 
 * def music_player_get_time(long player):             # <<<<<<<<<<<<<<
 *     """Get the current time of the player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_365music_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[192])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_time, __pyx_t_3) < (0)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2327
 *     return <double>time
 * 
 * def music_player_preroll(long player):             # <<<<<<<<<<<<<<
 *     """Prepare the player for playing.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_367music_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[193])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_preroll, __pyx_t_3) < (0)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2345
 *     return status
 * 
 * def music_player_start(long player):             # <<<<<<<<<<<<<<
 *     """Start the player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_369music_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[194])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_start, __pyx_t_3) < (0)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2363
 *     return status
 * 
 * def music_player_stop(long player):             # <<<<<<<<<<<<<<
 *     """Stop the player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_371music_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[195])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_stop, __pyx_t_3) < (0)) __PYX_ERR(0, 2363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2381
 *     return status
 * 
 * def music_player_is_playing(long player):             # <<<<<<<<<<<<<<
 *     """Check if the player is playing.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_373music_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[196])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_is_playing, __pyx_t_3) < (0)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2400
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_375music_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[197])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_set_play_rate_scala, __pyx_t_3) < (0)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2422
 *     return status
 * 
 * def music_player_get_play_rate_scalar(long player):             # <<<<<<<<<<<<<<
 *     """Get the playback rate scalar of the player.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_377music_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[198])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_player_get_play_rate_scala, __pyx_t_3) < (0)) __PYX_ERR(0, 2422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2443
 * # MusicSequence functions
 * 
 * def new_music_sequence():             # <<<<<<<<<<<<<<
 *     """Create a new empty music sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_379new_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[199])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_new_music_sequence, __pyx_t_3) < (0)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2459
 *     return <long>sequence
 * 
 * def dispose_music_sequence(long sequence):             # <<<<<<<<<<<<<<
 *     """Dispose a music sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_381dispose_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[200])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dispose_music_sequence, __pyx_t_3) < (0)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2477
 *     return status
 * 
 * def music_sequence_new_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Add a new track to the sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_383music_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[201])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_new_track, __pyx_t_3) < (0)) __PYX_ERR(0, 2477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2496
 *     return <long>track
 * 
 * def music_sequence_dispose_track(long sequence, long track):             # <<<<<<<<<<<<<<
 *     """Remove and dispose a track from a sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_385music_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[202])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_dispose_track, __pyx_t_3) < (0)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2515
 *     return status
 * 
 * def music_sequence_get_track_count(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the number of tracks in a sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_387music_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[203])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_track_count, __pyx_t_3) < (0)) __PYX_ERR(0, 2515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2534
 *     return track_count
 * 
 * def music_sequence_get_ind_track(long sequence, int track_index):             # <<<<<<<<<<<<<<
 *     """Get a track at the specified index.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_389music_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[204])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_ind_track, __pyx_t_3) < (0)) __PYX_ERR(0, 2534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2554
 *     return <long>track
 * 
 * def music_sequence_get_tempo_track(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the tempo track of the sequence.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_391music_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[205])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_tempo_track, __pyx_t_3) < (0)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2573
 *     return <long>track
 * 
 * def music_sequence_set_sequence_type(long sequence, int sequence_type):             # <<<<<<<<<<<<<<
 *     """Set the sequence type.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_393music_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[206])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_set_sequence_type, __pyx_t_3) < (0)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2592
 *     return status
 * 
 * def music_sequence_get_sequence_type(long sequence):             # <<<<<<<<<<<<<<
 *     """Get the sequence type.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_395music_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[207])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_sequence_get_sequence_type, __pyx_t_3) < (0)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":2611
 *     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_3 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_Pack(2, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_397music_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[208])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __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_2) < (0)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2655
 * # 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_399music_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[209])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_note_event, __pyx_t_2) < (0)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2690
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_401music_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[210])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_midi_channel_eve, __pyx_t_2) < (0)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2722
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_403music_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[211])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_music_track_new_extended_tempo_e, __pyx_t_2) < (0)) __PYX_ERR(0, 2722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2751
 * # MusicPlayer constants
 * 
 * def get_music_event_type_null():             # <<<<<<<<<<<<<<
 *     """Get the NULL event type constant."""
 *     return at.kMusicEventType_NULL
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_405get_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[212])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_null, __pyx_t_2) < (0)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2755
 *     return at.kMusicEventType_NULL
 * 
 * def get_music_event_type_extended_note():             # <<<<<<<<<<<<<<
 *     """Get the extended note event type constant."""
 *     return at.kMusicEventType_ExtendedNote
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_407get_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[213])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_no, __pyx_t_2) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2759
 *     return at.kMusicEventType_ExtendedNote
 * 
 * def get_music_event_type_extended_tempo():             # <<<<<<<<<<<<<<
 *     """Get the extended tempo event type constant."""
 *     return at.kMusicEventType_ExtendedTempo
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_409get_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[214])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_extended_te, __pyx_t_2) < (0)) __PYX_ERR(0, 2759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2763
 *     return at.kMusicEventType_ExtendedTempo
 * 
 * def get_music_event_type_user():             # <<<<<<<<<<<<<<
 *     """Get the user event type constant."""
 *     return at.kMusicEventType_User
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_411get_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[215])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_user, __pyx_t_2) < (0)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2767
 *     return at.kMusicEventType_User
 * 
 * def get_music_event_type_meta():             # <<<<<<<<<<<<<<
 *     """Get the meta event type constant."""
 *     return at.kMusicEventType_Meta
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_413get_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[216])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_meta, __pyx_t_2) < (0)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2771
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_415get_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[217])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_note_m, __pyx_t_2) < (0)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2775
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_417get_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[218])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_channe, __pyx_t_2) < (0)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2779
 *     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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_419get_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[219])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_midi_raw_da, __pyx_t_2) < (0)) __PYX_ERR(0, 2779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2783
 *     return at.kMusicEventType_MIDIRawData
 * 
 * def get_music_event_type_parameter():             # <<<<<<<<<<<<<<
 *     """Get the parameter event type constant."""
 *     return at.kMusicEventType_Parameter
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_421get_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[220])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_parameter, __pyx_t_2) < (0)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2787
 *     return at.kMusicEventType_Parameter
 * 
 * def get_music_event_type_au_preset():             # <<<<<<<<<<<<<<
 *     """Get the AU preset event type constant."""
 *     return at.kMusicEventType_AUPreset
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_423get_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[221])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_event_type_au_preset, __pyx_t_2) < (0)) __PYX_ERR(0, 2787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2791
 *     return at.kMusicEventType_AUPreset
 * 
 * def get_music_sequence_type_beats():             # <<<<<<<<<<<<<<
 *     """Get the beats sequence type constant."""
 *     return at.kMusicSequenceType_Beats
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_425get_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[222])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_beats, __pyx_t_2) < (0)) __PYX_ERR(0, 2791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2795
 *     return at.kMusicSequenceType_Beats
 * 
 * def get_music_sequence_type_seconds():             # <<<<<<<<<<<<<<
 *     """Get the seconds sequence type constant."""
 *     return at.kMusicSequenceType_Seconds
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_427get_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[223])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_seconds, __pyx_t_2) < (0)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2799
 *     return at.kMusicSequenceType_Seconds
 * 
 * def get_music_sequence_type_samples():             # <<<<<<<<<<<<<<
 *     """Get the samples sequence type constant."""
 *     return at.kMusicSequenceType_Samples
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_429get_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[224])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_type_samples, __pyx_t_2) < (0)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2803
 *     return at.kMusicSequenceType_Samples
 * 
 * def get_music_sequence_file_any_type():             # <<<<<<<<<<<<<<
 *     """Get the any file type constant."""
 *     return at.kMusicSequenceFile_AnyType
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_431get_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[225])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_any_type, __pyx_t_2) < (0)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2807
 *     return at.kMusicSequenceFile_AnyType
 * 
 * def get_music_sequence_file_midi_type():             # <<<<<<<<<<<<<<
 *     """Get the MIDI file type constant."""
 *     return at.kMusicSequenceFile_MIDIType
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_433get_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[226])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_midi_typ, __pyx_t_2) < (0)) __PYX_ERR(0, 2807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2811
 *     return at.kMusicSequenceFile_MIDIType
 * 
 * def get_music_sequence_file_imelody_type():             # <<<<<<<<<<<<<<
 *     """Get the iMelody file type constant."""
 *     return at.kMusicSequenceFile_iMelodyType
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_435get_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[227])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_music_sequence_file_imelody, __pyx_t_2) < (0)) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2815
 *     return at.kMusicSequenceFile_iMelodyType
 * 
 * def get_sequence_track_property_loop_info():             # <<<<<<<<<<<<<<
 *     """Get the loop info track property constant."""
 *     return at.kSequenceTrackProperty_LoopInfo
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_437get_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[228])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_loop, __pyx_t_2) < (0)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2819
 *     return at.kSequenceTrackProperty_LoopInfo
 * 
 * def get_sequence_track_property_offset_time():             # <<<<<<<<<<<<<<
 *     """Get the offset time track property constant."""
 *     return at.kSequenceTrackProperty_OffsetTime
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_439get_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[229])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_offs, __pyx_t_2) < (0)) __PYX_ERR(0, 2819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2823
 *     return at.kSequenceTrackProperty_OffsetTime
 * 
 * def get_sequence_track_property_mute_status():             # <<<<<<<<<<<<<<
 *     """Get the mute status track property constant."""
 *     return at.kSequenceTrackProperty_MuteStatus
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_441get_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[230])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_mute, __pyx_t_2) < (0)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2827
 *     return at.kSequenceTrackProperty_MuteStatus
 * 
 * def get_sequence_track_property_solo_status():             # <<<<<<<<<<<<<<
 *     """Get the solo status track property constant."""
 *     return at.kSequenceTrackProperty_SoloStatus
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_443get_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[231])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_solo, __pyx_t_2) < (0)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2831
 *     return at.kSequenceTrackProperty_SoloStatus
 * 
 * def get_sequence_track_property_automated_parameters():             # <<<<<<<<<<<<<<
 *     """Get the automated parameters track property constant."""
 *     return at.kSequenceTrackProperty_AutomatedParameters
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_445get_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[232])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_auto, __pyx_t_2) < (0)) __PYX_ERR(0, 2831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2835
 *     return at.kSequenceTrackProperty_AutomatedParameters
 * 
 * def get_sequence_track_property_track_length():             # <<<<<<<<<<<<<<
 *     """Get the track length property constant."""
 *     return at.kSequenceTrackProperty_TrackLength
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_447get_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[233])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_trac, __pyx_t_2) < (0)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2839
 *     return at.kSequenceTrackProperty_TrackLength
 * 
 * def get_sequence_track_property_time_resolution():             # <<<<<<<<<<<<<<
 *     """Get the time resolution property constant."""
 *     return at.kSequenceTrackProperty_TimeResolution
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_449get_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[234])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_sequence_track_property_time, __pyx_t_2) < (0)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":2845
 * # 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_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyFloat_FromDouble(((double)1.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_Pack(2, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_451create_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[235])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 2845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2866
 *     }
 * 
 * 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, 2866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_453create_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[236])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 2866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2888
 * # Client functions
 * 
 * def midi_client_create(str name):             # <<<<<<<<<<<<<<
 *     """Create a MIDI client.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_455midi_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[237])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_client_create, __pyx_t_4) < (0)) __PYX_ERR(0, 2888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2917
 *         cf.CFRelease(cf_name)
 * 
 * def midi_client_dispose(long client):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI client.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_457midi_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[238])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_client_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 2917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2936
 * # 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_459midi_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[239])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 2936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2967
 *         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_461midi_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[240])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 2967, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":2998
 *         cf.CFRelease(cf_name)
 * 
 * def midi_port_dispose(long port):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI port.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_463midi_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[241])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_port_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3015
 *     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_465midi_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[242])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3034
 *     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_467midi_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[243])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3055
 * # 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_469midi_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[244])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3063
 *     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, 3063, __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, 3063, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_471midi_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[245])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __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_3) < (0)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3082
 *     return <long>device
 * 
 * def midi_device_get_number_of_entities(long device):             # <<<<<<<<<<<<<<
 *     """Get the number of entities in a device.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_473midi_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[246])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_get_number_of_entiti, __pyx_t_3) < (0)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3093
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_475midi_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[247])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_get_entity, __pyx_t_3) < (0)) __PYX_ERR(0, 3093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3114
 *     return <long>entity
 * 
 * def midi_entity_get_number_of_sources(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of sources in an entity.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_477midi_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[248])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_source, __pyx_t_3) < (0)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3125
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_479midi_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[249])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_source, __pyx_t_3) < (0)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3146
 *     return <long>source
 * 
 * def midi_entity_get_number_of_destinations(long entity):             # <<<<<<<<<<<<<<
 *     """Get the number of destinations in an entity.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_481midi_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[250])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_number_of_destin, __pyx_t_3) < (0)) __PYX_ERR(0, 3146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3157
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_483midi_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[251])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_entity_get_destination, __pyx_t_3) < (0)) __PYX_ERR(0, 3157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3178
 *     return <long>dest
 * 
 * def midi_get_number_of_sources():             # <<<<<<<<<<<<<<
 *     """Get the total number of MIDI sources in the system.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_485midi_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[252])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_number_of_sources, __pyx_t_3) < (0)) __PYX_ERR(0, 3178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":3186
 *     return cm.MIDIGetNumberOfSources()
 * 
 * def midi_get_source(int source_index) -> int:             # <<<<<<<<<<<<<<
 *     """Get a source by system-wide index.
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_487midi_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[253])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 3186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3205
 *     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_489midi_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[254])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3213
 *     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_491midi_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[255])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_destination, __pyx_t_4) < (0)) __PYX_ERR(0, 3213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3234
 * # 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_493midi_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[256])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_source_create, __pyx_t_4) < (0)) __PYX_ERR(0, 3234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3264
 *         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_495midi_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[257])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_destination_create, __pyx_t_4) < (0)) __PYX_ERR(0, 3264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3295
 *         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_497midi_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[258])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3314
 * # 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_499midi_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[259])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3374
 *         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_501midi_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[260])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3406
 *         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_503midi_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[261])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3445
 *         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_505midi_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[262])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3479
 * # 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_507midi_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[263])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3527
 *         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_509midi_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[264])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3541
 *     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_511midi_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[265])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3555
 *     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_513midi_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[266])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3569
 *     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_515midi_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[267])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3617
 *         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_517midi_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[268])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3667
 * # 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, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_519midi_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[269])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 3667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3726
 * # 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_521get_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[270])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3730
 *     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_523get_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[271])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3734
 *     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_525get_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[272])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3738
 *     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_527get_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[273])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3742
 *     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_529get_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[274])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3746
 *     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_531get_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[275])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3750
 *     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_533get_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[276])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3754
 *     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_535get_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[277])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3758
 *     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_537get_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[278])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3762
 *     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_539get_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[279])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3766
 *     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_541get_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[280])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3770
 *     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_543get_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[281])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3774
 *     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_545get_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[282])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3778
 *     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_547get_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[283])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3782
 *     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_549get_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[284])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3786
 *     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_551get_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[285])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3790
 *     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_553get_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[286])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3794
 *     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_555get_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[287])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3798
 *     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_557get_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[288])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3802
 *     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_559get_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[289])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3806
 *     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_561get_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[290])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3810
 *     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_563get_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[291])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3814
 *     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_565get_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[292])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3818
 *     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_567get_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[293])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3822
 *     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_569get_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[294])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3822, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3826
 *     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_571get_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[295])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3830
 *     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_573get_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[296])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3836
 * # 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_575get_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[297])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3840
 *     return "name"
 * 
 * def get_midi_property_manufacturer():             # <<<<<<<<<<<<<<
 *     """Get the 'manufacturer' property key."""
 *     return "manufacturer"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_577get_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[298])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3844
 *     return "manufacturer"
 * 
 * def get_midi_property_model():             # <<<<<<<<<<<<<<
 *     """Get the 'model' property key."""
 *     return "model"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_579get_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[299])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3848
 *     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_581get_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[300])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3852
 *     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_583get_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[301])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3856
 *     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_585get_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[302])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3860
 *     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_587get_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[303])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3864
 *     return "transmitChannels"
 * 
 * def get_midi_property_offline():             # <<<<<<<<<<<<<<
 *     """Get the 'offline' property key."""
 *     return "offline"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_589get_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[304])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3868
 *     return "offline"
 * 
 * def get_midi_property_private():             # <<<<<<<<<<<<<<
 *     """Get the 'private' property key."""
 *     return "private"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_591get_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[305])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3872
 *     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_593get_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[306])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3876
 *     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_595get_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[307])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3883
 * # 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_597midi_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[308])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3896
 * # 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_599midi1_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[309])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3912
 *                                            <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_601midi1_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[310])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3927
 *                                <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_603midi1_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[311])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3942
 *                               <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_605midi1_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[312])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3957
 *                                      <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_607midi1_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[313])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3972
 *                                  <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_609midi1_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[314])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 3972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":3987
 *                                     <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_611midi1_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[315])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi1_up_sysex, __pyx_t_4) < (0)) __PYX_ERR(0, 3987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4006
 * # 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_613midi2_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[316])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4023
 *     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_615midi2_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[317])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_note_on, __pyx_t_4) < (0)) __PYX_ERR(0, 4023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4041
 *     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_617midi2_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[318])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_note_off, __pyx_t_4) < (0)) __PYX_ERR(0, 4041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4059
 *     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_619midi2_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[319])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_control_change, __pyx_t_4) < (0)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4075
 *     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_621midi2_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[320])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_program_change, __pyx_t_4) < (0)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4093
 *     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_623midi2_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[321])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi2_pitch_bend, __pyx_t_4) < (0)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4109
 * # 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_625get_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[322])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4113
 *     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_627get_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[323])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4117
 *     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_629get_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[324])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4121
 *     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_631get_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[325])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4125
 *     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_633get_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[326])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4129
 *     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_635get_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[327])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4135
 * # 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_637get_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[328])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4139
 *     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_639get_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[329])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4143
 *     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_641get_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[330])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4147
 *     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_643get_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[331])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4151
 *     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_645get_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[332])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4155
 *     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_647get_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[333])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4159
 *     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_649get_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[334])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4166
 * # 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_651midi_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[335])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4214
 *             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_653midi_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[336])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4260
 *             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_655midi_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[337])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4283
 *     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_657midi_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[338])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4308
 *     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_659midi_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[339])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4327
 *     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_661midi_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[340])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4346
 *     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_663midi_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[341])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4365
 *     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_665midi_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[342])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4384
 *     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_667midi_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[343])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4436
 * # 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_669midi_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[344])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_create, __pyx_t_4) < (0)) __PYX_ERR(0, 4436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4487
 *             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_671midi_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[345])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_device_dispose, __pyx_t_4) < (0)) __PYX_ERR(0, 4487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4506
 *     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_673midi_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[346])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4517
 *     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_675midi_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[347])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4544
 *     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_677midi_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[348])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4566
 *     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_679midi_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[349])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  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, 4566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "coremusic/capi.pyx":4585
 *     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, 4585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyLong_From_long(((long)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_Pack(2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_681midi_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[350])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_set_ref_cons, __pyx_t_3) < (0)) __PYX_ERR(0, 4585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4610
 *     return status
 * 
 * def midi_endpoint_get_ref_cons(long endpoint):             # <<<<<<<<<<<<<<
 *     """Get reference constants for a MIDI endpoint.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_683midi_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[351])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_endpoint_get_ref_cons, __pyx_t_3) < (0)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4633
 *     return (<long>ref1, <long>ref2)
 * 
 * def midi_get_driver_io_runloop():             # <<<<<<<<<<<<<<
 *     """Get the driver I/O run loop.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_685midi_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[352])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_driver_io_runloop, __pyx_t_3) < (0)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4645
 *     return <long>runloop
 * 
 * def midi_get_driver_device_list(long driver):             # <<<<<<<<<<<<<<
 *     """Get the device list for a specific driver.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_687midi_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[353])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_get_driver_device_list, __pyx_t_3) < (0)) __PYX_ERR(0, 4645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4661
 *     return dev_list
 * 
 * def midi_driver_enable_monitoring(long driver, bint enabled):             # <<<<<<<<<<<<<<
 *     """Enable or disable MIDI monitoring for a driver.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_689midi_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[354])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_driver_enable_monitoring, __pyx_t_3) < (0)) __PYX_ERR(0, 4661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4690
 * # MIDI Thru Connection Functions
 * 
 * def midi_thru_connection_params_initialize():             # <<<<<<<<<<<<<<
 *     """Initialize a MIDIThruConnectionParams structure with default values.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_691midi_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[355])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_params_init, __pyx_t_3) < (0)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4730
 *     return result
 * 
 * def midi_thru_connection_create(str persistent_owner_id=None, dict connection_params=None):             # <<<<<<<<<<<<<<
 *     """Create a MIDI thru connection.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_693midi_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[356])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[16]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_create, __pyx_t_3) < (0)) __PYX_ERR(0, 4730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4837
 *             cf.CFRelease(cf_owner_id)
 * 
 * def midi_thru_connection_dispose(long connection):             # <<<<<<<<<<<<<<
 *     """Dispose a MIDI thru connection.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_695midi_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[357])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_dispose, __pyx_t_3) < (0)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4856
 *     return status
 * 
 * def midi_thru_connection_get_params(long connection):             # <<<<<<<<<<<<<<
 *     """Get the parameters of a MIDI thru connection.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_697midi_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[358])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_get_params, __pyx_t_3) < (0)) __PYX_ERR(0, 4856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":4937
 *             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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_699midi_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[359])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_set_params, __pyx_t_3) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5001
 *             cf.CFRelease(cf_params)
 * 
 * def midi_thru_connection_find(str persistent_owner_id):             # <<<<<<<<<<<<<<
 *     """Find all thru connections created by a specific owner.
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_701midi_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[360])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_midi_thru_connection_find, __pyx_t_3) < (0)) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5053
 * # MIDI Thru Connection Constants
 * 
 * def get_midi_transform_none():             # <<<<<<<<<<<<<<
 *     """Get the 'None' transform type constant."""
 *     return cm.kMIDITransform_None
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_703get_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[361])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_none, __pyx_t_3) < (0)) __PYX_ERR(0, 5053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5057
 *     return cm.kMIDITransform_None
 * 
 * def get_midi_transform_filter_out():             # <<<<<<<<<<<<<<
 *     """Get the 'FilterOut' transform type constant."""
 *     return cm.kMIDITransform_FilterOut
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_705get_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[362])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_filter_out, __pyx_t_3) < (0)) __PYX_ERR(0, 5057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5061
 *     return cm.kMIDITransform_FilterOut
 * 
 * def get_midi_transform_map_control():             # <<<<<<<<<<<<<<
 *     """Get the 'MapControl' transform type constant."""
 *     return cm.kMIDITransform_MapControl
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_707get_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[363])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_control, __pyx_t_3) < (0)) __PYX_ERR(0, 5061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5065
 *     return cm.kMIDITransform_MapControl
 * 
 * def get_midi_transform_add():             # <<<<<<<<<<<<<<
 *     """Get the 'Add' transform type constant."""
 *     return cm.kMIDITransform_Add
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_709get_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[364])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_add, __pyx_t_3) < (0)) __PYX_ERR(0, 5065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5069
 *     return cm.kMIDITransform_Add
 * 
 * def get_midi_transform_scale():             # <<<<<<<<<<<<<<
 *     """Get the 'Scale' transform type constant."""
 *     return cm.kMIDITransform_Scale
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_711get_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[365])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_scale, __pyx_t_3) < (0)) __PYX_ERR(0, 5069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5073
 *     return cm.kMIDITransform_Scale
 * 
 * def get_midi_transform_min_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MinValue' transform type constant."""
 *     return cm.kMIDITransform_MinValue
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_713get_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[366])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_min_value, __pyx_t_3) < (0)) __PYX_ERR(0, 5073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5077
 *     return cm.kMIDITransform_MinValue
 * 
 * def get_midi_transform_max_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MaxValue' transform type constant."""
 *     return cm.kMIDITransform_MaxValue
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_715get_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[367])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_max_value, __pyx_t_3) < (0)) __PYX_ERR(0, 5077, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5081
 *     return cm.kMIDITransform_MaxValue
 * 
 * def get_midi_transform_map_value():             # <<<<<<<<<<<<<<
 *     """Get the 'MapValue' transform type constant."""
 *     return cm.kMIDITransform_MapValue
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_717get_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[368])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_transform_map_value, __pyx_t_3) < (0)) __PYX_ERR(0, 5081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5085
 *     return cm.kMIDITransform_MapValue
 * 
 * def get_midi_control_type_7bit():             # <<<<<<<<<<<<<<
 *     """Get the '7Bit' control type constant."""
 *     return cm.kMIDIControlType_7Bit
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_719get_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[369])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit, __pyx_t_3) < (0)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5089
 *     return cm.kMIDIControlType_7Bit
 * 
 * def get_midi_control_type_14bit():             # <<<<<<<<<<<<<<
 *     """Get the '14Bit' control type constant."""
 *     return cm.kMIDIControlType_14Bit
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_721get_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[370])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit, __pyx_t_3) < (0)) __PYX_ERR(0, 5089, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5093
 *     return cm.kMIDIControlType_14Bit
 * 
 * def get_midi_control_type_7bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitRPN
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_723get_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[371])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_rpn, __pyx_t_3) < (0)) __PYX_ERR(0, 5093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5097
 *     return cm.kMIDIControlType_7BitRPN
 * 
 * def get_midi_control_type_14bit_rpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitRPN
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_725get_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[372])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_rpn, __pyx_t_3) < (0)) __PYX_ERR(0, 5097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5101
 *     return cm.kMIDIControlType_14BitRPN
 * 
 * def get_midi_control_type_7bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '7BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_7BitNRPN
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_727get_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[373])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_7bit_nrpn, __pyx_t_3) < (0)) __PYX_ERR(0, 5101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5105
 *     return cm.kMIDIControlType_7BitNRPN
 * 
 * def get_midi_control_type_14bit_nrpn():             # <<<<<<<<<<<<<<
 *     """Get the '14BitNRPN' control type constant."""
 *     return cm.kMIDIControlType_14BitNRPN
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_729get_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[374])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_control_type_14bit_nrpn, __pyx_t_3) < (0)) __PYX_ERR(0, 5105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5109
 *     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_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_731get_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[375])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_midi_thru_connection_max_end, __pyx_t_3) < (0)) __PYX_ERR(0, 5109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5147
 *         return self._is_disposed
 * 
 *     def dispose(self) -> None:             # <<<<<<<<<<<<<<
 *         """Explicitly dispose of the object's resources"""
 *         if not self._is_disposed:
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 5147, __pyx_L1_error)
  __pyx_t_2 = __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[376])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_dispose, __pyx_t_2) < (0)) __PYX_ERR(0, 5147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5157
 *         self._object_id = 0
 * 
 *     def _ensure_not_disposed(self) -> None:             # <<<<<<<<<<<<<<
 *         """Ensure the object has not been disposed"""
 *         if self._is_disposed:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 5157, __pyx_L1_error)
  __pyx_t_3 = __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[377])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_ensure_not_disposed, __pyx_t_3) < (0)) __PYX_ERR(0, 5157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5167
 *         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_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_object_id, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5167, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __pyx_t_2 = __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[378])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9coremusic_4capi_CoreAudioObject, __pyx_mstate_global->__pyx_n_u_set_object_id, __pyx_t_2) < (0)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __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[379])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __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[380])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5176
 * # ============================================================================
 * 
 * def au_graph_new() -> int:             # <<<<<<<<<<<<<<
 *     """Create a new AUGraph
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_733au_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[381])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_new, __pyx_t_3) < (0)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5195
 * 
 * 
 * def au_graph_dispose(long graph_id):             # <<<<<<<<<<<<<<
 *     """Dispose an AUGraph
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_735au_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[382])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_dispose, __pyx_t_3) < (0)) __PYX_ERR(0, 5195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5209
 * 
 * 
 * def au_graph_open(long graph_id):             # <<<<<<<<<<<<<<
 *     """Open an AUGraph (opens AudioUnits but doesn't initialize)
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_737au_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[383])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_open, __pyx_t_3) < (0)) __PYX_ERR(0, 5209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5223
 * 
 * 
 * def au_graph_close(long graph_id):             # <<<<<<<<<<<<<<
 *     """Close an AUGraph
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_739au_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[384])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_close, __pyx_t_3) < (0)) __PYX_ERR(0, 5223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5237
 * 
 * 
 * def au_graph_initialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Initialize an AUGraph (prepares for rendering)
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_741au_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[385])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_initialize, __pyx_t_3) < (0)) __PYX_ERR(0, 5237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5251
 * 
 * 
 * def au_graph_uninitialize(long graph_id):             # <<<<<<<<<<<<<<
 *     """Uninitialize an AUGraph
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_743au_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[386])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_uninitialize, __pyx_t_3) < (0)) __PYX_ERR(0, 5251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5265
 * 
 * 
 * def au_graph_start(long graph_id):             # <<<<<<<<<<<<<<
 *     """Start an AUGraph (begins rendering)
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_745au_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[387])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_start, __pyx_t_3) < (0)) __PYX_ERR(0, 5265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5279
 * 
 * 
 * def au_graph_stop(long graph_id):             # <<<<<<<<<<<<<<
 *     """Stop an AUGraph (stops rendering)
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_747au_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[388])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_stop, __pyx_t_3) < (0)) __PYX_ERR(0, 5279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5293
 * 
 * 
 * def au_graph_is_open(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is open
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_749au_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[389])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_open, __pyx_t_2) < (0)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5312
 * 
 * 
 * def au_graph_is_initialized(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is initialized
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_751au_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[390])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_initialized, __pyx_t_3) < (0)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5331
 * 
 * 
 * def au_graph_is_running(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Check if AUGraph is running
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 5331, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_753au_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[391])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_is_running, __pyx_t_2) < (0)) __PYX_ERR(0, 5331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5350
 * 
 * 
 * def au_graph_add_node(long graph_id, dict description) -> int:             # <<<<<<<<<<<<<<
 *     """Add a node to an AUGraph
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5350, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_755au_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[392])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_add_node, __pyx_t_3) < (0)) __PYX_ERR(0, 5350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5382
 * 
 * 
 * def au_graph_remove_node(long graph_id, int node_id):             # <<<<<<<<<<<<<<
 *     """Remove a node from an AUGraph
 * 
*/
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_757au_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[393])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_remove_node, __pyx_t_3) < (0)) __PYX_ERR(0, 5382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5397
 * 
 * 
 * def au_graph_get_node_count(long graph_id) -> int:             # <<<<<<<<<<<<<<
 *     """Get the number of nodes in an AUGraph
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_759au_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[394])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_node_count, __pyx_t_2) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5416
 * 
 * 
 * def au_graph_get_ind_node(long graph_id, int index) -> int:             # <<<<<<<<<<<<<<
 *     """Get node at index
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_761au_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[395])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_ind_node, __pyx_t_3) < (0)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5436
 * 
 * 
 * def au_graph_node_info(long graph_id, int node_id) -> tuple:             # <<<<<<<<<<<<<<
 *     """Get information about a node
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_tuple) < (0)) __PYX_ERR(0, 5436, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_763au_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[396])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_node_info, __pyx_t_2) < (0)) __PYX_ERR(0, 5436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5468
 * 
 * 
 * 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_765au_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[397])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_connect_node_input, __pyx_t_2) < (0)) __PYX_ERR(0, 5468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5495
 * 
 * 
 * def au_graph_disconnect_node_input(long graph_id, int dest_node, int dest_input):             # <<<<<<<<<<<<<<
 *     """Disconnect a node's input
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_767au_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[398])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_disconnect_node_input, __pyx_t_2) < (0)) __PYX_ERR(0, 5495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5517
 * 
 * 
 * def au_graph_clear_connections(long graph_id):             # <<<<<<<<<<<<<<
 *     """Clear all connections in a graph
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_769au_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[399])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_clear_connections, __pyx_t_2) < (0)) __PYX_ERR(0, 5517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5531
 * 
 * 
 * def au_graph_update(long graph_id) -> bool:             # <<<<<<<<<<<<<<
 *     """Update the graph after making changes
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 5531, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_771au_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[400])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_update, __pyx_t_3) < (0)) __PYX_ERR(0, 5531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5550
 * 
 * 
 * def au_graph_get_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get current CPU load of the graph
 * 
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_773au_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[401])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_cpu_load, __pyx_t_2) < (0)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5569
 * 
 * 
 * def au_graph_get_max_cpu_load(long graph_id) -> float:             # <<<<<<<<<<<<<<
 *     """Get maximum CPU load of the graph since last query
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_float) < (0)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_775au_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[402])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_au_graph_get_max_cpu_load, __pyx_t_3) < (0)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5589
 * 
 * # AUGraph error code getters
 * def get_au_graph_err_node_not_found() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for node not found"""
 *     return -10860
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_777get_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[403])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_node_not_found, __pyx_t_2) < (0)) __PYX_ERR(0, 5589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5593
 *     return -10860
 * 
 * def get_au_graph_err_invalid_connection() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid connection"""
 *     return -10861
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_779get_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[404])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_connect, __pyx_t_3) < (0)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5597
 *     return -10861
 * 
 * def get_au_graph_err_output_node_err() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for output node error"""
 *     return -10862
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_781get_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[405])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_output_node_err, __pyx_t_2) < (0)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":5601
 *     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_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_783get_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[406])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_3) < (0)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "coremusic/capi.pyx":5605
 *     return -10863
 * 
 * def get_au_graph_err_invalid_audio_unit() -> int:             # <<<<<<<<<<<<<<
 *     """Get error code for invalid audio unit"""
 *     return -10864
*/
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9coremusic_4capi_785get_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[407])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_au_graph_err_invalid_audio_u, __pyx_t_2) < (0)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "coremusic/capi.pyx":1
 * from . cimport corefoundation as cf             # <<<<<<<<<<<<<<
 * from . cimport coreaudiotypes as ct
 * from . cimport audiotoolbox as at
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_fourchar_to_int_line_11, __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_2, __pyx_mstate_global->__pyx_kp_u_int_to_fourchar_line_21, __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_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  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 ### */

typedef struct {
    const char *s;
#if 179 <= 65535
    const unsigned short n;
#elif 179 / 2 < INT_MAX
    const unsigned int n;
#elif 179 / 2 < LONG_MAX
    const unsigned long n;
#else
    const Py_ssize_t n;
#endif
#if 1 <= 31
    const unsigned int encoding : 5;
#elif 1 <= 255
    const unsigned char encoding;
#elif 1 <= 65535
    const unsigned short encoding;
#else
    const Py_ssize_t encoding;
#endif
    const unsigned int is_unicode : 1;
    const unsigned int intern : 1;
} __Pyx_StringTabEntry;
static const char * const __pyx_string_tab_encodings[] = { 0 };
static const __Pyx_StringTabEntry __pyx_string_tab[] = {
  {__pyx_k_, sizeof(__pyx_k_), 0, 0, 0}, /* PyObject cname: __pyx_kp_b_ */
  {__pyx_k_AUGraphAddNode_failed_with_statu, sizeof(__pyx_k_AUGraphAddNode_failed_with_statu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphAddNode_failed_with_statu */
  {__pyx_k_AUGraphClearConnections_failed_w, sizeof(__pyx_k_AUGraphClearConnections_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphClearConnections_failed_w */
  {__pyx_k_AUGraphClose_failed_with_status, sizeof(__pyx_k_AUGraphClose_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphClose_failed_with_status */
  {__pyx_k_AUGraphConnectNodeInput_failed_w, sizeof(__pyx_k_AUGraphConnectNodeInput_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphConnectNodeInput_failed_w */
  {__pyx_k_AUGraphDisconnectNodeInput_faile, sizeof(__pyx_k_AUGraphDisconnectNodeInput_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphDisconnectNodeInput_faile */
  {__pyx_k_AUGraphGetCPULoad_failed_with_st, sizeof(__pyx_k_AUGraphGetCPULoad_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphGetCPULoad_failed_with_st */
  {__pyx_k_AUGraphGetIndNode_failed_with_st, sizeof(__pyx_k_AUGraphGetIndNode_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphGetIndNode_failed_with_st */
  {__pyx_k_AUGraphGetMaxCPULoad_failed_with, sizeof(__pyx_k_AUGraphGetMaxCPULoad_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphGetMaxCPULoad_failed_with */
  {__pyx_k_AUGraphGetNodeCount_failed_with, sizeof(__pyx_k_AUGraphGetNodeCount_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphGetNodeCount_failed_with */
  {__pyx_k_AUGraphInitialize_failed_with_st, sizeof(__pyx_k_AUGraphInitialize_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphInitialize_failed_with_st */
  {__pyx_k_AUGraphIsInitialized_failed_with, sizeof(__pyx_k_AUGraphIsInitialized_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphIsInitialized_failed_with */
  {__pyx_k_AUGraphIsOpen_failed_with_status, sizeof(__pyx_k_AUGraphIsOpen_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphIsOpen_failed_with_status */
  {__pyx_k_AUGraphIsRunning_failed_with_sta, sizeof(__pyx_k_AUGraphIsRunning_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphIsRunning_failed_with_sta */
  {__pyx_k_AUGraphNodeInfo_failed_with_stat, sizeof(__pyx_k_AUGraphNodeInfo_failed_with_stat), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphNodeInfo_failed_with_stat */
  {__pyx_k_AUGraphOpen_failed_with_status, sizeof(__pyx_k_AUGraphOpen_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphOpen_failed_with_status */
  {__pyx_k_AUGraphRemoveNode_failed_with_st, sizeof(__pyx_k_AUGraphRemoveNode_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphRemoveNode_failed_with_st */
  {__pyx_k_AUGraphStart_failed_with_status, sizeof(__pyx_k_AUGraphStart_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphStart_failed_with_status */
  {__pyx_k_AUGraphStop_failed_with_status, sizeof(__pyx_k_AUGraphStop_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphStop_failed_with_status */
  {__pyx_k_AUGraphUninitialize_failed_with, sizeof(__pyx_k_AUGraphUninitialize_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphUninitialize_failed_with */
  {__pyx_k_AUGraphUpdate_failed_with_status, sizeof(__pyx_k_AUGraphUpdate_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AUGraphUpdate_failed_with_status */
  {__pyx_k_All_components_needed_for_real, sizeof(__pyx_k_All_components_needed_for_real), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_All_components_needed_for_real */
  {__pyx_k_All_low_level_CoreAudio_APIs_ar, sizeof(__pyx_k_All_low_level_CoreAudio_APIs_ar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_All_low_level_CoreAudio_APIs_ar */
  {__pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AssertionError */
  {__pyx_k_AudioComponentGetDescription_fai, sizeof(__pyx_k_AudioComponentGetDescription_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioComponentGetDescription_fai */
  {__pyx_k_AudioComponentInstanceDispose_fa, sizeof(__pyx_k_AudioComponentInstanceDispose_fa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioComponentInstanceDispose_fa */
  {__pyx_k_AudioComponentInstanceNew_failed, sizeof(__pyx_k_AudioComponentInstanceNew_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioComponentInstanceNew_failed */
  {__pyx_k_AudioComponent_discovery_and_in, sizeof(__pyx_k_AudioComponent_discovery_and_in), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioComponent_discovery_and_in */
  {__pyx_k_AudioConverterConvertBuffer_fail, sizeof(__pyx_k_AudioConverterConvertBuffer_fail), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterConvertBuffer_fail */
  {__pyx_k_AudioConverterDispose_failed_wit, sizeof(__pyx_k_AudioConverterDispose_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterDispose_failed_wit */
  {__pyx_k_AudioConverterFillComplexBuffer, sizeof(__pyx_k_AudioConverterFillComplexBuffer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterFillComplexBuffer */
  {__pyx_k_AudioConverterGetPropertyInfo_fa, sizeof(__pyx_k_AudioConverterGetPropertyInfo_fa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterGetPropertyInfo_fa */
  {__pyx_k_AudioConverterGetProperty_failed, sizeof(__pyx_k_AudioConverterGetProperty_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterGetProperty_failed */
  {__pyx_k_AudioConverterNew_failed_with_st, sizeof(__pyx_k_AudioConverterNew_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterNew_failed_with_st */
  {__pyx_k_AudioConverterReset_failed_with, sizeof(__pyx_k_AudioConverterReset_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterReset_failed_with */
  {__pyx_k_AudioConverterSetProperty_failed, sizeof(__pyx_k_AudioConverterSetProperty_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioConverterSetProperty_failed */
  {__pyx_k_AudioFileClose_failed_with_statu, sizeof(__pyx_k_AudioFileClose_failed_with_statu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileClose_failed_with_statu */
  {__pyx_k_AudioFileGetPropertyInfo_failed, sizeof(__pyx_k_AudioFileGetPropertyInfo_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileGetPropertyInfo_failed */
  {__pyx_k_AudioFileGetProperty_failed_with, sizeof(__pyx_k_AudioFileGetProperty_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileGetProperty_failed_with */
  {__pyx_k_AudioFileOpenURL_failed_with_sta, sizeof(__pyx_k_AudioFileOpenURL_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileOpenURL_failed_with_sta */
  {__pyx_k_AudioFileReadPackets_failed_with, sizeof(__pyx_k_AudioFileReadPackets_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileReadPackets_failed_with */
  {__pyx_k_AudioFileStreamClose_failed_with, sizeof(__pyx_k_AudioFileStreamClose_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamClose_failed_with */
  {__pyx_k_AudioFileStreamGetPropertyInfo_f, sizeof(__pyx_k_AudioFileStreamGetPropertyInfo_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamGetPropertyInfo_f */
  {__pyx_k_AudioFileStreamGetProperty_faile, sizeof(__pyx_k_AudioFileStreamGetProperty_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamGetProperty_faile */
  {__pyx_k_AudioFileStreamOpen_failed_with, sizeof(__pyx_k_AudioFileStreamOpen_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamOpen_failed_with */
  {__pyx_k_AudioFileStreamParseBytes_failed, sizeof(__pyx_k_AudioFileStreamParseBytes_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamParseBytes_failed */
  {__pyx_k_AudioFileStreamSeek_failed_with, sizeof(__pyx_k_AudioFileStreamSeek_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioFileStreamSeek_failed_with */
  {__pyx_k_AudioObjectGetPropertyDataSize_f, sizeof(__pyx_k_AudioObjectGetPropertyDataSize_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioObjectGetPropertyDataSize_f */
  {__pyx_k_AudioObjectGetPropertyData_faile, sizeof(__pyx_k_AudioObjectGetPropertyData_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioObjectGetPropertyData_faile */
  {__pyx_k_AudioOutputUnitStart_failed_with, sizeof(__pyx_k_AudioOutputUnitStart_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioOutputUnitStart_failed_with */
  {__pyx_k_AudioOutputUnitStop_failed_with, sizeof(__pyx_k_AudioOutputUnitStop_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioOutputUnitStop_failed_with */
  {__pyx_k_AudioPlayer, sizeof(__pyx_k_AudioPlayer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer */
  {__pyx_k_AudioPlayer___reduce_cython, sizeof(__pyx_k_AudioPlayer___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer___reduce_cython */
  {__pyx_k_AudioPlayer___setstate_cython, sizeof(__pyx_k_AudioPlayer___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer___setstate_cython */
  {__pyx_k_AudioPlayer_get_progress, sizeof(__pyx_k_AudioPlayer_get_progress), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_get_progress */
  {__pyx_k_AudioPlayer_is_playing, sizeof(__pyx_k_AudioPlayer_is_playing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_is_playing */
  {__pyx_k_AudioPlayer_load_file, sizeof(__pyx_k_AudioPlayer_load_file), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_load_file */
  {__pyx_k_AudioPlayer_not_initialized_Call, sizeof(__pyx_k_AudioPlayer_not_initialized_Call), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioPlayer_not_initialized_Call */
  {__pyx_k_AudioPlayer_reset_playback, sizeof(__pyx_k_AudioPlayer_reset_playback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_reset_playback */
  {__pyx_k_AudioPlayer_set_looping, sizeof(__pyx_k_AudioPlayer_set_looping), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_set_looping */
  {__pyx_k_AudioPlayer_setup_output, sizeof(__pyx_k_AudioPlayer_setup_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_setup_output */
  {__pyx_k_AudioPlayer_start, sizeof(__pyx_k_AudioPlayer_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_start */
  {__pyx_k_AudioPlayer_stop, sizeof(__pyx_k_AudioPlayer_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AudioPlayer_stop */
  {__pyx_k_AudioQueueAllocateBuffer_failed, sizeof(__pyx_k_AudioQueueAllocateBuffer_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueAllocateBuffer_failed */
  {__pyx_k_AudioQueueDispose_failed_with_st, sizeof(__pyx_k_AudioQueueDispose_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueDispose_failed_with_st */
  {__pyx_k_AudioQueueEnqueueBuffer_failed_w, sizeof(__pyx_k_AudioQueueEnqueueBuffer_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueEnqueueBuffer_failed_w */
  {__pyx_k_AudioQueueNewOutput_failed_with, sizeof(__pyx_k_AudioQueueNewOutput_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueNewOutput_failed_with */
  {__pyx_k_AudioQueueStart_failed_with_stat, sizeof(__pyx_k_AudioQueueStart_failed_with_stat), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueStart_failed_with_stat */
  {__pyx_k_AudioQueueStop_failed_with_statu, sizeof(__pyx_k_AudioQueueStop_failed_with_statu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioQueueStop_failed_with_statu */
  {__pyx_k_AudioServicesCreateSystemSoundID, sizeof(__pyx_k_AudioServicesCreateSystemSoundID), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioServicesCreateSystemSoundID */
  {__pyx_k_AudioServicesDisposeSystemSoundI, sizeof(__pyx_k_AudioServicesDisposeSystemSoundI), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioServicesDisposeSystemSoundI */
  {__pyx_k_AudioServicesGetPropertyInfo_fai, sizeof(__pyx_k_AudioServicesGetPropertyInfo_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioServicesGetPropertyInfo_fai */
  {__pyx_k_AudioServicesGetProperty_failed, sizeof(__pyx_k_AudioServicesGetProperty_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioServicesGetProperty_failed */
  {__pyx_k_AudioServicesSetProperty_failed, sizeof(__pyx_k_AudioServicesSetProperty_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioServicesSetProperty_failed */
  {__pyx_k_AudioUnitGetPropertyInfo_failed, sizeof(__pyx_k_AudioUnitGetPropertyInfo_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnitGetPropertyInfo_failed */
  {__pyx_k_AudioUnitGetProperty_failed_with, sizeof(__pyx_k_AudioUnitGetProperty_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnitGetProperty_failed_with */
  {__pyx_k_AudioUnitInitialize_failed_with, sizeof(__pyx_k_AudioUnitInitialize_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnitInitialize_failed_with */
  {__pyx_k_AudioUnitSetProperty_failed_with, sizeof(__pyx_k_AudioUnitSetProperty_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnitSetProperty_failed_with */
  {__pyx_k_AudioUnitUninitialize_failed_wit, sizeof(__pyx_k_AudioUnitUninitialize_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnitUninitialize_failed_wit */
  {__pyx_k_AudioUnit_Callback_Infrastructur, sizeof(__pyx_k_AudioUnit_Callback_Infrastructur), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnit_Callback_Infrastructur */
  {__pyx_k_AudioUnit_lifecycle_management, sizeof(__pyx_k_AudioUnit_lifecycle_management), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnit_lifecycle_management */
  {__pyx_k_AudioUnit_property_setting_for, sizeof(__pyx_k_AudioUnit_property_setting_for), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_AudioUnit_property_setting_for */
  {__pyx_k_BPM_must_be_greater_than_zero, sizeof(__pyx_k_BPM_must_be_greater_than_zero), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_BPM_must_be_greater_than_zero */
  {__pyx_k_Callback_functions_can_be_imple, sizeof(__pyx_k_Callback_functions_can_be_imple), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Callback_functions_can_be_imple */
  {__pyx_k_Callback_structure_definitions, sizeof(__pyx_k_Callback_structure_definitions), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Callback_structure_definitions */
  {__pyx_k_Convert_fourcc_chars_to_an_int_f, sizeof(__pyx_k_Convert_fourcc_chars_to_an_int_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Convert_fourcc_chars_to_an_int_f */
  {__pyx_k_CoreAudioObject, sizeof(__pyx_k_CoreAudioObject), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject */
  {__pyx_k_CoreAudioObject___reduce_cython, sizeof(__pyx_k_CoreAudioObject___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject___reduce_cython */
  {__pyx_k_CoreAudioObject___setstate_cytho, sizeof(__pyx_k_CoreAudioObject___setstate_cytho), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject___setstate_cytho */
  {__pyx_k_CoreAudioObject__ensure_not_disp, sizeof(__pyx_k_CoreAudioObject__ensure_not_disp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject__ensure_not_disp */
  {__pyx_k_CoreAudioObject__set_object_id, sizeof(__pyx_k_CoreAudioObject__set_object_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject__set_object_id */
  {__pyx_k_CoreAudioObject_dispose, sizeof(__pyx_k_CoreAudioObject_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CoreAudioObject_dispose */
  {__pyx_k_Could_not_add_packet_to_packet_l, sizeof(__pyx_k_Could_not_add_packet_to_packet_l), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_add_packet_to_packet_l */
  {__pyx_k_Could_not_allocate_buffer_for_pa, sizeof(__pyx_k_Could_not_allocate_buffer_for_pa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_buffer_for_pa */
  {__pyx_k_Could_not_allocate_buffer_for_pr, sizeof(__pyx_k_Could_not_allocate_buffer_for_pr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_buffer_for_pr */
  {__pyx_k_Could_not_allocate_buffer_for_st, sizeof(__pyx_k_Could_not_allocate_buffer_for_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_buffer_for_st */
  {__pyx_k_Could_not_allocate_memory_for_no, sizeof(__pyx_k_Could_not_allocate_memory_for_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_memory_for_no */
  {__pyx_k_Could_not_allocate_memory_for_pr, sizeof(__pyx_k_Could_not_allocate_memory_for_pr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_memory_for_pr */
  {__pyx_k_Could_not_allocate_packet_list, sizeof(__pyx_k_Could_not_allocate_packet_list), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_allocate_packet_list */
  {__pyx_k_Could_not_convert_CFString_to_C, sizeof(__pyx_k_Could_not_convert_CFString_to_C), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_convert_CFString_to_C */
  {__pyx_k_Could_not_create_CFString_from_n, sizeof(__pyx_k_Could_not_create_CFString_from_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_CFString_from_n */
  {__pyx_k_Could_not_create_CFString_from_p, sizeof(__pyx_k_Could_not_create_CFString_from_p), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_CFString_from_p */
  {__pyx_k_Could_not_create_CFString_from_p_2, sizeof(__pyx_k_Could_not_create_CFString_from_p_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_CFString_from_p_2 */
  {__pyx_k_Could_not_create_CFString_from_v, sizeof(__pyx_k_Could_not_create_CFString_from_v), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_CFString_from_v */
  {__pyx_k_Could_not_create_URL_for_file, sizeof(__pyx_k_Could_not_create_URL_for_file), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_URL_for_file */
  {__pyx_k_Could_not_create_URL_from_file_p, sizeof(__pyx_k_Could_not_create_URL_from_file_p), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_URL_from_file_p */
  {__pyx_k_Could_not_create_URL_from_file_p_2, sizeof(__pyx_k_Could_not_create_URL_from_file_p_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_create_URL_from_file_p_2 */
  {__pyx_k_Could_not_get_maximum_packet_siz, sizeof(__pyx_k_Could_not_get_maximum_packet_siz), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Could_not_get_maximum_packet_siz */
  {__pyx_k_Data_must_be_int_or_bytes, sizeof(__pyx_k_Data_must_be_int_or_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Data_must_be_int_or_bytes */
  {__pyx_k_Destination_index, sizeof(__pyx_k_Destination_index), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Destination_index */
  {__pyx_k_Device_index, sizeof(__pyx_k_Device_index), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Device_index */
  {__pyx_k_DisposeAUGraph_failed_with_statu, sizeof(__pyx_k_DisposeAUGraph_failed_with_statu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_DisposeAUGraph_failed_with_statu */
  {__pyx_k_DisposeMusicPlayer_failed_with_s, sizeof(__pyx_k_DisposeMusicPlayer_failed_with_s), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_DisposeMusicPlayer_failed_with_s */
  {__pyx_k_DisposeMusicSequence_failed_with, sizeof(__pyx_k_DisposeMusicSequence_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_DisposeMusicSequence_failed_with */
  {__pyx_k_Entity_index, sizeof(__pyx_k_Entity_index), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Entity_index */
  {__pyx_k_ExtAudioFileCreateWithURL_failed, sizeof(__pyx_k_ExtAudioFileCreateWithURL_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileCreateWithURL_failed */
  {__pyx_k_ExtAudioFileDispose_failed_with, sizeof(__pyx_k_ExtAudioFileDispose_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileDispose_failed_with */
  {__pyx_k_ExtAudioFileGetProperty_failed_w, sizeof(__pyx_k_ExtAudioFileGetProperty_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileGetProperty_failed_w */
  {__pyx_k_ExtAudioFileOpenURL_failed_with, sizeof(__pyx_k_ExtAudioFileOpenURL_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileOpenURL_failed_with */
  {__pyx_k_ExtAudioFileRead_failed_with_sta, sizeof(__pyx_k_ExtAudioFileRead_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileRead_failed_with_sta */
  {__pyx_k_ExtAudioFileSetProperty_failed_w, sizeof(__pyx_k_ExtAudioFileSetProperty_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileSetProperty_failed_w */
  {__pyx_k_ExtAudioFileWrite_failed_with_st, sizeof(__pyx_k_ExtAudioFileWrite_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ExtAudioFileWrite_failed_with_st */
  {__pyx_k_Failed_to_allocate_AudioBufferLi, sizeof(__pyx_k_Failed_to_allocate_AudioBufferLi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_allocate_AudioBufferLi */
  {__pyx_k_Failed_to_allocate_buffer, sizeof(__pyx_k_Failed_to_allocate_buffer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_allocate_buffer */
  {__pyx_k_Failed_to_allocate_output_buffer, sizeof(__pyx_k_Failed_to_allocate_output_buffer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_allocate_output_buffer */
  {__pyx_k_Failed_to_allocate_read_buffer, sizeof(__pyx_k_Failed_to_allocate_read_buffer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_allocate_read_buffer */
  {__pyx_k_Failed_to_create_URL_from_path, sizeof(__pyx_k_Failed_to_create_URL_from_path), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_create_URL_from_path */
  {__pyx_k_Failed_to_get_device_at_index, sizeof(__pyx_k_Failed_to_get_device_at_index), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_get_device_at_index */
  {__pyx_k_Failed_to_load_audio_file, sizeof(__pyx_k_Failed_to_load_audio_file), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_load_audio_file */
  {__pyx_k_Failed_to_setup_audio_output, sizeof(__pyx_k_Failed_to_setup_audio_output), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_setup_audio_output */
  {__pyx_k_Failed_to_start_audio_output, sizeof(__pyx_k_Failed_to_start_audio_output), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_start_audio_output */
  {__pyx_k_Failed_to_stop_audio_output, sizeof(__pyx_k_Failed_to_stop_audio_output), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_stop_audio_output */
  {__pyx_k_For_actual_audio_playback_with_r, sizeof(__pyx_k_For_actual_audio_playback_with_r), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_For_actual_audio_playback_with_r */
  {__pyx_k_Format_configuration_and_proper, sizeof(__pyx_k_Format_configuration_and_proper), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Format_configuration_and_proper */
  {__pyx_k_Hardware_audio_output_control, sizeof(__pyx_k_Hardware_audio_output_control), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Hardware_audio_output_control */
  {__pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IndexError */
  {__pyx_k_Invalid_connection_parameters_da, sizeof(__pyx_k_Invalid_connection_parameters_da), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Invalid_connection_parameters_da */
  {__pyx_k_MIDIClientCreate_failed_with_sta, sizeof(__pyx_k_MIDIClientCreate_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIClientCreate_failed_with_sta */
  {__pyx_k_MIDIClientDispose_failed_with_st, sizeof(__pyx_k_MIDIClientDispose_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIClientDispose_failed_with_st */
  {__pyx_k_MIDIDestinationCreate_failed_wit, sizeof(__pyx_k_MIDIDestinationCreate_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDestinationCreate_failed_wit */
  {__pyx_k_MIDIDeviceAddEntity_failed_with, sizeof(__pyx_k_MIDIDeviceAddEntity_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceAddEntity_failed_with */
  {__pyx_k_MIDIDeviceCreate_failed_with_sta, sizeof(__pyx_k_MIDIDeviceCreate_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceCreate_failed_with_sta */
  {__pyx_k_MIDIDeviceDispose_failed_with_st, sizeof(__pyx_k_MIDIDeviceDispose_failed_with_st), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceDispose_failed_with_st */
  {__pyx_k_MIDIDeviceListAddDevice_failed_w, sizeof(__pyx_k_MIDIDeviceListAddDevice_failed_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceListAddDevice_failed_w */
  {__pyx_k_MIDIDeviceListDispose_failed_wit, sizeof(__pyx_k_MIDIDeviceListDispose_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceListDispose_failed_wit */
  {__pyx_k_MIDIDeviceNewEntity_failed_with, sizeof(__pyx_k_MIDIDeviceNewEntity_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceNewEntity_failed_with */
  {__pyx_k_MIDIDeviceRemoveEntity_failed_wi, sizeof(__pyx_k_MIDIDeviceRemoveEntity_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDeviceRemoveEntity_failed_wi */
  {__pyx_k_MIDIDriverEnableMonitoring_faile, sizeof(__pyx_k_MIDIDriverEnableMonitoring_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIDriverEnableMonitoring_faile */
  {__pyx_k_MIDIEndpointDispose_failed_with, sizeof(__pyx_k_MIDIEndpointDispose_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIEndpointDispose_failed_with */
  {__pyx_k_MIDIEndpointGetRefCons_failed_wi, sizeof(__pyx_k_MIDIEndpointGetRefCons_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIEndpointGetRefCons_failed_wi */
  {__pyx_k_MIDIEndpointSetRefCons_failed_wi, sizeof(__pyx_k_MIDIEndpointSetRefCons_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIEndpointSetRefCons_failed_wi */
  {__pyx_k_MIDIEntityAddOrRemoveEndpoints_f, sizeof(__pyx_k_MIDIEntityAddOrRemoveEndpoints_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIEntityAddOrRemoveEndpoints_f */
  {__pyx_k_MIDIExternalDeviceCreate_failed, sizeof(__pyx_k_MIDIExternalDeviceCreate_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIExternalDeviceCreate_failed */
  {__pyx_k_MIDIInputPortCreate_failed_with, sizeof(__pyx_k_MIDIInputPortCreate_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIInputPortCreate_failed_with */
  {__pyx_k_MIDIObjectGetIntegerProperty_fai, sizeof(__pyx_k_MIDIObjectGetIntegerProperty_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIObjectGetIntegerProperty_fai */
  {__pyx_k_MIDIObjectGetStringProperty_fail, sizeof(__pyx_k_MIDIObjectGetStringProperty_fail), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIObjectGetStringProperty_fail */
  {__pyx_k_MIDIObjectSetIntegerProperty_fai, sizeof(__pyx_k_MIDIObjectSetIntegerProperty_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIObjectSetIntegerProperty_fai */
  {__pyx_k_MIDIObjectSetStringProperty_fail, sizeof(__pyx_k_MIDIObjectSetStringProperty_fail), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIObjectSetStringProperty_fail */
  {__pyx_k_MIDIOutputPortCreate_failed_with, sizeof(__pyx_k_MIDIOutputPortCreate_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIOutputPortCreate_failed_with */
  {__pyx_k_MIDIPortConnectSource_failed_wit, sizeof(__pyx_k_MIDIPortConnectSource_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIPortConnectSource_failed_wit */
  {__pyx_k_MIDIPortDisconnectSource_failed, sizeof(__pyx_k_MIDIPortDisconnectSource_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIPortDisconnectSource_failed */
  {__pyx_k_MIDIPortDispose_failed_with_stat, sizeof(__pyx_k_MIDIPortDispose_failed_with_stat), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIPortDispose_failed_with_stat */
  {__pyx_k_MIDISend_failed_with_status, sizeof(__pyx_k_MIDISend_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISend_failed_with_status */
  {__pyx_k_MIDISetupAddDevice_failed_with_s, sizeof(__pyx_k_MIDISetupAddDevice_failed_with_s), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISetupAddDevice_failed_with_s */
  {__pyx_k_MIDISetupAddExternalDevice_faile, sizeof(__pyx_k_MIDISetupAddExternalDevice_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISetupAddExternalDevice_faile */
  {__pyx_k_MIDISetupRemoveDevice_failed_wit, sizeof(__pyx_k_MIDISetupRemoveDevice_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISetupRemoveDevice_failed_wit */
  {__pyx_k_MIDISetupRemoveExternalDevice_fa, sizeof(__pyx_k_MIDISetupRemoveExternalDevice_fa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISetupRemoveExternalDevice_fa */
  {__pyx_k_MIDISourceCreate_failed_with_sta, sizeof(__pyx_k_MIDISourceCreate_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDISourceCreate_failed_with_sta */
  {__pyx_k_MIDIThruConnectionCreate_failed, sizeof(__pyx_k_MIDIThruConnectionCreate_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIThruConnectionCreate_failed */
  {__pyx_k_MIDIThruConnectionDispose_failed, sizeof(__pyx_k_MIDIThruConnectionDispose_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIThruConnectionDispose_failed */
  {__pyx_k_MIDIThruConnectionFind_failed_wi, sizeof(__pyx_k_MIDIThruConnectionFind_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIThruConnectionFind_failed_wi */
  {__pyx_k_MIDIThruConnectionGetParams_fail, sizeof(__pyx_k_MIDIThruConnectionGetParams_fail), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIThruConnectionGetParams_fail */
  {__pyx_k_MIDIThruConnectionSetParams_fail, sizeof(__pyx_k_MIDIThruConnectionSetParams_fail), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDIThruConnectionSetParams_fail */
  {__pyx_k_MIDI_data_too_large_max_256_byte, sizeof(__pyx_k_MIDI_data_too_large_max_256_byte), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MIDI_data_too_large_max_256_byte */
  {__pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MemoryError */
  {__pyx_k_MusicDeviceMIDIEvent_failed_with, sizeof(__pyx_k_MusicDeviceMIDIEvent_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicDeviceMIDIEvent_failed_with */
  {__pyx_k_MusicDeviceStartNote_failed_with, sizeof(__pyx_k_MusicDeviceStartNote_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicDeviceStartNote_failed_with */
  {__pyx_k_MusicDeviceStopNote_failed_with, sizeof(__pyx_k_MusicDeviceStopNote_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicDeviceStopNote_failed_with */
  {__pyx_k_MusicDeviceSysEx_failed_with_sta, sizeof(__pyx_k_MusicDeviceSysEx_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicDeviceSysEx_failed_with_sta */
  {__pyx_k_MusicPlayerGetPlayRateScalar_fai, sizeof(__pyx_k_MusicPlayerGetPlayRateScalar_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerGetPlayRateScalar_fai */
  {__pyx_k_MusicPlayerGetSequence_failed_wi, sizeof(__pyx_k_MusicPlayerGetSequence_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerGetSequence_failed_wi */
  {__pyx_k_MusicPlayerGetTime_failed_with_s, sizeof(__pyx_k_MusicPlayerGetTime_failed_with_s), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerGetTime_failed_with_s */
  {__pyx_k_MusicPlayerIsPlaying_failed_with, sizeof(__pyx_k_MusicPlayerIsPlaying_failed_with), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerIsPlaying_failed_with */
  {__pyx_k_MusicPlayerPreroll_failed_with_s, sizeof(__pyx_k_MusicPlayerPreroll_failed_with_s), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerPreroll_failed_with_s */
  {__pyx_k_MusicPlayerSetPlayRateScalar_fai, sizeof(__pyx_k_MusicPlayerSetPlayRateScalar_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerSetPlayRateScalar_fai */
  {__pyx_k_MusicPlayerSetSequence_failed_wi, sizeof(__pyx_k_MusicPlayerSetSequence_failed_wi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerSetSequence_failed_wi */
  {__pyx_k_MusicPlayerSetTime_failed_with_s, sizeof(__pyx_k_MusicPlayerSetTime_failed_with_s), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerSetTime_failed_with_s */
  {__pyx_k_MusicPlayerStart_failed_with_sta, sizeof(__pyx_k_MusicPlayerStart_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerStart_failed_with_sta */
  {__pyx_k_MusicPlayerStop_failed_with_stat, sizeof(__pyx_k_MusicPlayerStop_failed_with_stat), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicPlayerStop_failed_with_stat */
  {__pyx_k_MusicSequenceDisposeTrack_failed, sizeof(__pyx_k_MusicSequenceDisposeTrack_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceDisposeTrack_failed */
  {__pyx_k_MusicSequenceFileLoad_failed_wit, sizeof(__pyx_k_MusicSequenceFileLoad_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceFileLoad_failed_wit */
  {__pyx_k_MusicSequenceGetIndTrack_failed, sizeof(__pyx_k_MusicSequenceGetIndTrack_failed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceGetIndTrack_failed */
  {__pyx_k_MusicSequenceGetSequenceType_fai, sizeof(__pyx_k_MusicSequenceGetSequenceType_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceGetSequenceType_fai */
  {__pyx_k_MusicSequenceGetTempoTrack_faile, sizeof(__pyx_k_MusicSequenceGetTempoTrack_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceGetTempoTrack_faile */
  {__pyx_k_MusicSequenceGetTrackCount_faile, sizeof(__pyx_k_MusicSequenceGetTrackCount_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceGetTrackCount_faile */
  {__pyx_k_MusicSequenceNewTrack_failed_wit, sizeof(__pyx_k_MusicSequenceNewTrack_failed_wit), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceNewTrack_failed_wit */
  {__pyx_k_MusicSequenceSetSequenceType_fai, sizeof(__pyx_k_MusicSequenceSetSequenceType_fai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicSequenceSetSequenceType_fai */
  {__pyx_k_MusicTrackNewExtendedTempoEvent, sizeof(__pyx_k_MusicTrackNewExtendedTempoEvent), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicTrackNewExtendedTempoEvent */
  {__pyx_k_MusicTrackNewMIDIChannelEvent_fa, sizeof(__pyx_k_MusicTrackNewMIDIChannelEvent_fa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicTrackNewMIDIChannelEvent_fa */
  {__pyx_k_MusicTrackNewMIDINoteEvent_faile, sizeof(__pyx_k_MusicTrackNewMIDINoteEvent_faile), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_MusicTrackNewMIDINoteEvent_faile */
  {__pyx_k_NewAUGraph_failed_with_status, sizeof(__pyx_k_NewAUGraph_failed_with_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_NewAUGraph_failed_with_status */
  {__pyx_k_NewMusicPlayer_failed_with_statu, sizeof(__pyx_k_NewMusicPlayer_failed_with_statu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_NewMusicPlayer_failed_with_statu */
  {__pyx_k_NewMusicSequence_failed_with_sta, sizeof(__pyx_k_NewMusicSequence_failed_with_sta), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_NewMusicSequence_failed_with_sta */
  {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 1}, /* PyObject cname: __pyx_n_u_None */
  {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_None */
  {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */
  {__pyx_k_Or_use_higher_level_Python_audi, sizeof(__pyx_k_Or_use_higher_level_Python_audi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Or_use_higher_level_Python_audi */
  {__pyx_k_Real_time_audio_buffer_manageme, sizeof(__pyx_k_Real_time_audio_buffer_manageme), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Real_time_audio_buffer_manageme */
  {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */
  {__pyx_k_Scale_rate_must_be_greater_than, sizeof(__pyx_k_Scale_rate_must_be_greater_than), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Scale_rate_must_be_greater_than */
  {__pyx_k_Source_index, sizeof(__pyx_k_Source_index), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Source_index */
  {__pyx_k_The_AudioUnit_infrastructure_is, sizeof(__pyx_k_The_AudioUnit_infrastructure_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_The_AudioUnit_infrastructure_is */
  {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */
  {__pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ValueError */
  {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */
  {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */
  {__pyx_k_actual_bytes, sizeof(__pyx_k_actual_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_actual_bytes */
  {__pyx_k_actual_size, sizeof(__pyx_k_actual_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_actual_size */
  {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */
  {__pyx_k_address, sizeof(__pyx_k_address), 0, 1, 1}, /* PyObject cname: __pyx_n_u_address */
  {__pyx_k_append, sizeof(__pyx_k_append), 0, 1, 1}, /* PyObject cname: __pyx_n_u_append */
  {__pyx_k_argCount, sizeof(__pyx_k_argCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_argCount */
  {__pyx_k_arg_count, sizeof(__pyx_k_arg_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_arg_count */
  {__pyx_k_asbd, sizeof(__pyx_k_asbd), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asbd */
  {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */
  {__pyx_k_attribute_data, sizeof(__pyx_k_attribute_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_attribute_data */
  {__pyx_k_attribute_type, sizeof(__pyx_k_attribute_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_attribute_type */
  {__pyx_k_au_graph_add_node, sizeof(__pyx_k_au_graph_add_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_add_node */
  {__pyx_k_au_graph_clear_connections, sizeof(__pyx_k_au_graph_clear_connections), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_clear_connections */
  {__pyx_k_au_graph_close, sizeof(__pyx_k_au_graph_close), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_close */
  {__pyx_k_au_graph_connect_node_input, sizeof(__pyx_k_au_graph_connect_node_input), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_connect_node_input */
  {__pyx_k_au_graph_disconnect_node_input, sizeof(__pyx_k_au_graph_disconnect_node_input), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_disconnect_node_input */
  {__pyx_k_au_graph_dispose, sizeof(__pyx_k_au_graph_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_dispose */
  {__pyx_k_au_graph_get_cpu_load, sizeof(__pyx_k_au_graph_get_cpu_load), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_get_cpu_load */
  {__pyx_k_au_graph_get_ind_node, sizeof(__pyx_k_au_graph_get_ind_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_get_ind_node */
  {__pyx_k_au_graph_get_max_cpu_load, sizeof(__pyx_k_au_graph_get_max_cpu_load), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_get_max_cpu_load */
  {__pyx_k_au_graph_get_node_count, sizeof(__pyx_k_au_graph_get_node_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_get_node_count */
  {__pyx_k_au_graph_initialize, sizeof(__pyx_k_au_graph_initialize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_initialize */
  {__pyx_k_au_graph_is_initialized, sizeof(__pyx_k_au_graph_is_initialized), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_is_initialized */
  {__pyx_k_au_graph_is_open, sizeof(__pyx_k_au_graph_is_open), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_is_open */
  {__pyx_k_au_graph_is_running, sizeof(__pyx_k_au_graph_is_running), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_is_running */
  {__pyx_k_au_graph_new, sizeof(__pyx_k_au_graph_new), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_new */
  {__pyx_k_au_graph_node_info, sizeof(__pyx_k_au_graph_node_info), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_node_info */
  {__pyx_k_au_graph_open, sizeof(__pyx_k_au_graph_open), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_open */
  {__pyx_k_au_graph_remove_node, sizeof(__pyx_k_au_graph_remove_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_remove_node */
  {__pyx_k_au_graph_start, sizeof(__pyx_k_au_graph_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_start */
  {__pyx_k_au_graph_stop, sizeof(__pyx_k_au_graph_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_stop */
  {__pyx_k_au_graph_uninitialize, sizeof(__pyx_k_au_graph_uninitialize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_uninitialize */
  {__pyx_k_au_graph_update, sizeof(__pyx_k_au_graph_update), 0, 1, 1}, /* PyObject cname: __pyx_n_u_au_graph_update */
  {__pyx_k_audio_component_copy_name, sizeof(__pyx_k_audio_component_copy_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_component_copy_name */
  {__pyx_k_audio_component_find_next, sizeof(__pyx_k_audio_component_find_next), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_component_find_next */
  {__pyx_k_audio_component_get_description, sizeof(__pyx_k_audio_component_get_description), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_component_get_description */
  {__pyx_k_audio_component_instance_dispose, sizeof(__pyx_k_audio_component_instance_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_component_instance_dispose */
  {__pyx_k_audio_component_instance_new, sizeof(__pyx_k_audio_component_instance_new), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_component_instance_new */
  {__pyx_k_audio_converter_convert_buffer, sizeof(__pyx_k_audio_converter_convert_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_convert_buffer */
  {__pyx_k_audio_converter_dispose, sizeof(__pyx_k_audio_converter_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_dispose */
  {__pyx_k_audio_converter_fill_complex_buf, sizeof(__pyx_k_audio_converter_fill_complex_buf), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_fill_complex_buf */
  {__pyx_k_audio_converter_get_property, sizeof(__pyx_k_audio_converter_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_get_property */
  {__pyx_k_audio_converter_new, sizeof(__pyx_k_audio_converter_new), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_new */
  {__pyx_k_audio_converter_reset, sizeof(__pyx_k_audio_converter_reset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_reset */
  {__pyx_k_audio_converter_set_property, sizeof(__pyx_k_audio_converter_set_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_converter_set_property */
  {__pyx_k_audio_data, sizeof(__pyx_k_audio_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_data */
  {__pyx_k_audio_file, sizeof(__pyx_k_audio_file), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file */
  {__pyx_k_audio_file_close, sizeof(__pyx_k_audio_file_close), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_close */
  {__pyx_k_audio_file_get_property, sizeof(__pyx_k_audio_file_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_get_property */
  {__pyx_k_audio_file_id, sizeof(__pyx_k_audio_file_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_id */
  {__pyx_k_audio_file_open_url, sizeof(__pyx_k_audio_file_open_url), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_open_url */
  {__pyx_k_audio_file_read_packets, sizeof(__pyx_k_audio_file_read_packets), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_read_packets */
  {__pyx_k_audio_file_stream_close, sizeof(__pyx_k_audio_file_stream_close), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_stream_close */
  {__pyx_k_audio_file_stream_get_property, sizeof(__pyx_k_audio_file_stream_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_stream_get_property */
  {__pyx_k_audio_file_stream_open, sizeof(__pyx_k_audio_file_stream_open), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_stream_open */
  {__pyx_k_audio_file_stream_parse_bytes, sizeof(__pyx_k_audio_file_stream_parse_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_stream_parse_bytes */
  {__pyx_k_audio_file_stream_seek, sizeof(__pyx_k_audio_file_stream_seek), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_file_stream_seek */
  {__pyx_k_audio_format, sizeof(__pyx_k_audio_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_format */
  {__pyx_k_audio_hardware_destroy_aggregate, sizeof(__pyx_k_audio_hardware_destroy_aggregate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_hardware_destroy_aggregate */
  {__pyx_k_audio_hardware_get_default_input, sizeof(__pyx_k_audio_hardware_get_default_input), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_hardware_get_default_input */
  {__pyx_k_audio_hardware_get_default_outpu, sizeof(__pyx_k_audio_hardware_get_default_outpu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_hardware_get_default_outpu */
  {__pyx_k_audio_hardware_get_devices, sizeof(__pyx_k_audio_hardware_get_devices), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_hardware_get_devices */
  {__pyx_k_audio_hardware_unload, sizeof(__pyx_k_audio_hardware_unload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_hardware_unload */
  {__pyx_k_audio_object_get_property_data, sizeof(__pyx_k_audio_object_get_property_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_object_get_property_data */
  {__pyx_k_audio_object_get_property_string, sizeof(__pyx_k_audio_object_get_property_string), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_object_get_property_string */
  {__pyx_k_audio_object_show, sizeof(__pyx_k_audio_object_show), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_object_show */
  {__pyx_k_audio_output_unit_start, sizeof(__pyx_k_audio_output_unit_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_output_unit_start */
  {__pyx_k_audio_output_unit_stop, sizeof(__pyx_k_audio_output_unit_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_output_unit_stop */
  {__pyx_k_audio_queue_allocate_buffer, sizeof(__pyx_k_audio_queue_allocate_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_allocate_buffer */
  {__pyx_k_audio_queue_dispose, sizeof(__pyx_k_audio_queue_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_dispose */
  {__pyx_k_audio_queue_enqueue_buffer, sizeof(__pyx_k_audio_queue_enqueue_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_enqueue_buffer */
  {__pyx_k_audio_queue_new_output, sizeof(__pyx_k_audio_queue_new_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_new_output */
  {__pyx_k_audio_queue_start, sizeof(__pyx_k_audio_queue_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_start */
  {__pyx_k_audio_queue_stop, sizeof(__pyx_k_audio_queue_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_queue_stop */
  {__pyx_k_audio_services_create_system_sou, sizeof(__pyx_k_audio_services_create_system_sou), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_create_system_sou */
  {__pyx_k_audio_services_dispose_system_so, sizeof(__pyx_k_audio_services_dispose_system_so), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_dispose_system_so */
  {__pyx_k_audio_services_get_property, sizeof(__pyx_k_audio_services_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_get_property */
  {__pyx_k_audio_services_play_alert_sound, sizeof(__pyx_k_audio_services_play_alert_sound), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_play_alert_sound */
  {__pyx_k_audio_services_play_system_sound, sizeof(__pyx_k_audio_services_play_system_sound), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_play_system_sound */
  {__pyx_k_audio_services_set_property, sizeof(__pyx_k_audio_services_set_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_services_set_property */
  {__pyx_k_audio_unit, sizeof(__pyx_k_audio_unit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit */
  {__pyx_k_audio_unit_get_property, sizeof(__pyx_k_audio_unit_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit_get_property */
  {__pyx_k_audio_unit_id, sizeof(__pyx_k_audio_unit_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit_id */
  {__pyx_k_audio_unit_initialize, sizeof(__pyx_k_audio_unit_initialize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit_initialize */
  {__pyx_k_audio_unit_set_property, sizeof(__pyx_k_audio_unit_set_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit_set_property */
  {__pyx_k_audio_unit_uninitialize, sizeof(__pyx_k_audio_unit_uninitialize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_audio_unit_uninitialize */
  {__pyx_k_bank_is_valid, sizeof(__pyx_k_bank_is_valid), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bank_is_valid */
  {__pyx_k_bank_lsb, sizeof(__pyx_k_bank_lsb), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bank_lsb */
  {__pyx_k_bank_msb, sizeof(__pyx_k_bank_msb), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bank_msb */
  {__pyx_k_bits_per_channel, sizeof(__pyx_k_bits_per_channel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bits_per_channel */
  {__pyx_k_bool, sizeof(__pyx_k_bool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bool */
  {__pyx_k_bpm, sizeof(__pyx_k_bpm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bpm */
  {__pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer */
  {__pyx_k_buffer_id, sizeof(__pyx_k_buffer_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer_id */
  {__pyx_k_buffer_list, sizeof(__pyx_k_buffer_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer_list */
  {__pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer_size */
  {__pyx_k_byte1, sizeof(__pyx_k_byte1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte1 */
  {__pyx_k_byte2, sizeof(__pyx_k_byte2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte2 */
  {__pyx_k_byte3, sizeof(__pyx_k_byte3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte3 */
  {__pyx_k_byte4, sizeof(__pyx_k_byte4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte4 */
  {__pyx_k_byte5, sizeof(__pyx_k_byte5), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte5 */
  {__pyx_k_byte6, sizeof(__pyx_k_byte6), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte6 */
  {__pyx_k_byte_data, sizeof(__pyx_k_byte_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte_data */
  {__pyx_k_byte_offset, sizeof(__pyx_k_byte_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_byte_offset */
  {__pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes */
  {__pyx_k_bytes_per_frame, sizeof(__pyx_k_bytes_per_frame), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes_per_frame */
  {__pyx_k_bytes_per_packet, sizeof(__pyx_k_bytes_per_packet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes_per_packet */
  {__pyx_k_bytes_used, sizeof(__pyx_k_bytes_used), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes_used */
  {__pyx_k_c_str, sizeof(__pyx_k_c_str), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_str */
  {__pyx_k_callback_data, sizeof(__pyx_k_callback_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_callback_data */
  {__pyx_k_cf_connection_list, sizeof(__pyx_k_cf_connection_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_connection_list */
  {__pyx_k_cf_manufacturer, sizeof(__pyx_k_cf_manufacturer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_manufacturer */
  {__pyx_k_cf_model, sizeof(__pyx_k_cf_model), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_model */
  {__pyx_k_cf_name, sizeof(__pyx_k_cf_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_name */
  {__pyx_k_cf_owner_id, sizeof(__pyx_k_cf_owner_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_owner_id */
  {__pyx_k_cf_params, sizeof(__pyx_k_cf_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_params */
  {__pyx_k_cf_path, sizeof(__pyx_k_cf_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_path */
  {__pyx_k_cf_prop_name, sizeof(__pyx_k_cf_prop_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_prop_name */
  {__pyx_k_cf_value, sizeof(__pyx_k_cf_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cf_value */
  {__pyx_k_channel, sizeof(__pyx_k_channel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_channel */
  {__pyx_k_channelMap, sizeof(__pyx_k_channelMap), 0, 1, 1}, /* PyObject cname: __pyx_n_u_channelMap */
  {__pyx_k_channelPressure, sizeof(__pyx_k_channelPressure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_channelPressure */
  {__pyx_k_channel_map, sizeof(__pyx_k_channel_map), 0, 1, 1}, /* PyObject cname: __pyx_n_u_channel_map */
  {__pyx_k_channels_per_frame, sizeof(__pyx_k_channels_per_frame), 0, 1, 1}, /* PyObject cname: __pyx_n_u_channels_per_frame */
  {__pyx_k_class, sizeof(__pyx_k_class), 0, 1, 1}, /* PyObject cname: __pyx_n_u_class */
  {__pyx_k_client, sizeof(__pyx_k_client), 0, 1, 1}, /* PyObject cname: __pyx_n_u_client */
  {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */
  {__pyx_k_code, sizeof(__pyx_k_code), 0, 1, 1}, /* PyObject cname: __pyx_n_u_code */
  {__pyx_k_codec_manufacturer, sizeof(__pyx_k_codec_manufacturer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_codec_manufacturer */
  {__pyx_k_component, sizeof(__pyx_k_component), 0, 1, 1}, /* PyObject cname: __pyx_n_u_component */
  {__pyx_k_component_id, sizeof(__pyx_k_component_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_component_id */
  {__pyx_k_connection, sizeof(__pyx_k_connection), 0, 1, 1}, /* PyObject cname: __pyx_n_u_connection */
  {__pyx_k_connection_params, sizeof(__pyx_k_connection_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_connection_params */
  {__pyx_k_connections, sizeof(__pyx_k_connections), 0, 1, 1}, /* PyObject cname: __pyx_n_u_connections */
  {__pyx_k_controlTransforms, sizeof(__pyx_k_controlTransforms), 0, 1, 1}, /* PyObject cname: __pyx_n_u_controlTransforms */
  {__pyx_k_controller, sizeof(__pyx_k_controller), 0, 1, 1}, /* PyObject cname: __pyx_n_u_controller */
  {__pyx_k_controls, sizeof(__pyx_k_controls), 0, 1, 1}, /* PyObject cname: __pyx_n_u_controls */
  {__pyx_k_convert_int_to_fourcc_4_chars_in, sizeof(__pyx_k_convert_int_to_fourcc_4_chars_in), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_convert_int_to_fourcc_4_chars_in */
  {__pyx_k_converter, sizeof(__pyx_k_converter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_converter */
  {__pyx_k_converter_id, sizeof(__pyx_k_converter_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_converter_id */
  {__pyx_k_coremusic_capi, sizeof(__pyx_k_coremusic_capi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_coremusic_capi */
  {__pyx_k_count, sizeof(__pyx_k_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_count */
  {__pyx_k_cpu_load, sizeof(__pyx_k_cpu_load), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cpu_load */
  {__pyx_k_create_midi_channel_message, sizeof(__pyx_k_create_midi_channel_message), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create_midi_channel_message */
  {__pyx_k_create_midi_note_message, sizeof(__pyx_k_create_midi_note_message), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create_midi_note_message */
  {__pyx_k_create_music_device_note_params, sizeof(__pyx_k_create_music_device_note_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create_music_device_note_params */
  {__pyx_k_create_music_device_std_note_par, sizeof(__pyx_k_create_music_device_std_note_par), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create_music_device_std_note_par */
  {__pyx_k_data, sizeof(__pyx_k_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data */
  {__pyx_k_data1, sizeof(__pyx_k_data1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data1 */
  {__pyx_k_data2, sizeof(__pyx_k_data2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data2 */
  {__pyx_k_data_length, sizeof(__pyx_k_data_length), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_length */
  {__pyx_k_data_must_be_bytes, sizeof(__pyx_k_data_must_be_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_must_be_bytes */
  {__pyx_k_data_ptr, sizeof(__pyx_k_data_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_ptr */
  {__pyx_k_data_size, sizeof(__pyx_k_data_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_size */
  {__pyx_k_demonstrate_callback_infrastruct, sizeof(__pyx_k_demonstrate_callback_infrastruct), 0, 1, 1}, /* PyObject cname: __pyx_n_u_demonstrate_callback_infrastruct */
  {__pyx_k_desc, sizeof(__pyx_k_desc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_desc */
  {__pyx_k_desc_dict, sizeof(__pyx_k_desc_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_desc_dict */
  {__pyx_k_description, sizeof(__pyx_k_description), 0, 1, 1}, /* PyObject cname: __pyx_n_u_description */
  {__pyx_k_description_dict, sizeof(__pyx_k_description_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_description_dict */
  {__pyx_k_dest, sizeof(__pyx_k_dest), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dest */
  {__pyx_k_dest_format, sizeof(__pyx_k_dest_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dest_format */
  {__pyx_k_dest_index, sizeof(__pyx_k_dest_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dest_index */
  {__pyx_k_dest_input, sizeof(__pyx_k_dest_input), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dest_input */
  {__pyx_k_dest_node, sizeof(__pyx_k_dest_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dest_node */
  {__pyx_k_destination, sizeof(__pyx_k_destination), 0, 1, 1}, /* PyObject cname: __pyx_n_u_destination */
  {__pyx_k_destinations, sizeof(__pyx_k_destinations), 0, 1, 1}, /* PyObject cname: __pyx_n_u_destinations */
  {__pyx_k_dev_list, sizeof(__pyx_k_dev_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dev_list */
  {__pyx_k_device, sizeof(__pyx_k_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_device */
  {__pyx_k_deviceID, sizeof(__pyx_k_deviceID), 0, 1, 1}, /* PyObject cname: __pyx_n_u_deviceID */
  {__pyx_k_device_count, sizeof(__pyx_k_device_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_device_count */
  {__pyx_k_device_id, sizeof(__pyx_k_device_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_device_id */
  {__pyx_k_device_ids, sizeof(__pyx_k_device_ids), 0, 1, 1}, /* PyObject cname: __pyx_n_u_device_ids */
  {__pyx_k_device_index, sizeof(__pyx_k_device_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_device_index */
  {__pyx_k_devices, sizeof(__pyx_k_devices), 0, 1, 1}, /* PyObject cname: __pyx_n_u_devices */
  {__pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict */
  {__pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_disable */
  {__pyx_k_displayName, sizeof(__pyx_k_displayName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_displayName */
  {__pyx_k_dispose, sizeof(__pyx_k_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dispose */
  {__pyx_k_dispose_music_player, sizeof(__pyx_k_dispose_music_player), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dispose_music_player */
  {__pyx_k_dispose_music_sequence, sizeof(__pyx_k_dispose_music_sequence), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dispose_music_sequence */
  {__pyx_k_driver, sizeof(__pyx_k_driver), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver */
  {__pyx_k_driverOwner, sizeof(__pyx_k_driverOwner), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driverOwner */
  {__pyx_k_dst_format, sizeof(__pyx_k_dst_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dst_format */
  {__pyx_k_duration, sizeof(__pyx_k_duration), 0, 1, 1}, /* PyObject cname: __pyx_n_u_duration */
  {__pyx_k_element, sizeof(__pyx_k_element), 0, 1, 1}, /* PyObject cname: __pyx_n_u_element */
  {__pyx_k_embedded, sizeof(__pyx_k_embedded), 0, 1, 1}, /* PyObject cname: __pyx_n_u_embedded */
  {__pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_enable */
  {__pyx_k_enabled, sizeof(__pyx_k_enabled), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enabled */
  {__pyx_k_endpoint, sizeof(__pyx_k_endpoint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_endpoint */
  {__pyx_k_endpointRef, sizeof(__pyx_k_endpointRef), 0, 1, 1}, /* PyObject cname: __pyx_n_u_endpointRef */
  {__pyx_k_ensure_not_disposed, sizeof(__pyx_k_ensure_not_disposed), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ensure_not_disposed */
  {__pyx_k_entity, sizeof(__pyx_k_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_entity */
  {__pyx_k_entity_index, sizeof(__pyx_k_entity_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_entity_index */
  {__pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enumerate */
  {__pyx_k_ext_file, sizeof(__pyx_k_ext_file), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ext_file */
  {__pyx_k_ext_file_id, sizeof(__pyx_k_ext_file_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ext_file_id */
  {__pyx_k_extended_audio_file_create_with, sizeof(__pyx_k_extended_audio_file_create_with), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_create_with */
  {__pyx_k_extended_audio_file_dispose, sizeof(__pyx_k_extended_audio_file_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_dispose */
  {__pyx_k_extended_audio_file_get_property, sizeof(__pyx_k_extended_audio_file_get_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_get_property */
  {__pyx_k_extended_audio_file_open_url, sizeof(__pyx_k_extended_audio_file_open_url), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_open_url */
  {__pyx_k_extended_audio_file_read, sizeof(__pyx_k_extended_audio_file_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_read */
  {__pyx_k_extended_audio_file_set_property, sizeof(__pyx_k_extended_audio_file_set_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_set_property */
  {__pyx_k_extended_audio_file_write, sizeof(__pyx_k_extended_audio_file_write), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extended_audio_file_write */
  {__pyx_k_file_path, sizeof(__pyx_k_file_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_path */
  {__pyx_k_file_type, sizeof(__pyx_k_file_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_type */
  {__pyx_k_file_type_hint, sizeof(__pyx_k_file_type_hint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_type_hint */
  {__pyx_k_filterOutAllControls, sizeof(__pyx_k_filterOutAllControls), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filterOutAllControls */
  {__pyx_k_filterOutBeatClock, sizeof(__pyx_k_filterOutBeatClock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filterOutBeatClock */
  {__pyx_k_filterOutMTC, sizeof(__pyx_k_filterOutMTC), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filterOutMTC */
  {__pyx_k_filterOutSysEx, sizeof(__pyx_k_filterOutSysEx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filterOutSysEx */
  {__pyx_k_filterOutTuneRequest, sizeof(__pyx_k_filterOutTuneRequest), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filterOutTuneRequest */
  {__pyx_k_flags, sizeof(__pyx_k_flags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_flags */
  {__pyx_k_flags_mask, sizeof(__pyx_k_flags_mask), 0, 1, 1}, /* PyObject cname: __pyx_n_u_flags_mask */
  {__pyx_k_float, sizeof(__pyx_k_float), 0, 1, 1}, /* PyObject cname: __pyx_n_u_float */
  {__pyx_k_format, sizeof(__pyx_k_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_format */
  {__pyx_k_format_flags, sizeof(__pyx_k_format_flags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_format_flags */
  {__pyx_k_format_id, sizeof(__pyx_k_format_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_format_id */
  {__pyx_k_fourchar_to_int, sizeof(__pyx_k_fourchar_to_int), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fourchar_to_int */
  {__pyx_k_fourchar_to_int_line_11, sizeof(__pyx_k_fourchar_to_int_line_11), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_fourchar_to_int_line_11 */
  {__pyx_k_frames, sizeof(__pyx_k_frames), 0, 1, 1}, /* PyObject cname: __pyx_n_u_frames */
  {__pyx_k_frames_per_packet, sizeof(__pyx_k_frames_per_packet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_frames_per_packet */
  {__pyx_k_frames_to_read, sizeof(__pyx_k_frames_to_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_frames_to_read */
  {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */
  {__pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_gc */
  {__pyx_k_get, sizeof(__pyx_k_get), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get */
  {__pyx_k_get_au_graph_err_cannot_do_in_cu, sizeof(__pyx_k_get_au_graph_err_cannot_do_in_cu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_au_graph_err_cannot_do_in_cu */
  {__pyx_k_get_au_graph_err_invalid_audio_u, sizeof(__pyx_k_get_au_graph_err_invalid_audio_u), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_au_graph_err_invalid_audio_u */
  {__pyx_k_get_au_graph_err_invalid_connect, sizeof(__pyx_k_get_au_graph_err_invalid_connect), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_au_graph_err_invalid_connect */
  {__pyx_k_get_au_graph_err_node_not_found, sizeof(__pyx_k_get_au_graph_err_node_not_found), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_au_graph_err_node_not_found */
  {__pyx_k_get_au_graph_err_output_node_err, sizeof(__pyx_k_get_au_graph_err_output_node_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_au_graph_err_output_node_err */
  {__pyx_k_get_audio_component_type_music_d, sizeof(__pyx_k_get_audio_component_type_music_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_component_type_music_d */
  {__pyx_k_get_audio_converter_property_cod, sizeof(__pyx_k_get_audio_converter_property_cod), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_cod */
  {__pyx_k_get_audio_converter_property_max, sizeof(__pyx_k_get_audio_converter_property_max), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_max */
  {__pyx_k_get_audio_converter_property_max_2, sizeof(__pyx_k_get_audio_converter_property_max_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_max_2 */
  {__pyx_k_get_audio_converter_property_min, sizeof(__pyx_k_get_audio_converter_property_min), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_min */
  {__pyx_k_get_audio_converter_property_min_2, sizeof(__pyx_k_get_audio_converter_property_min_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_min_2 */
  {__pyx_k_get_audio_converter_property_sam, sizeof(__pyx_k_get_audio_converter_property_sam), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_property_sam */
  {__pyx_k_get_audio_converter_quality_high, sizeof(__pyx_k_get_audio_converter_quality_high), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_quality_high */
  {__pyx_k_get_audio_converter_quality_low, sizeof(__pyx_k_get_audio_converter_quality_low), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_quality_low */
  {__pyx_k_get_audio_converter_quality_max, sizeof(__pyx_k_get_audio_converter_quality_max), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_quality_max */
  {__pyx_k_get_audio_converter_quality_medi, sizeof(__pyx_k_get_audio_converter_quality_medi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_quality_medi */
  {__pyx_k_get_audio_converter_quality_min, sizeof(__pyx_k_get_audio_converter_quality_min), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_converter_quality_min */
  {__pyx_k_get_audio_device_property_availa, sizeof(__pyx_k_get_audio_device_property_availa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_availa */
  {__pyx_k_get_audio_device_property_device, sizeof(__pyx_k_get_audio_device_property_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_device */
  {__pyx_k_get_audio_device_property_device_2, sizeof(__pyx_k_get_audio_device_property_device_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_device_2 */
  {__pyx_k_get_audio_device_property_is_hid, sizeof(__pyx_k_get_audio_device_property_is_hid), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_is_hid */
  {__pyx_k_get_audio_device_property_model, sizeof(__pyx_k_get_audio_device_property_model), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_model */
  {__pyx_k_get_audio_device_property_nomina, sizeof(__pyx_k_get_audio_device_property_nomina), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_nomina */
  {__pyx_k_get_audio_device_property_prefer, sizeof(__pyx_k_get_audio_device_property_prefer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_prefer */
  {__pyx_k_get_audio_device_property_stream, sizeof(__pyx_k_get_audio_device_property_stream), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_stream */
  {__pyx_k_get_audio_device_property_transp, sizeof(__pyx_k_get_audio_device_property_transp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_device_property_transp */
  {__pyx_k_get_audio_file_property_audio_da, sizeof(__pyx_k_get_audio_file_property_audio_da), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_property_audio_da */
  {__pyx_k_get_audio_file_property_data_for, sizeof(__pyx_k_get_audio_file_property_data_for), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_property_data_for */
  {__pyx_k_get_audio_file_property_estimate, sizeof(__pyx_k_get_audio_file_property_estimate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_property_estimate */
  {__pyx_k_get_audio_file_property_maximum, sizeof(__pyx_k_get_audio_file_property_maximum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_property_maximum */
  {__pyx_k_get_audio_file_read_permission, sizeof(__pyx_k_get_audio_file_read_permission), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_read_permission */
  {__pyx_k_get_audio_file_stream_error_bad, sizeof(__pyx_k_get_audio_file_stream_error_bad), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_bad */
  {__pyx_k_get_audio_file_stream_error_data, sizeof(__pyx_k_get_audio_file_stream_error_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_data */
  {__pyx_k_get_audio_file_stream_error_disc, sizeof(__pyx_k_get_audio_file_stream_error_disc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_disc */
  {__pyx_k_get_audio_file_stream_error_ille, sizeof(__pyx_k_get_audio_file_stream_error_ille), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_ille */
  {__pyx_k_get_audio_file_stream_error_inva, sizeof(__pyx_k_get_audio_file_stream_error_inva), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_inva */
  {__pyx_k_get_audio_file_stream_error_inva_2, sizeof(__pyx_k_get_audio_file_stream_error_inva_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_inva_2 */
  {__pyx_k_get_audio_file_stream_error_not, sizeof(__pyx_k_get_audio_file_stream_error_not), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_not */
  {__pyx_k_get_audio_file_stream_error_unsp, sizeof(__pyx_k_get_audio_file_stream_error_unsp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_unsp */
  {__pyx_k_get_audio_file_stream_error_unsu, sizeof(__pyx_k_get_audio_file_stream_error_unsu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_unsu */
  {__pyx_k_get_audio_file_stream_error_unsu_2, sizeof(__pyx_k_get_audio_file_stream_error_unsu_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_unsu_2 */
  {__pyx_k_get_audio_file_stream_error_unsu_3, sizeof(__pyx_k_get_audio_file_stream_error_unsu_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_unsu_3 */
  {__pyx_k_get_audio_file_stream_error_valu, sizeof(__pyx_k_get_audio_file_stream_error_valu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_error_valu */
  {__pyx_k_get_audio_file_stream_parse_flag, sizeof(__pyx_k_get_audio_file_stream_parse_flag), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_parse_flag */
  {__pyx_k_get_audio_file_stream_property_a, sizeof(__pyx_k_get_audio_file_stream_property_a), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_a */
  {__pyx_k_get_audio_file_stream_property_a_2, sizeof(__pyx_k_get_audio_file_stream_property_a_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_a_2 */
  {__pyx_k_get_audio_file_stream_property_a_3, sizeof(__pyx_k_get_audio_file_stream_property_a_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_a_3 */
  {__pyx_k_get_audio_file_stream_property_b, sizeof(__pyx_k_get_audio_file_stream_property_b), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_b */
  {__pyx_k_get_audio_file_stream_property_b_2, sizeof(__pyx_k_get_audio_file_stream_property_b_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_b_2 */
  {__pyx_k_get_audio_file_stream_property_c, sizeof(__pyx_k_get_audio_file_stream_property_c), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_c */
  {__pyx_k_get_audio_file_stream_property_d, sizeof(__pyx_k_get_audio_file_stream_property_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_d */
  {__pyx_k_get_audio_file_stream_property_d_2, sizeof(__pyx_k_get_audio_file_stream_property_d_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_d_2 */
  {__pyx_k_get_audio_file_stream_property_f, sizeof(__pyx_k_get_audio_file_stream_property_f), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_f */
  {__pyx_k_get_audio_file_stream_property_f_2, sizeof(__pyx_k_get_audio_file_stream_property_f_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_f_2 */
  {__pyx_k_get_audio_file_stream_property_f_3, sizeof(__pyx_k_get_audio_file_stream_property_f_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_f_3 */
  {__pyx_k_get_audio_file_stream_property_f_4, sizeof(__pyx_k_get_audio_file_stream_property_f_4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_f_4 */
  {__pyx_k_get_audio_file_stream_property_f_5, sizeof(__pyx_k_get_audio_file_stream_property_f_5), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_f_5 */
  {__pyx_k_get_audio_file_stream_property_i, sizeof(__pyx_k_get_audio_file_stream_property_i), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_i */
  {__pyx_k_get_audio_file_stream_property_m, sizeof(__pyx_k_get_audio_file_stream_property_m), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_m */
  {__pyx_k_get_audio_file_stream_property_m_2, sizeof(__pyx_k_get_audio_file_stream_property_m_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_m_2 */
  {__pyx_k_get_audio_file_stream_property_p, sizeof(__pyx_k_get_audio_file_stream_property_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_p */
  {__pyx_k_get_audio_file_stream_property_p_2, sizeof(__pyx_k_get_audio_file_stream_property_p_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_p_2 */
  {__pyx_k_get_audio_file_stream_property_p_3, sizeof(__pyx_k_get_audio_file_stream_property_p_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_p_3 */
  {__pyx_k_get_audio_file_stream_property_p_4, sizeof(__pyx_k_get_audio_file_stream_property_p_4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_p_4 */
  {__pyx_k_get_audio_file_stream_property_r, sizeof(__pyx_k_get_audio_file_stream_property_r), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_property_r */
  {__pyx_k_get_audio_file_stream_seek_flag, sizeof(__pyx_k_get_audio_file_stream_seek_flag), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_stream_seek_flag */
  {__pyx_k_get_audio_file_wave_type, sizeof(__pyx_k_get_audio_file_wave_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_file_wave_type */
  {__pyx_k_get_audio_format_linear_pcm, sizeof(__pyx_k_get_audio_format_linear_pcm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_format_linear_pcm */
  {__pyx_k_get_audio_object_property_elemen, sizeof(__pyx_k_get_audio_object_property_elemen), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_elemen */
  {__pyx_k_get_audio_object_property_manufa, sizeof(__pyx_k_get_audio_object_property_manufa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_manufa */
  {__pyx_k_get_audio_object_property_name, sizeof(__pyx_k_get_audio_object_property_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_name */
  {__pyx_k_get_audio_object_property_scope, sizeof(__pyx_k_get_audio_object_property_scope), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_scope */
  {__pyx_k_get_audio_object_property_scope_2, sizeof(__pyx_k_get_audio_object_property_scope_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_scope_2 */
  {__pyx_k_get_audio_object_property_scope_3, sizeof(__pyx_k_get_audio_object_property_scope_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_object_property_scope_3 */
  {__pyx_k_get_audio_services_bad_property, sizeof(__pyx_k_get_audio_services_bad_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_bad_property */
  {__pyx_k_get_audio_services_bad_specifier, sizeof(__pyx_k_get_audio_services_bad_specifier), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_bad_specifier */
  {__pyx_k_get_audio_services_no_error, sizeof(__pyx_k_get_audio_services_no_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_no_error */
  {__pyx_k_get_audio_services_property_comp, sizeof(__pyx_k_get_audio_services_property_comp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_property_comp */
  {__pyx_k_get_audio_services_property_is_u, sizeof(__pyx_k_get_audio_services_property_is_u), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_property_is_u */
  {__pyx_k_get_audio_services_system_sound, sizeof(__pyx_k_get_audio_services_system_sound), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_system_sound */
  {__pyx_k_get_audio_services_system_sound_2, sizeof(__pyx_k_get_audio_services_system_sound_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_system_sound_2 */
  {__pyx_k_get_audio_services_system_sound_3, sizeof(__pyx_k_get_audio_services_system_sound_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_system_sound_3 */
  {__pyx_k_get_audio_services_unsupported_p, sizeof(__pyx_k_get_audio_services_unsupported_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_services_unsupported_p */
  {__pyx_k_get_audio_unit_manufacturer_appl, sizeof(__pyx_k_get_audio_unit_manufacturer_appl), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_manufacturer_appl */
  {__pyx_k_get_audio_unit_property_set_rend, sizeof(__pyx_k_get_audio_unit_property_set_rend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_property_set_rend */
  {__pyx_k_get_audio_unit_property_stream_f, sizeof(__pyx_k_get_audio_unit_property_stream_f), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_property_stream_f */
  {__pyx_k_get_audio_unit_scope_global, sizeof(__pyx_k_get_audio_unit_scope_global), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_scope_global */
  {__pyx_k_get_audio_unit_scope_input, sizeof(__pyx_k_get_audio_unit_scope_input), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_scope_input */
  {__pyx_k_get_audio_unit_scope_output, sizeof(__pyx_k_get_audio_unit_scope_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_scope_output */
  {__pyx_k_get_audio_unit_subtype_default_o, sizeof(__pyx_k_get_audio_unit_subtype_default_o), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_subtype_default_o */
  {__pyx_k_get_audio_unit_type_output, sizeof(__pyx_k_get_audio_unit_type_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_audio_unit_type_output */
  {__pyx_k_get_extended_audio_file_property, sizeof(__pyx_k_get_extended_audio_file_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property */
  {__pyx_k_get_extended_audio_file_property_2, sizeof(__pyx_k_get_extended_audio_file_property_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_2 */
  {__pyx_k_get_extended_audio_file_property_3, sizeof(__pyx_k_get_extended_audio_file_property_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_3 */
  {__pyx_k_get_extended_audio_file_property_4, sizeof(__pyx_k_get_extended_audio_file_property_4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_4 */
  {__pyx_k_get_extended_audio_file_property_5, sizeof(__pyx_k_get_extended_audio_file_property_5), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_5 */
  {__pyx_k_get_extended_audio_file_property_6, sizeof(__pyx_k_get_extended_audio_file_property_6), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_6 */
  {__pyx_k_get_extended_audio_file_property_7, sizeof(__pyx_k_get_extended_audio_file_property_7), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_extended_audio_file_property_7 */
  {__pyx_k_get_linear_pcm_format_flag_is_no, sizeof(__pyx_k_get_linear_pcm_format_flag_is_no), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linear_pcm_format_flag_is_no */
  {__pyx_k_get_linear_pcm_format_flag_is_pa, sizeof(__pyx_k_get_linear_pcm_format_flag_is_pa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linear_pcm_format_flag_is_pa */
  {__pyx_k_get_linear_pcm_format_flag_is_si, sizeof(__pyx_k_get_linear_pcm_format_flag_is_si), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linear_pcm_format_flag_is_si */
  {__pyx_k_get_midi_control_type_14bit, sizeof(__pyx_k_get_midi_control_type_14bit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_14bit */
  {__pyx_k_get_midi_control_type_14bit_nrpn, sizeof(__pyx_k_get_midi_control_type_14bit_nrpn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_14bit_nrpn */
  {__pyx_k_get_midi_control_type_14bit_rpn, sizeof(__pyx_k_get_midi_control_type_14bit_rpn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_14bit_rpn */
  {__pyx_k_get_midi_control_type_7bit, sizeof(__pyx_k_get_midi_control_type_7bit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_7bit */
  {__pyx_k_get_midi_control_type_7bit_nrpn, sizeof(__pyx_k_get_midi_control_type_7bit_nrpn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_7bit_nrpn */
  {__pyx_k_get_midi_control_type_7bit_rpn, sizeof(__pyx_k_get_midi_control_type_7bit_rpn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_control_type_7bit_rpn */
  {__pyx_k_get_midi_cv_status_channel_press, sizeof(__pyx_k_get_midi_cv_status_channel_press), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_channel_press */
  {__pyx_k_get_midi_cv_status_control_chang, sizeof(__pyx_k_get_midi_cv_status_control_chang), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_control_chang */
  {__pyx_k_get_midi_cv_status_note_off, sizeof(__pyx_k_get_midi_cv_status_note_off), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_note_off */
  {__pyx_k_get_midi_cv_status_note_on, sizeof(__pyx_k_get_midi_cv_status_note_on), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_note_on */
  {__pyx_k_get_midi_cv_status_pitch_bend, sizeof(__pyx_k_get_midi_cv_status_pitch_bend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_pitch_bend */
  {__pyx_k_get_midi_cv_status_poly_pressure, sizeof(__pyx_k_get_midi_cv_status_poly_pressure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_poly_pressure */
  {__pyx_k_get_midi_cv_status_program_chang, sizeof(__pyx_k_get_midi_cv_status_program_chang), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_cv_status_program_chang */
  {__pyx_k_get_midi_error_id_not_unique, sizeof(__pyx_k_get_midi_error_id_not_unique), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_id_not_unique */
  {__pyx_k_get_midi_error_invalid_client, sizeof(__pyx_k_get_midi_error_invalid_client), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_invalid_client */
  {__pyx_k_get_midi_error_invalid_port, sizeof(__pyx_k_get_midi_error_invalid_port), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_invalid_port */
  {__pyx_k_get_midi_error_message_send_err, sizeof(__pyx_k_get_midi_error_message_send_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_message_send_err */
  {__pyx_k_get_midi_error_no_connection, sizeof(__pyx_k_get_midi_error_no_connection), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_no_connection */
  {__pyx_k_get_midi_error_no_current_setup, sizeof(__pyx_k_get_midi_error_no_current_setup), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_no_current_setup */
  {__pyx_k_get_midi_error_not_permitted, sizeof(__pyx_k_get_midi_error_not_permitted), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_not_permitted */
  {__pyx_k_get_midi_error_object_not_found, sizeof(__pyx_k_get_midi_error_object_not_found), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_object_not_found */
  {__pyx_k_get_midi_error_server_start_err, sizeof(__pyx_k_get_midi_error_server_start_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_server_start_err */
  {__pyx_k_get_midi_error_setup_format_err, sizeof(__pyx_k_get_midi_error_setup_format_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_setup_format_err */
  {__pyx_k_get_midi_error_unknown_endpoint, sizeof(__pyx_k_get_midi_error_unknown_endpoint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_unknown_endpoint */
  {__pyx_k_get_midi_error_unknown_error, sizeof(__pyx_k_get_midi_error_unknown_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_unknown_error */
  {__pyx_k_get_midi_error_unknown_property, sizeof(__pyx_k_get_midi_error_unknown_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_unknown_property */
  {__pyx_k_get_midi_error_wrong_endpoint_ty, sizeof(__pyx_k_get_midi_error_wrong_endpoint_ty), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_wrong_endpoint_ty */
  {__pyx_k_get_midi_error_wrong_property_ty, sizeof(__pyx_k_get_midi_error_wrong_property_ty), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_wrong_property_ty */
  {__pyx_k_get_midi_error_wrong_thread, sizeof(__pyx_k_get_midi_error_wrong_thread), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_error_wrong_thread */
  {__pyx_k_get_midi_message_type_channel_vo, sizeof(__pyx_k_get_midi_message_type_channel_vo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_channel_vo */
  {__pyx_k_get_midi_message_type_channel_vo_2, sizeof(__pyx_k_get_midi_message_type_channel_vo_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_channel_vo_2 */
  {__pyx_k_get_midi_message_type_data128, sizeof(__pyx_k_get_midi_message_type_data128), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_data128 */
  {__pyx_k_get_midi_message_type_sysex, sizeof(__pyx_k_get_midi_message_type_sysex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_sysex */
  {__pyx_k_get_midi_message_type_system, sizeof(__pyx_k_get_midi_message_type_system), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_system */
  {__pyx_k_get_midi_message_type_utility, sizeof(__pyx_k_get_midi_message_type_utility), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_message_type_utility */
  {__pyx_k_get_midi_object_type_destination, sizeof(__pyx_k_get_midi_object_type_destination), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_destination */
  {__pyx_k_get_midi_object_type_device, sizeof(__pyx_k_get_midi_object_type_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_device */
  {__pyx_k_get_midi_object_type_entity, sizeof(__pyx_k_get_midi_object_type_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_entity */
  {__pyx_k_get_midi_object_type_external_de, sizeof(__pyx_k_get_midi_object_type_external_de), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_external_de */
  {__pyx_k_get_midi_object_type_external_de_2, sizeof(__pyx_k_get_midi_object_type_external_de_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_external_de_2 */
  {__pyx_k_get_midi_object_type_external_en, sizeof(__pyx_k_get_midi_object_type_external_en), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_external_en */
  {__pyx_k_get_midi_object_type_external_so, sizeof(__pyx_k_get_midi_object_type_external_so), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_external_so */
  {__pyx_k_get_midi_object_type_other, sizeof(__pyx_k_get_midi_object_type_other), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_other */
  {__pyx_k_get_midi_object_type_source, sizeof(__pyx_k_get_midi_object_type_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_object_type_source */
  {__pyx_k_get_midi_property_device_id, sizeof(__pyx_k_get_midi_property_device_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_device_id */
  {__pyx_k_get_midi_property_display_name, sizeof(__pyx_k_get_midi_property_display_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_display_name */
  {__pyx_k_get_midi_property_driver_owner, sizeof(__pyx_k_get_midi_property_driver_owner), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_driver_owner */
  {__pyx_k_get_midi_property_manufacturer, sizeof(__pyx_k_get_midi_property_manufacturer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_manufacturer */
  {__pyx_k_get_midi_property_model, sizeof(__pyx_k_get_midi_property_model), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_model */
  {__pyx_k_get_midi_property_name, sizeof(__pyx_k_get_midi_property_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_name */
  {__pyx_k_get_midi_property_offline, sizeof(__pyx_k_get_midi_property_offline), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_offline */
  {__pyx_k_get_midi_property_private, sizeof(__pyx_k_get_midi_property_private), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_private */
  {__pyx_k_get_midi_property_receive_channe, sizeof(__pyx_k_get_midi_property_receive_channe), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_receive_channe */
  {__pyx_k_get_midi_property_transmit_chann, sizeof(__pyx_k_get_midi_property_transmit_chann), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_transmit_chann */
  {__pyx_k_get_midi_property_unique_id, sizeof(__pyx_k_get_midi_property_unique_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_property_unique_id */
  {__pyx_k_get_midi_protocol_1_0, sizeof(__pyx_k_get_midi_protocol_1_0), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_protocol_1_0 */
  {__pyx_k_get_midi_protocol_2_0, sizeof(__pyx_k_get_midi_protocol_2_0), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_protocol_2_0 */
  {__pyx_k_get_midi_thru_connection_max_end, sizeof(__pyx_k_get_midi_thru_connection_max_end), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_thru_connection_max_end */
  {__pyx_k_get_midi_transform_add, sizeof(__pyx_k_get_midi_transform_add), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_add */
  {__pyx_k_get_midi_transform_filter_out, sizeof(__pyx_k_get_midi_transform_filter_out), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_filter_out */
  {__pyx_k_get_midi_transform_map_control, sizeof(__pyx_k_get_midi_transform_map_control), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_map_control */
  {__pyx_k_get_midi_transform_map_value, sizeof(__pyx_k_get_midi_transform_map_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_map_value */
  {__pyx_k_get_midi_transform_max_value, sizeof(__pyx_k_get_midi_transform_max_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_max_value */
  {__pyx_k_get_midi_transform_min_value, sizeof(__pyx_k_get_midi_transform_min_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_min_value */
  {__pyx_k_get_midi_transform_none, sizeof(__pyx_k_get_midi_transform_none), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_none */
  {__pyx_k_get_midi_transform_scale, sizeof(__pyx_k_get_midi_transform_scale), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_midi_transform_scale */
  {__pyx_k_get_music_device_midi_event_list, sizeof(__pyx_k_get_music_device_midi_event_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_midi_event_list */
  {__pyx_k_get_music_device_midi_event_sele, sizeof(__pyx_k_get_music_device_midi_event_sele), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_midi_event_sele */
  {__pyx_k_get_music_device_range, sizeof(__pyx_k_get_music_device_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_range */
  {__pyx_k_get_music_device_start_note_sele, sizeof(__pyx_k_get_music_device_start_note_sele), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_start_note_sele */
  {__pyx_k_get_music_device_stop_note_selec, sizeof(__pyx_k_get_music_device_stop_note_selec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_stop_note_selec */
  {__pyx_k_get_music_device_sysex_select, sizeof(__pyx_k_get_music_device_sysex_select), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_device_sysex_select */
  {__pyx_k_get_music_event_type_au_preset, sizeof(__pyx_k_get_music_event_type_au_preset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_au_preset */
  {__pyx_k_get_music_event_type_extended_no, sizeof(__pyx_k_get_music_event_type_extended_no), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_extended_no */
  {__pyx_k_get_music_event_type_extended_te, sizeof(__pyx_k_get_music_event_type_extended_te), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_extended_te */
  {__pyx_k_get_music_event_type_meta, sizeof(__pyx_k_get_music_event_type_meta), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_meta */
  {__pyx_k_get_music_event_type_midi_channe, sizeof(__pyx_k_get_music_event_type_midi_channe), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_midi_channe */
  {__pyx_k_get_music_event_type_midi_note_m, sizeof(__pyx_k_get_music_event_type_midi_note_m), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_midi_note_m */
  {__pyx_k_get_music_event_type_midi_raw_da, sizeof(__pyx_k_get_music_event_type_midi_raw_da), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_midi_raw_da */
  {__pyx_k_get_music_event_type_null, sizeof(__pyx_k_get_music_event_type_null), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_null */
  {__pyx_k_get_music_event_type_parameter, sizeof(__pyx_k_get_music_event_type_parameter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_parameter */
  {__pyx_k_get_music_event_type_user, sizeof(__pyx_k_get_music_event_type_user), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_event_type_user */
  {__pyx_k_get_music_note_event_unused, sizeof(__pyx_k_get_music_note_event_unused), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_note_event_unused */
  {__pyx_k_get_music_note_event_use_group_i, sizeof(__pyx_k_get_music_note_event_use_group_i), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_note_event_use_group_i */
  {__pyx_k_get_music_sequence_file_any_type, sizeof(__pyx_k_get_music_sequence_file_any_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_file_any_type */
  {__pyx_k_get_music_sequence_file_imelody, sizeof(__pyx_k_get_music_sequence_file_imelody), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_file_imelody */
  {__pyx_k_get_music_sequence_file_midi_typ, sizeof(__pyx_k_get_music_sequence_file_midi_typ), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_file_midi_typ */
  {__pyx_k_get_music_sequence_type_beats, sizeof(__pyx_k_get_music_sequence_type_beats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_type_beats */
  {__pyx_k_get_music_sequence_type_samples, sizeof(__pyx_k_get_music_sequence_type_samples), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_type_samples */
  {__pyx_k_get_music_sequence_type_seconds, sizeof(__pyx_k_get_music_sequence_type_seconds), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_music_sequence_type_seconds */
  {__pyx_k_get_progress, sizeof(__pyx_k_get_progress), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_progress */
  {__pyx_k_get_sequence_track_property_auto, sizeof(__pyx_k_get_sequence_track_property_auto), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_auto */
  {__pyx_k_get_sequence_track_property_loop, sizeof(__pyx_k_get_sequence_track_property_loop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_loop */
  {__pyx_k_get_sequence_track_property_mute, sizeof(__pyx_k_get_sequence_track_property_mute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_mute */
  {__pyx_k_get_sequence_track_property_offs, sizeof(__pyx_k_get_sequence_track_property_offs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_offs */
  {__pyx_k_get_sequence_track_property_solo, sizeof(__pyx_k_get_sequence_track_property_solo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_solo */
  {__pyx_k_get_sequence_track_property_time, sizeof(__pyx_k_get_sequence_track_property_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_time */
  {__pyx_k_get_sequence_track_property_trac, sizeof(__pyx_k_get_sequence_track_property_trac), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_sequence_track_property_trac */
  {__pyx_k_get_system_sound_id_flash_screen, sizeof(__pyx_k_get_system_sound_id_flash_screen), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_system_sound_id_flash_screen */
  {__pyx_k_get_system_sound_id_user_preferr, sizeof(__pyx_k_get_system_sound_id_user_preferr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_system_sound_id_user_preferr */
  {__pyx_k_get_system_sound_id_vibrate, sizeof(__pyx_k_get_system_sound_id_vibrate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_system_sound_id_vibrate */
  {__pyx_k_get_user_preferred_alert, sizeof(__pyx_k_get_user_preferred_alert), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_user_preferred_alert */
  {__pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getstate */
  {__pyx_k_graph, sizeof(__pyx_k_graph), 0, 1, 1}, /* PyObject cname: __pyx_n_u_graph */
  {__pyx_k_graph_id, sizeof(__pyx_k_graph_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_graph_id */
  {__pyx_k_group, sizeof(__pyx_k_group), 0, 1, 1}, /* PyObject cname: __pyx_n_u_group */
  {__pyx_k_group_id, sizeof(__pyx_k_group_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_group_id */
  {__pyx_k_has_been_disposed, sizeof(__pyx_k_has_been_disposed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_has_been_disposed */
  {__pyx_k_highNote, sizeof(__pyx_k_highNote), 0, 1, 1}, /* PyObject cname: __pyx_n_u_highNote */
  {__pyx_k_highVelocity, sizeof(__pyx_k_highVelocity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_highVelocity */
  {__pyx_k_i, sizeof(__pyx_k_i), 0, 1, 1}, /* PyObject cname: __pyx_n_u_i */
  {__pyx_k_immediate, sizeof(__pyx_k_immediate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_immediate */
  {__pyx_k_in_device_id, sizeof(__pyx_k_in_device_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_in_device_id */
  {__pyx_k_index, sizeof(__pyx_k_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_index */
  {__pyx_k_input_buffer, sizeof(__pyx_k_input_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_buffer */
  {__pyx_k_input_data, sizeof(__pyx_k_input_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_data */
  {__pyx_k_input_data_size, sizeof(__pyx_k_input_data_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_data_size */
  {__pyx_k_input_packet_count, sizeof(__pyx_k_input_packet_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_packet_count */
  {__pyx_k_input_ptr, sizeof(__pyx_k_input_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_ptr */
  {__pyx_k_instance, sizeof(__pyx_k_instance), 0, 1, 1}, /* PyObject cname: __pyx_n_u_instance */
  {__pyx_k_instance_id, sizeof(__pyx_k_instance_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_instance_id */
  {__pyx_k_instrument_id, sizeof(__pyx_k_instrument_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_instrument_id */
  {__pyx_k_int, sizeof(__pyx_k_int), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int */
  {__pyx_k_int_to_fourchar, sizeof(__pyx_k_int_to_fourchar), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int_to_fourchar */
  {__pyx_k_int_to_fourchar_line_21, sizeof(__pyx_k_int_to_fourchar_line_21), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_int_to_fourchar_line_21 */
  {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */
  {__pyx_k_is_estimated, sizeof(__pyx_k_is_estimated), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_estimated */
  {__pyx_k_is_initialized, sizeof(__pyx_k_is_initialized), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_initialized */
  {__pyx_k_is_open, sizeof(__pyx_k_is_open), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_open */
  {__pyx_k_is_playing, sizeof(__pyx_k_is_playing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_playing */
  {__pyx_k_is_running, sizeof(__pyx_k_is_running), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_running */
  {__pyx_k_is_updated, sizeof(__pyx_k_is_updated), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_updated */
  {__pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_isenabled */
  {__pyx_k_keyPressure, sizeof(__pyx_k_keyPressure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_keyPressure */
  {__pyx_k_large_buffer, sizeof(__pyx_k_large_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_large_buffer */
  {__pyx_k_length, sizeof(__pyx_k_length), 0, 1, 1}, /* PyObject cname: __pyx_n_u_length */
  {__pyx_k_list, sizeof(__pyx_k_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_list */
  {__pyx_k_load_file, sizeof(__pyx_k_load_file), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_file */
  {__pyx_k_loop, sizeof(__pyx_k_loop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_loop */
  {__pyx_k_lowNote, sizeof(__pyx_k_lowNote), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lowNote */
  {__pyx_k_lowVelocity, sizeof(__pyx_k_lowVelocity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lowVelocity */
  {__pyx_k_lsb, sizeof(__pyx_k_lsb), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lsb */
  {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */
  {__pyx_k_manufacturer, sizeof(__pyx_k_manufacturer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_manufacturer */
  {__pyx_k_manufacturer_bytes, sizeof(__pyx_k_manufacturer_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_manufacturer_bytes */
  {__pyx_k_max_load, sizeof(__pyx_k_max_load), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_load */
  {__pyx_k_max_packet_size, sizeof(__pyx_k_max_packet_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_packet_size */
  {__pyx_k_max_size, sizeof(__pyx_k_max_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_size */
  {__pyx_k_message, sizeof(__pyx_k_message), 0, 1, 1}, /* PyObject cname: __pyx_n_u_message */
  {__pyx_k_midi1_up_channel_voice_message, sizeof(__pyx_k_midi1_up_channel_voice_message), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_channel_voice_message */
  {__pyx_k_midi1_up_control_change, sizeof(__pyx_k_midi1_up_control_change), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_control_change */
  {__pyx_k_midi1_up_note_off, sizeof(__pyx_k_midi1_up_note_off), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_note_off */
  {__pyx_k_midi1_up_note_on, sizeof(__pyx_k_midi1_up_note_on), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_note_on */
  {__pyx_k_midi1_up_pitch_bend, sizeof(__pyx_k_midi1_up_pitch_bend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_pitch_bend */
  {__pyx_k_midi1_up_sysex, sizeof(__pyx_k_midi1_up_sysex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_sysex */
  {__pyx_k_midi1_up_system_common, sizeof(__pyx_k_midi1_up_system_common), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi1_up_system_common */
  {__pyx_k_midi2_channel_voice_message, sizeof(__pyx_k_midi2_channel_voice_message), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_channel_voice_message */
  {__pyx_k_midi2_control_change, sizeof(__pyx_k_midi2_control_change), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_control_change */
  {__pyx_k_midi2_note_off, sizeof(__pyx_k_midi2_note_off), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_note_off */
  {__pyx_k_midi2_note_on, sizeof(__pyx_k_midi2_note_on), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_note_on */
  {__pyx_k_midi2_pitch_bend, sizeof(__pyx_k_midi2_pitch_bend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_pitch_bend */
  {__pyx_k_midi2_program_change, sizeof(__pyx_k_midi2_program_change), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi2_program_change */
  {__pyx_k_midi_client_create, sizeof(__pyx_k_midi_client_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_client_create */
  {__pyx_k_midi_client_dispose, sizeof(__pyx_k_midi_client_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_client_dispose */
  {__pyx_k_midi_control_change, sizeof(__pyx_k_midi_control_change), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_control_change */
  {__pyx_k_midi_destination_create, sizeof(__pyx_k_midi_destination_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_destination_create */
  {__pyx_k_midi_device_add_entity, sizeof(__pyx_k_midi_device_add_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_add_entity */
  {__pyx_k_midi_device_create, sizeof(__pyx_k_midi_device_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_create */
  {__pyx_k_midi_device_dispose, sizeof(__pyx_k_midi_device_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_dispose */
  {__pyx_k_midi_device_get_entity, sizeof(__pyx_k_midi_device_get_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_get_entity */
  {__pyx_k_midi_device_get_name, sizeof(__pyx_k_midi_device_get_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_get_name */
  {__pyx_k_midi_device_get_number_of_entiti, sizeof(__pyx_k_midi_device_get_number_of_entiti), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_get_number_of_entiti */
  {__pyx_k_midi_device_list_add_device, sizeof(__pyx_k_midi_device_list_add_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_list_add_device */
  {__pyx_k_midi_device_list_dispose, sizeof(__pyx_k_midi_device_list_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_list_dispose */
  {__pyx_k_midi_device_list_get_device, sizeof(__pyx_k_midi_device_list_get_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_list_get_device */
  {__pyx_k_midi_device_list_get_number_of_d, sizeof(__pyx_k_midi_device_list_get_number_of_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_list_get_number_of_d */
  {__pyx_k_midi_device_new_entity, sizeof(__pyx_k_midi_device_new_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_new_entity */
  {__pyx_k_midi_device_remove_entity, sizeof(__pyx_k_midi_device_remove_entity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_device_remove_entity */
  {__pyx_k_midi_driver_enable_monitoring, sizeof(__pyx_k_midi_driver_enable_monitoring), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_driver_enable_monitoring */
  {__pyx_k_midi_endpoint_dispose, sizeof(__pyx_k_midi_endpoint_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_endpoint_dispose */
  {__pyx_k_midi_endpoint_get_name, sizeof(__pyx_k_midi_endpoint_get_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_endpoint_get_name */
  {__pyx_k_midi_endpoint_get_ref_cons, sizeof(__pyx_k_midi_endpoint_get_ref_cons), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_endpoint_get_ref_cons */
  {__pyx_k_midi_endpoint_set_ref_cons, sizeof(__pyx_k_midi_endpoint_set_ref_cons), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_endpoint_set_ref_cons */
  {__pyx_k_midi_entity_add_or_remove_endpoi, sizeof(__pyx_k_midi_entity_add_or_remove_endpoi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_add_or_remove_endpoi */
  {__pyx_k_midi_entity_get_destination, sizeof(__pyx_k_midi_entity_get_destination), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_get_destination */
  {__pyx_k_midi_entity_get_name, sizeof(__pyx_k_midi_entity_get_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_get_name */
  {__pyx_k_midi_entity_get_number_of_destin, sizeof(__pyx_k_midi_entity_get_number_of_destin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_get_number_of_destin */
  {__pyx_k_midi_entity_get_number_of_source, sizeof(__pyx_k_midi_entity_get_number_of_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_get_number_of_source */
  {__pyx_k_midi_entity_get_source, sizeof(__pyx_k_midi_entity_get_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_entity_get_source */
  {__pyx_k_midi_external_device_create, sizeof(__pyx_k_midi_external_device_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_external_device_create */
  {__pyx_k_midi_get_destination, sizeof(__pyx_k_midi_get_destination), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_destination */
  {__pyx_k_midi_get_device, sizeof(__pyx_k_midi_get_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_device */
  {__pyx_k_midi_get_driver_device_list, sizeof(__pyx_k_midi_get_driver_device_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_driver_device_list */
  {__pyx_k_midi_get_driver_io_runloop, sizeof(__pyx_k_midi_get_driver_io_runloop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_driver_io_runloop */
  {__pyx_k_midi_get_number_of_destinations, sizeof(__pyx_k_midi_get_number_of_destinations), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_number_of_destinations */
  {__pyx_k_midi_get_number_of_devices, sizeof(__pyx_k_midi_get_number_of_devices), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_number_of_devices */
  {__pyx_k_midi_get_number_of_sources, sizeof(__pyx_k_midi_get_number_of_sources), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_number_of_sources */
  {__pyx_k_midi_get_source, sizeof(__pyx_k_midi_get_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_get_source */
  {__pyx_k_midi_input_port_create, sizeof(__pyx_k_midi_input_port_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_input_port_create */
  {__pyx_k_midi_message_type_for_up_word, sizeof(__pyx_k_midi_message_type_for_up_word), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_message_type_for_up_word */
  {__pyx_k_midi_note_off, sizeof(__pyx_k_midi_note_off), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_note_off */
  {__pyx_k_midi_note_on, sizeof(__pyx_k_midi_note_on), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_note_on */
  {__pyx_k_midi_object_get_integer_property, sizeof(__pyx_k_midi_object_get_integer_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_get_integer_property */
  {__pyx_k_midi_object_get_manufacturer, sizeof(__pyx_k_midi_object_get_manufacturer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_get_manufacturer */
  {__pyx_k_midi_object_get_model, sizeof(__pyx_k_midi_object_get_model), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_get_model */
  {__pyx_k_midi_object_get_name, sizeof(__pyx_k_midi_object_get_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_get_name */
  {__pyx_k_midi_object_get_string_property, sizeof(__pyx_k_midi_object_get_string_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_get_string_property */
  {__pyx_k_midi_object_set_integer_property, sizeof(__pyx_k_midi_object_set_integer_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_set_integer_property */
  {__pyx_k_midi_object_set_string_property, sizeof(__pyx_k_midi_object_set_string_property), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_object_set_string_property */
  {__pyx_k_midi_output_port_create, sizeof(__pyx_k_midi_output_port_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_output_port_create */
  {__pyx_k_midi_pitch_bend, sizeof(__pyx_k_midi_pitch_bend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_pitch_bend */
  {__pyx_k_midi_port_connect_source, sizeof(__pyx_k_midi_port_connect_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_port_connect_source */
  {__pyx_k_midi_port_disconnect_source, sizeof(__pyx_k_midi_port_disconnect_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_port_disconnect_source */
  {__pyx_k_midi_port_dispose, sizeof(__pyx_k_midi_port_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_port_dispose */
  {__pyx_k_midi_program_change, sizeof(__pyx_k_midi_program_change), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_program_change */
  {__pyx_k_midi_send_data, sizeof(__pyx_k_midi_send_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_send_data */
  {__pyx_k_midi_setup_add_device, sizeof(__pyx_k_midi_setup_add_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_setup_add_device */
  {__pyx_k_midi_setup_add_external_device, sizeof(__pyx_k_midi_setup_add_external_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_setup_add_external_device */
  {__pyx_k_midi_setup_remove_device, sizeof(__pyx_k_midi_setup_remove_device), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_setup_remove_device */
  {__pyx_k_midi_setup_remove_external_devic, sizeof(__pyx_k_midi_setup_remove_external_devic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_setup_remove_external_devic */
  {__pyx_k_midi_source_create, sizeof(__pyx_k_midi_source_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_source_create */
  {__pyx_k_midi_thru_connection_create, sizeof(__pyx_k_midi_thru_connection_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_create */
  {__pyx_k_midi_thru_connection_dispose, sizeof(__pyx_k_midi_thru_connection_dispose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_dispose */
  {__pyx_k_midi_thru_connection_find, sizeof(__pyx_k_midi_thru_connection_find), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_find */
  {__pyx_k_midi_thru_connection_get_params, sizeof(__pyx_k_midi_thru_connection_get_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_get_params */
  {__pyx_k_midi_thru_connection_params_init, sizeof(__pyx_k_midi_thru_connection_params_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_params_init */
  {__pyx_k_midi_thru_connection_set_params, sizeof(__pyx_k_midi_thru_connection_set_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_midi_thru_connection_set_params */
  {__pyx_k_model, sizeof(__pyx_k_model), 0, 1, 1}, /* PyObject cname: __pyx_n_u_model */
  {__pyx_k_model_bytes, sizeof(__pyx_k_model_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_model_bytes */
  {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */
  {__pyx_k_msb, sizeof(__pyx_k_msb), 0, 1, 1}, /* PyObject cname: __pyx_n_u_msb */
  {__pyx_k_msg, sizeof(__pyx_k_msg), 0, 1, 1}, /* PyObject cname: __pyx_n_u_msg */
  {__pyx_k_music_device_midi_event, sizeof(__pyx_k_music_device_midi_event), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_device_midi_event */
  {__pyx_k_music_device_start_note, sizeof(__pyx_k_music_device_start_note), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_device_start_note */
  {__pyx_k_music_device_stop_note, sizeof(__pyx_k_music_device_stop_note), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_device_stop_note */
  {__pyx_k_music_device_sysex, sizeof(__pyx_k_music_device_sysex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_device_sysex */
  {__pyx_k_music_player_get_play_rate_scala, sizeof(__pyx_k_music_player_get_play_rate_scala), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_get_play_rate_scala */
  {__pyx_k_music_player_get_sequence, sizeof(__pyx_k_music_player_get_sequence), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_get_sequence */
  {__pyx_k_music_player_get_time, sizeof(__pyx_k_music_player_get_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_get_time */
  {__pyx_k_music_player_is_playing, sizeof(__pyx_k_music_player_is_playing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_is_playing */
  {__pyx_k_music_player_preroll, sizeof(__pyx_k_music_player_preroll), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_preroll */
  {__pyx_k_music_player_set_play_rate_scala, sizeof(__pyx_k_music_player_set_play_rate_scala), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_set_play_rate_scala */
  {__pyx_k_music_player_set_sequence, sizeof(__pyx_k_music_player_set_sequence), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_set_sequence */
  {__pyx_k_music_player_set_time, sizeof(__pyx_k_music_player_set_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_set_time */
  {__pyx_k_music_player_start, sizeof(__pyx_k_music_player_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_start */
  {__pyx_k_music_player_stop, sizeof(__pyx_k_music_player_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_player_stop */
  {__pyx_k_music_sequence_dispose_track, sizeof(__pyx_k_music_sequence_dispose_track), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_dispose_track */
  {__pyx_k_music_sequence_file_load, sizeof(__pyx_k_music_sequence_file_load), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_file_load */
  {__pyx_k_music_sequence_get_ind_track, sizeof(__pyx_k_music_sequence_get_ind_track), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_get_ind_track */
  {__pyx_k_music_sequence_get_sequence_type, sizeof(__pyx_k_music_sequence_get_sequence_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_get_sequence_type */
  {__pyx_k_music_sequence_get_tempo_track, sizeof(__pyx_k_music_sequence_get_tempo_track), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_get_tempo_track */
  {__pyx_k_music_sequence_get_track_count, sizeof(__pyx_k_music_sequence_get_track_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_get_track_count */
  {__pyx_k_music_sequence_new_track, sizeof(__pyx_k_music_sequence_new_track), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_new_track */
  {__pyx_k_music_sequence_set_sequence_type, sizeof(__pyx_k_music_sequence_set_sequence_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_sequence_set_sequence_type */
  {__pyx_k_music_track_new_extended_tempo_e, sizeof(__pyx_k_music_track_new_extended_tempo_e), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_track_new_extended_tempo_e */
  {__pyx_k_music_track_new_midi_channel_eve, sizeof(__pyx_k_music_track_new_midi_channel_eve), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_track_new_midi_channel_eve */
  {__pyx_k_music_track_new_midi_note_event, sizeof(__pyx_k_music_track_new_midi_note_event), 0, 1, 1}, /* PyObject cname: __pyx_n_u_music_track_new_midi_note_event */
  {__pyx_k_n, sizeof(__pyx_k_n), 0, 1, 1}, /* PyObject cname: __pyx_n_u_n */
  {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */
  {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */
  {__pyx_k_name_bytes, sizeof(__pyx_k_name_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_bytes */
  {__pyx_k_name_ref, sizeof(__pyx_k_name_ref), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_ref */
  {__pyx_k_new_music_player, sizeof(__pyx_k_new_music_player), 0, 1, 1}, /* PyObject cname: __pyx_n_u_new_music_player */
  {__pyx_k_new_music_sequence, sizeof(__pyx_k_new_music_sequence), 0, 1, 1}, /* PyObject cname: __pyx_n_u_new_music_sequence */
  {__pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_no_default___reduce___due_to_non */
  {__pyx_k_node, sizeof(__pyx_k_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_node */
  {__pyx_k_node_id, sizeof(__pyx_k_node_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_node_id */
  {__pyx_k_note, sizeof(__pyx_k_note), 0, 1, 1}, /* PyObject cname: __pyx_n_u_note */
  {__pyx_k_noteNumber, sizeof(__pyx_k_noteNumber), 0, 1, 1}, /* PyObject cname: __pyx_n_u_noteNumber */
  {__pyx_k_note_instance_id, sizeof(__pyx_k_note_instance_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_note_instance_id */
  {__pyx_k_note_number, sizeof(__pyx_k_note_number), 0, 1, 1}, /* PyObject cname: __pyx_n_u_note_number */
  {__pyx_k_note_transform, sizeof(__pyx_k_note_transform), 0, 1, 1}, /* PyObject cname: __pyx_n_u_note_transform */
  {__pyx_k_numControlTransforms, sizeof(__pyx_k_numControlTransforms), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numControlTransforms */
  {__pyx_k_numMaps, sizeof(__pyx_k_numMaps), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numMaps */
  {__pyx_k_num_bytes, sizeof(__pyx_k_num_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_bytes */
  {__pyx_k_num_connections, sizeof(__pyx_k_num_connections), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_connections */
  {__pyx_k_num_controls, sizeof(__pyx_k_num_controls), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_controls */
  {__pyx_k_num_destination_endpoints, sizeof(__pyx_k_num_destination_endpoints), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_destination_endpoints */
  {__pyx_k_num_dests, sizeof(__pyx_k_num_dests), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_dests */
  {__pyx_k_num_devices, sizeof(__pyx_k_num_devices), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_devices */
  {__pyx_k_num_entities, sizeof(__pyx_k_num_entities), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_entities */
  {__pyx_k_num_frames, sizeof(__pyx_k_num_frames), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_frames */
  {__pyx_k_num_packets, sizeof(__pyx_k_num_packets), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_packets */
  {__pyx_k_num_source_endpoints, sizeof(__pyx_k_num_source_endpoints), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_source_endpoints */
  {__pyx_k_num_sources, sizeof(__pyx_k_num_sources), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_sources */
  {__pyx_k_obj, sizeof(__pyx_k_obj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_obj */
  {__pyx_k_object_id, sizeof(__pyx_k_object_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_object_id */
  {__pyx_k_offline, sizeof(__pyx_k_offline), 0, 1, 1}, /* PyObject cname: __pyx_n_u_offline */
  {__pyx_k_offset_sample_frame, sizeof(__pyx_k_offset_sample_frame), 0, 1, 1}, /* PyObject cname: __pyx_n_u_offset_sample_frame */
  {__pyx_k_out_of_bounds_0, sizeof(__pyx_k_out_of_bounds_0), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_out_of_bounds_0 */
  {__pyx_k_out_of_range_0, sizeof(__pyx_k_out_of_range_0), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_out_of_range_0 */
  {__pyx_k_output_buffer, sizeof(__pyx_k_output_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_buffer */
  {__pyx_k_output_buffer_list, sizeof(__pyx_k_output_buffer_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_buffer_list */
  {__pyx_k_output_buffer_size, sizeof(__pyx_k_output_buffer_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_buffer_size */
  {__pyx_k_output_data_packet_size, sizeof(__pyx_k_output_data_packet_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_data_packet_size */
  {__pyx_k_output_data_size, sizeof(__pyx_k_output_data_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_data_size */
  {__pyx_k_output_packet_count, sizeof(__pyx_k_output_packet_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_packet_count */
  {__pyx_k_owner_id_bytes, sizeof(__pyx_k_owner_id_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_owner_id_bytes */
  {__pyx_k_packet, sizeof(__pyx_k_packet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_packet */
  {__pyx_k_packet_count, sizeof(__pyx_k_packet_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_packet_count */
  {__pyx_k_packet_offset, sizeof(__pyx_k_packet_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_packet_offset */
  {__pyx_k_param, sizeof(__pyx_k_param), 0, 1, 1}, /* PyObject cname: __pyx_n_u_param */
  {__pyx_k_param_id, sizeof(__pyx_k_param_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_param_id */
  {__pyx_k_params, sizeof(__pyx_k_params), 0, 1, 1}, /* PyObject cname: __pyx_n_u_params */
  {__pyx_k_params_size, sizeof(__pyx_k_params_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_params_size */
  {__pyx_k_path_bytes, sizeof(__pyx_k_path_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_path_bytes */
  {__pyx_k_permissions, sizeof(__pyx_k_permissions), 0, 1, 1}, /* PyObject cname: __pyx_n_u_permissions */
  {__pyx_k_persistent_owner_id, sizeof(__pyx_k_persistent_owner_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_persistent_owner_id */
  {__pyx_k_pitch, sizeof(__pyx_k_pitch), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pitch */
  {__pyx_k_pitchBend, sizeof(__pyx_k_pitchBend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pitchBend */
  {__pyx_k_pktlist, sizeof(__pyx_k_pktlist), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pktlist */
  {__pyx_k_pktlist_size, sizeof(__pyx_k_pktlist_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pktlist_size */
  {__pyx_k_player, sizeof(__pyx_k_player), 0, 1, 1}, /* PyObject cname: __pyx_n_u_player */
  {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */
  {__pyx_k_port, sizeof(__pyx_k_port), 0, 1, 1}, /* PyObject cname: __pyx_n_u_port */
  {__pyx_k_port_name, sizeof(__pyx_k_port_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_port_name */
  {__pyx_k_port_name_bytes, sizeof(__pyx_k_port_name_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_port_name_bytes */
  {__pyx_k_previous, sizeof(__pyx_k_previous), 0, 1, 1}, /* PyObject cname: __pyx_n_u_previous */
  {__pyx_k_previous_component_id, sizeof(__pyx_k_previous_component_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_previous_component_id */
  {__pyx_k_print, sizeof(__pyx_k_print), 0, 1, 1}, /* PyObject cname: __pyx_n_u_print */
  {__pyx_k_private, sizeof(__pyx_k_private), 0, 1, 1}, /* PyObject cname: __pyx_n_u_private */
  {__pyx_k_program, sizeof(__pyx_k_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_program */
  {__pyx_k_programChange, sizeof(__pyx_k_programChange), 0, 1, 1}, /* PyObject cname: __pyx_n_u_programChange */
  {__pyx_k_prop_bytes, sizeof(__pyx_k_prop_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prop_bytes */
  {__pyx_k_prop_id, sizeof(__pyx_k_prop_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prop_id */
  {__pyx_k_prop_size, sizeof(__pyx_k_prop_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prop_size */
  {__pyx_k_property_id, sizeof(__pyx_k_property_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_property_id */
  {__pyx_k_property_name, sizeof(__pyx_k_property_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_property_name */
  {__pyx_k_property_selector, sizeof(__pyx_k_property_selector), 0, 1, 1}, /* PyObject cname: __pyx_n_u_property_selector */
  {__pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 1, 1}, /* PyObject cname: __pyx_n_u_protocol */
  {__pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_state */
  {__pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_vtable */
  {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */
  {__pyx_k_queue, sizeof(__pyx_k_queue), 0, 1, 1}, /* PyObject cname: __pyx_n_u_queue */
  {__pyx_k_queue_id, sizeof(__pyx_k_queue_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_queue_id */
  {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */
  {__pyx_k_receiveChannels, sizeof(__pyx_k_receiveChannels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_receiveChannels */
  {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */
  {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */
  {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */
  {__pyx_k_ref1, sizeof(__pyx_k_ref1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ref1 */
  {__pyx_k_ref2, sizeof(__pyx_k_ref2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ref2 */
  {__pyx_k_release_velocity, sizeof(__pyx_k_release_velocity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_release_velocity */
  {__pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reserved */
  {__pyx_k_reset_playback, sizeof(__pyx_k_reset_playback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reset_playback */
  {__pyx_k_result, sizeof(__pyx_k_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_result */
  {__pyx_k_return, sizeof(__pyx_k_return), 0, 1, 1}, /* PyObject cname: __pyx_n_u_return */
  {__pyx_k_runloop, sizeof(__pyx_k_runloop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_runloop */
  {__pyx_k_sample_rate, sizeof(__pyx_k_sample_rate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sample_rate */
  {__pyx_k_scale_rate, sizeof(__pyx_k_scale_rate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scale_rate */
  {__pyx_k_scope, sizeof(__pyx_k_scope), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scope */
  {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */
  {__pyx_k_self_audio_output_cannot_be_conv, sizeof(__pyx_k_self_audio_output_cannot_be_conv), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_self_audio_output_cannot_be_conv */
  {__pyx_k_seq, sizeof(__pyx_k_seq), 0, 1, 1}, /* PyObject cname: __pyx_n_u_seq */
  {__pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sequence */
  {__pyx_k_sequence_type, sizeof(__pyx_k_sequence_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sequence_type */
  {__pyx_k_set_looping, sizeof(__pyx_k_set_looping), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_looping */
  {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */
  {__pyx_k_set_object_id, sizeof(__pyx_k_set_object_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_object_id */
  {__pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate */
  {__pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate_cython */
  {__pyx_k_setup_output, sizeof(__pyx_k_setup_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setup_output */
  {__pyx_k_should_be_four_characters_only, sizeof(__pyx_k_should_be_four_characters_only), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_should_be_four_characters_only */
  {__pyx_k_sound_id, sizeof(__pyx_k_sound_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sound_id */
  {__pyx_k_source, sizeof(__pyx_k_source), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source */
  {__pyx_k_source_format, sizeof(__pyx_k_source_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source_format */
  {__pyx_k_source_format_dict, sizeof(__pyx_k_source_format_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source_format_dict */
  {__pyx_k_source_index, sizeof(__pyx_k_source_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source_index */
  {__pyx_k_source_node, sizeof(__pyx_k_source_node), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source_node */
  {__pyx_k_source_output, sizeof(__pyx_k_source_output), 0, 1, 1}, /* PyObject cname: __pyx_n_u_source_output */
  {__pyx_k_sources, sizeof(__pyx_k_sources), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sources */
  {__pyx_k_specifier, sizeof(__pyx_k_specifier), 0, 1, 1}, /* PyObject cname: __pyx_n_u_specifier */
  {__pyx_k_specifier_value, sizeof(__pyx_k_specifier_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_specifier_value */
  {__pyx_k_src_coremusic_capi_pyx, sizeof(__pyx_k_src_coremusic_capi_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_src_coremusic_capi_pyx */
  {__pyx_k_src_format, sizeof(__pyx_k_src_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_src_format */
  {__pyx_k_start, sizeof(__pyx_k_start), 0, 1, 1}, /* PyObject cname: __pyx_n_u_start */
  {__pyx_k_start_packet, sizeof(__pyx_k_start_packet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_start_packet */
  {__pyx_k_status, sizeof(__pyx_k_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_status */
  {__pyx_k_status_result, sizeof(__pyx_k_status_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_status_result */
  {__pyx_k_stop, sizeof(__pyx_k_stop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stop */
  {__pyx_k_str, sizeof(__pyx_k_str), 0, 1, 1}, /* PyObject cname: __pyx_n_u_str */
  {__pyx_k_stream, sizeof(__pyx_k_stream), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stream */
  {__pyx_k_stream_id, sizeof(__pyx_k_stream_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stream_id */
  {__pyx_k_string_ref, sizeof(__pyx_k_string_ref), 0, 1, 1}, /* PyObject cname: __pyx_n_u_string_ref */
  {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */
  {__pyx_k_subtype, sizeof(__pyx_k_subtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_subtype */
  {__pyx_k_system_sound_id, sizeof(__pyx_k_system_sound_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_system_sound_id */
  {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */
  {__pyx_k_test_error, sizeof(__pyx_k_test_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test_error */
  {__pyx_k_time, sizeof(__pyx_k_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_time */
  {__pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_timestamp */
  {__pyx_k_track, sizeof(__pyx_k_track), 0, 1, 1}, /* PyObject cname: __pyx_n_u_track */
  {__pyx_k_track_count, sizeof(__pyx_k_track_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_track_count */
  {__pyx_k_track_index, sizeof(__pyx_k_track_index), 0, 1, 1}, /* PyObject cname: __pyx_n_u_track_index */
  {__pyx_k_transform, sizeof(__pyx_k_transform), 0, 1, 1}, /* PyObject cname: __pyx_n_u_transform */
  {__pyx_k_transmitChannels, sizeof(__pyx_k_transmitChannels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_transmitChannels */
  {__pyx_k_tuple, sizeof(__pyx_k_tuple), 0, 1, 1}, /* PyObject cname: __pyx_n_u_tuple */
  {__pyx_k_type, sizeof(__pyx_k_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_type */
  {__pyx_k_uint_data, sizeof(__pyx_k_uint_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_uint_data */
  {__pyx_k_uniqueID, sizeof(__pyx_k_uniqueID), 0, 1, 1}, /* PyObject cname: __pyx_n_u_uniqueID */
  {__pyx_k_unit, sizeof(__pyx_k_unit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_unit */
  {__pyx_k_url, sizeof(__pyx_k_url), 0, 1, 1}, /* PyObject cname: __pyx_n_u_url */
  {__pyx_k_url_ref, sizeof(__pyx_k_url_ref), 0, 1, 1}, /* PyObject cname: __pyx_n_u_url_ref */
  {__pyx_k_value, sizeof(__pyx_k_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value */
  {__pyx_k_valueMaps, sizeof(__pyx_k_valueMaps), 0, 1, 1}, /* PyObject cname: __pyx_n_u_valueMaps */
  {__pyx_k_value_bytes, sizeof(__pyx_k_value_bytes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value_bytes */
  {__pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_velocity */
  {__pyx_k_velocity_transform, sizeof(__pyx_k_velocity_transform), 0, 1, 1}, /* PyObject cname: __pyx_n_u_velocity_transform */
  {__pyx_k_version, sizeof(__pyx_k_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_version */
  {__pyx_k_word, sizeof(__pyx_k_word), 0, 1, 1}, /* PyObject cname: __pyx_n_u_word */
  {__pyx_k_writable, sizeof(__pyx_k_writable), 0, 1, 1}, /* PyObject cname: __pyx_n_u_writable */
  {0, 0, 0, 0, 0}
};
/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names);

/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 65, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 73, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 168, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 227, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1534, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 2024, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 4533, __pyx_L1_error)
  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);

  /* "coremusic/capi.pyx":1100
 * 
 *     # Set up the audio format
 *     format.mSampleRate = audio_format.get('sample_rate', 44100.0)             # <<<<<<<<<<<<<<
 *     format.mFormatID = audio_format.get('format_id', ca.kAudioFormatLinearPCM)
 *     format.mFormatFlags = audio_format.get('format_flags',
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_sample_rate, __pyx_mstate_global->__pyx_float_44100_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "coremusic/capi.pyx":1104
 *     format.mFormatFlags = audio_format.get('format_flags',
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)             # <<<<<<<<<<<<<<
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_bytes_per_packet, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "coremusic/capi.pyx":1105
 *         ca.kLinearPCMFormatFlagIsSignedInteger | ca.kLinearPCMFormatFlagIsPacked)
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)             # <<<<<<<<<<<<<<
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_frames_per_packet, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "coremusic/capi.pyx":1106
 *     format.mBytesPerPacket = audio_format.get('bytes_per_packet', 4)
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)             # <<<<<<<<<<<<<<
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_bytes_per_frame, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "coremusic/capi.pyx":1107
 *     format.mFramesPerPacket = audio_format.get('frames_per_packet', 1)
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)             # <<<<<<<<<<<<<<
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)
 *     format.mReserved = 0
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_channels_per_frame, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "coremusic/capi.pyx":1108
 *     format.mBytesPerFrame = audio_format.get('bytes_per_frame', 4)
 *     format.mChannelsPerFrame = audio_format.get('channels_per_frame', 2)
 *     format.mBitsPerChannel = audio_format.get('bits_per_channel', 16)             # <<<<<<<<<<<<<<
 *     format.mReserved = 0
 * 
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_bits_per_channel, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "coremusic/capi.pyx":1287
 *         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[6] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "coremusic/capi.pyx":1288
 * 
 *     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[7] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_subtype, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "coremusic/capi.pyx":1289
 *     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[8] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_manufacturer, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "coremusic/capi.pyx":1290
 *     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[9] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_flags, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);

  /* "coremusic/capi.pyx":1291
 *     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[10] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_flags_mask, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 1291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "coremusic/capi.pyx":4760
 *     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[11] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_endpointRef, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 4760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "coremusic/capi.pyx":4761
 *         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[12] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_uniqueID, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);

  /* "coremusic/capi.pyx":4784
 *     # 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[13] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_transform, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "coremusic/capi.pyx":4786
 *     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[14] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_param, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "coremusic/capi.pyx":354
 *     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[15] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "coremusic/capi.pyx":4730
 *     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[16] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 4730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);
  __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);
  __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_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_mstate->__pyx_float_44100_0 = PyFloat_FromDouble(44100.0); if (unlikely(!__pyx_mstate->__pyx_float_44100_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_2 = PyLong_FromLong(2); if (unlikely(!__pyx_mstate->__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_4 = PyLong_FromLong(4); if (unlikely(!__pyx_mstate->__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_8 = PyLong_FromLong(8); if (unlikely(!__pyx_mstate->__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_16 = PyLong_FromLong(16); if (unlikely(!__pyx_mstate->__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_24 = PyLong_FromLong(24); if (unlikely(!__pyx_mstate->__pyx_int_24)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_127 = PyLong_FromLong(127); if (unlikely(!__pyx_mstate->__pyx_int_127)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_255 = PyLong_FromLong(255); if (unlikely(!__pyx_mstate->__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_neg_10860 = PyLong_FromLong(-10860L); if (unlikely(!__pyx_mstate->__pyx_int_neg_10860)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_neg_10861 = PyLong_FromLong(-10861L); if (unlikely(!__pyx_mstate->__pyx_int_neg_10861)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_neg_10862 = PyLong_FromLong(-10862L); if (unlikely(!__pyx_mstate->__pyx_int_neg_10862)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_neg_10863 = PyLong_FromLong(-10863L); if (unlikely(!__pyx_mstate->__pyx_int_neg_10863)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_int_neg_10864 = PyLong_FromLong(-10864L); if (unlikely(!__pyx_mstate->__pyx_int_neg_10864)) __PYX_ERR(0, 1, __pyx_L1_error)
  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;
            unsigned int line_table_length : 14;
        } __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,
        const char *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), 11, 86};
    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_k_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), 21, 74};
    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_k_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), 34, 9};
    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_k_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), 37, 13};
    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_k_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), 41, 15};
    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_k_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), 46, 210};
    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_k_q_Q_q_a_9CwcQRRS_wc_l_2_TTU_z_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87, 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_string_ref, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_max_size, __pyx_mstate->__pyx_n_u_large_buffer};
    __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_get_property_string, __pyx_k_q_Q_q_ay_7_QkYZZ_wc_l_2_PPQ_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138, 212};
    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[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_hardware_get_devices, __pyx_k_A_q_Q_q_c1LAYVYY___a_wc_q_S_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 176, 92};
    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[8] = __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_k_2_q_a_Q_q_H_RUU_gghhi_wc_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194, 92};
    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[9] = __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_k_1_q_a_Q_q_H_RUU_gghhi_wc_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 213, 130};
    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[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_open_url, __pyx_k_IWAQ_8_1A_t1_j_1_A_wc_l_2_Fa_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 244, 47};
    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[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_close, __pyx_k_5Q_q_wc_l_2_DA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 253, 174};
    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[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_get_property, __pyx_k_5Q_q_a_9_wc_l_2_Na_vQa_t1_k_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 293, 210};
    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[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_read_packets, __pyx_k_5Q_q_Q_Q_q_5Q_wc_l_2_DA_1_1_vQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 354, 66};
    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[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_open, __pyx_k_1_4A_A_wc_l_2_I_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 372, 48};
    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[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_close, __pyx_k_Q_5Qa_wc_l_2_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 381, 83};
    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[16] = __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_k_a_Q_s_1_Q_a_wc_l_2_Oq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 400, 344};
    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->__pyx_n_u_desc};
    __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_get_property, __pyx_k_Q_q_q_q_a_wc_l_2_TTU_vQa_t1_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 472, 100};
    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[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_file_stream_seek, __pyx_k_Q_4A_1_wc_l_2_I_q_AV4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 500, 350};
    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[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_new, __pyx_k_1_o_a_a_m_A_A_m4q_t1_d_3Gq_t14I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 545, 43};
    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[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_dispose, __pyx_k_6aq_wc_l_2_K1, 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), 553, 151};
    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[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_convert_buffer, __pyx_k_K1_S_6b_gWA_wfAQ_S_q_k_q_Q_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 591, 177};
    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[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_get_property, __pyx_k_H_q_Qk_a_RS_wc_l_2_SST_z_A_q_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 628, 71};
    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[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_converter_set_property, __pyx_k_s_1_wa_mS___wc_l_2_Oq, 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), 645, 43};
    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_reset, __pyx_k_4AQ_wc_l_2_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 726, 468};
    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[25] = __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_k_Q_wa_c_2_1_aq_A_22DAQ_33EQa_11C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 830, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_min, __pyx_k_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 833, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_min_2, __pyx_k_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 836, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_max, __pyx_k_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 839, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_max_2, __pyx_k_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 842, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_sam, __pyx_k_DA_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 845, 10};
    PyObject* const varnames[] = {0};
    __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_get_audio_converter_property_cod, __pyx_k_4A_Q, 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), 848, 10};
    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_quality_max, __pyx_k_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), 851, 10};
    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_quality_high, __pyx_k_Q_2, 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), 854, 10};
    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_quality_medi, __pyx_k_A_Q_2, 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), 857, 10};
    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_quality_low, __pyx_k_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), 860, 10};
    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_quality_min, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 868, 138};
    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[37] = __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_k_31_avYgUVVbbc_1F_Mdde_t3a_AQ_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 896, 307};
    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[38] = __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_k_UUV_Fa_avYgUVVbbc_1F_Mdde_t3a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 948, 43};
    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[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_dispose, __pyx_k_1_4AQ_wc_l_2_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 956, 196};
    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[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_read, __pyx_k_B_1_A_Bb_vQa_wc_k_Q_9AR_2_9AR_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 993, 125};
    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, __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[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_extended_audio_file_write, __pyx_k_1_A_wa_AQ_y_a_y_A_y_9A_2_XQa_wc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1017, 119};
    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[42] = __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_k_K1_1_q_vQa_wc_k_1Jm1Kq_7_Q_ar_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1046, 71};
    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[43] = __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_k_1_s_1_wa_8_P_wc_l_2_MQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1064, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property, __pyx_k_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1067, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_2, __pyx_k_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1070, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_3, __pyx_k_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1073, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_4, __pyx_k_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1076, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_5, __pyx_k_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1079, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_6, __pyx_k_5Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1082, 10};
    PyObject* const varnames[] = {0};
    __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_get_extended_audio_file_property_7, __pyx_k_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1094, 212};
    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[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_new_output, __pyx_k_T_4q_q_d_1_t1_Q_B_l_a_DA_L_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1127, 65};
    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[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_allocate_buffer, __pyx_k_4A_9_1_wc_l_2_Na_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1144, 62};
    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[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_enqueue_buffer, __pyx_k_4A_A_8_1_wc_l_2_MQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1157, 50};
    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[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_start, __pyx_k_4A_0_wc_l_2_EQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1169, 52};
    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[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_stop, __pyx_k_A_4A_q_q_wc_l_2_DA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1181, 53};
    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[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_queue_dispose, __pyx_k_q_4A_2_7_wc_l_2_Gq_1, 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), 1194, 7};
    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_audio_format_linear_pcm, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1197, 7};
    PyObject* const varnames[] = {0};
    __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_get_linear_pcm_format_flag_is_si, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1200, 7};
    PyObject* const varnames[] = {0};
    __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_get_linear_pcm_format_flag_is_pa, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1203, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_wave_type, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1206, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_read_permission, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1209, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_property_data_for, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1212, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_property_maximum, __pyx_k_Q_4, 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), 1215, 7};
    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_file_property_audio_da, __pyx_k_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), 1218, 7};
    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_audio_file_property_estimate, __pyx_k_Q_4, 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), 1222, 7};
    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_audio_object_property_name, __pyx_k_Q_4, 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), 1225, 7};
    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_object_property_manufa, __pyx_k_Q_4, 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), 1228, 7};
    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_device_property_device, __pyx_k_Q_4, 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), 1231, 7};
    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_device_property_model, __pyx_k_Q_4, 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), 1234, 7};
    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_device_property_transp, __pyx_k_Q_4, 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), 1237, 7};
    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_device_property_device_2, __pyx_k_Q_4, 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), 1240, 7};
    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_device_property_nomina, __pyx_k_Q_4, 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), 1243, 7};
    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_device_property_availa, __pyx_k_Q_4, 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), 1246, 7};
    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_device_property_is_hid, __pyx_k_Q_4, 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), 1249, 7};
    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_prefer, __pyx_k_Q_4, 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), 1252, 7};
    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_stream, __pyx_k_Q_4, 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), 1256, 7};
    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_object_property_scope, __pyx_k_Q_4, 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), 1259, 7};
    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_object_property_scope_2, __pyx_k_Q_4, 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), 1262, 7};
    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_object_property_scope_3, __pyx_k_Q_4, 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), 1265, 7};
    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_object_property_elemen, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1270, 151};
    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[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_find_next, __pyx_k_0_a_S_a_Qha_D_A_1_Q6Fa_ay_d_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1300, 56};
    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[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_instance_new, __pyx_k_aq_wc_l_2_Oq_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1312, 49};
    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[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_instance_dispose, __pyx_k_I_aq_wc_l_2_SST_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1323, 99};
    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_buffer, __pyx_mstate->__pyx_n_u_name};
    __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_audio_component_copy_name, __pyx_k_1_7q_1A_wc_3is_q_A_AZxwa_vWAQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1350, 90};
    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[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_component_get_description, __pyx_k_Qk_wc_l_2_RRS_A_4q_A_Q_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1377, 47};
    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[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_initialize, __pyx_k_1_4AQ_wc_l_2_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1388, 47};
    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[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_uninitialize, __pyx_k_1_6aq_wc_l_2_K1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1399, 98};
    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[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_set_property, __pyx_k_1_z_A_A_a_6a_4Cq_j_wc_l_2_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1421, 185};
    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[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_unit_get_property, __pyx_k_1_q_q_A_A_a_wc_l_2_Na_vQa_t1_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1460, 47};
    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[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_output_unit_start, __pyx_k_1_5Qa_wc_l_2_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1471, 47};
    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[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_output_unit_stop, __pyx_k_1_4AQ_wc_l_2_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1483, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_type_output, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1486, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_component_type_music_d, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1489, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_subtype_default_o, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1492, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_manufacturer_appl, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1495, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_property_stream_f, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1498, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_property_set_rend, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1501, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_scope_input, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1504, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_scope_output, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1507, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_unit_scope_global, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1510, 7};
    PyObject* const varnames[] = {0};
    __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_get_linear_pcm_format_flag_is_no, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1529, 112};
    PyObject* const varnames[] = {0};
    __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_demonstrate_callback_infrastruct, __pyx_k_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1565, 116};
    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_result};
    __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_load_file, __pyx_k_A_MQ_Q_q_83a_AR_B_N_9AT_a_AQ_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1586, 51};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __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_setup_output, __pyx_k_A_5Qat1_7_Q_ar_C1_O1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1594, 62};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __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_start, __pyx_k_A_4t1_aq_5Qat1_7_Q_ar_C1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1604, 58};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __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_stop, __pyx_k_A_4t1_1_4AQd_7_Q_ar_B_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1614, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_loop};
    __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_set_looping, __pyx_k_A_Qat_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1618, 15};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __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_reset_playback, __pyx_k_A_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1622, 21};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __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_is_playing, __pyx_k_A_t3j_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1626, 18};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __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_get_progress, __pyx_k_A_Qat, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q_5, 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), 1640, 7};
    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_file_stream_property_r, __pyx_k_Q_4, 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), 1643, 7};
    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_file_stream_property_f, __pyx_k_Q_4, 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), 1646, 7};
    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_file_stream_property_d, __pyx_k_Q_4, 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), 1649, 7};
    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_file_stream_property_f_2, __pyx_k_Q_4, 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), 1652, 7};
    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_file_stream_property_m, __pyx_k_Q_4, 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), 1655, 7};
    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_file_stream_property_a, __pyx_k_Q_4, 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), 1658, 7};
    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_file_stream_property_a_2, __pyx_k_Q_4, 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), 1661, 7};
    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_file_stream_property_m_2, __pyx_k_Q_4, 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), 1664, 7};
    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_file_stream_property_d_2, __pyx_k_Q_4, 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), 1667, 7};
    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_audio_file_stream_property_c, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1670, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_p, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1673, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_f_3, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1676, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_p_2, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1679, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_b, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1682, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_p_3, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1685, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_p_4, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1688, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_a_3, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1691, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_property_b_2, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1694, 7};
    PyObject* const varnames[] = {0};
    __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_audio_file_stream_property_i, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1698, 7};
    PyObject* const varnames[] = {0};
    __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_audio_file_stream_property_f_4, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1701, 7};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[133] = __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_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1704, 7};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[134] = __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_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1707, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_seek_flag, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1711, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_unsu, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1714, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_unsu_2, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1717, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_unsu_3, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1720, 7};
    PyObject* const varnames[] = {0};
    __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_audio_file_stream_error_bad, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1723, 7};
    PyObject* const varnames[] = {0};
    __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_audio_file_stream_error_not, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1726, 7};
    PyObject* const varnames[] = {0};
    __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_audio_file_stream_error_inva, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1729, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_inva_2, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1732, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_valu, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1735, 7};
    PyObject* const varnames[] = {0};
    __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_file_stream_error_data, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1738, 7};
    PyObject* const varnames[] = {0};
    __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_get_audio_file_stream_error_ille, __pyx_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1741, 7};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[146] = __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_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1744, 7};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[147] = __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_k_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1749, 115};
    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[148] = __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_k_IWAQ_8_1A_t1_j_A_wc_l_2_VVW_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1778, 49};
    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[149] = __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_k_a_B_1_wc_l_2_WWX_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1789, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_system_sound_id};
    __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_audio_services_play_system_sound, __pyx_k_a_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1795, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sound_id, __pyx_mstate->__pyx_n_u_system_sound_id};
    __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_audio_services_play_alert_sound, __pyx_k_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1801, 253};
    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[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_get_property, __pyx_k_1_J_q_q_Q_S_q_c_wc_l_2_RRS_vQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1848, 166};
    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[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_audio_services_set_property, __pyx_k_7q_J_z_Kq_A_1F_A_Cq_iq_9_S_q_c, 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), 1884, 7};
    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_services_no_error, __pyx_k_Q_4, 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), 1887, 7};
    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_services_unsupported_p, __pyx_k_Q_4, 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), 1890, 7};
    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_services_bad_property, __pyx_k_Q_4, 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), 1893, 7};
    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_services_bad_specifier, __pyx_k_Q_4, 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), 1896, 7};
    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_services_system_sound, __pyx_k_Q_4, 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), 1899, 7};
    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_services_system_sound_2, __pyx_k_Q_4, 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), 1902, 7};
    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_services_system_sound_3, __pyx_k_Q_4, 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), 1905, 7};
    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_system_sound_id_user_preferr, __pyx_k_Q_4, 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), 1908, 7};
    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_system_sound_id_flash_screen, __pyx_k_Q_4, 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), 1911, 7};
    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_system_sound_id_vibrate, __pyx_k_Q_4, 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), 1914, 7};
    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_user_preferred_alert, __pyx_k_Q_4, 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), 1917, 7};
    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_services_property_is_u, __pyx_k_Q_4, 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), 1920, 7};
    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_services_property_comp, __pyx_k_Q_4, 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), 1924, 10};
    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_test_error, __pyx_k_A_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1931, 68};
    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[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_midi_event, __pyx_k_I_A_1_1_1_1_S_l_2_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1958, 70};
    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[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_sysex, __pyx_k_5WA_Cq_1_wc_l_2_Fa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1983, 254};
    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[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_start_note, __pyx_k_e_f_A_A_B_q_A_q_s_1_Q_s_rQTTVVW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2044, 63};
    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[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_device_stop_note, __pyx_k_K1_4A_q_1_1_wc_l_2_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2071, 22};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pitch, __pyx_mstate->__pyx_n_u_velocity};
    __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_create_music_device_std_note_par, __pyx_k_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2087, 35};
    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[173] = __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_k_Bb_1A_A_A, 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), 2107, 7};
    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_music_note_event_use_group_i, __pyx_k_Q_6, 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), 2111, 7};
    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_music_note_event_unused, __pyx_k_Q_6, 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), 2115, 7};
    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_music_device_range, __pyx_k_Q_6, 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), 2119, 7};
    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_music_device_midi_event_sele, __pyx_k_Q_6, 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), 2123, 7};
    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_music_device_sysex_select, __pyx_k_Q_6, 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), 2127, 7};
    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_music_device_start_note_sele, __pyx_k_Q_6, 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), 2131, 7};
    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_music_device_stop_note_selec, __pyx_k_Q_6, 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), 2135, 7};
    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_music_device_midi_event_list, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2141, 34};
    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[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_note_on, __pyx_k_U_XRq_HE_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2155, 37};
    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[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_note_off, __pyx_k_U_XRq_HE_6_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2169, 34};
    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[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_control_change, __pyx_k_U_XRq_HKr_vRq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2183, 30};
    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[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_program_change, __pyx_k_U_XRq_HHBfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2196, 48};
    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[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_pitch_bend, __pyx_k_U_XRq_6_Cr_HE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2216, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __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_new_music_player, __pyx_k_q_wc_l_2_DA_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2232, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __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_dispose_music_player, __pyx_k_314DA_wc_l_2_H_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2250, 65};
    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[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_set_sequence, __pyx_k_2_is_QR_7q8H_PQ_wc_l_2_LA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2270, 53};
    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[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_get_sequence, __pyx_k_7q8H_PQQR_wc_l_2_LA_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2289, 51};
    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[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_set_time, __pyx_k_314DHL___wc_l_2_H_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2308, 51};
    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[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_get_time, __pyx_k_314DHAQ_wc_l_2_H_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2327, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __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_music_player_preroll, __pyx_k_314DA_wc_l_2_H_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2345, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __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_music_player_start, __pyx_k_1_2B_wc_l_2_Fa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2363, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_player, __pyx_mstate->__pyx_n_u_status};
    __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_music_player_stop, __pyx_k_0_1A_wc_l_2_EQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2381, 53};
    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[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_player_is_playing, __pyx_k_5Q6Fhaq_wc_l_2_J_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2400, 70};
    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[197] = __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_k_Q_j_Q_NhVbbc_wc_l_2_RRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2422, 54};
    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[198] = __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_k_Q_NhVWWX_wc_l_2_RRS_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2443, 46};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_status};
    __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_new_music_sequence, __pyx_k_1_1_wc_l_2_Fa_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2459, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sequence, __pyx_mstate->__pyx_n_u_status};
    __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_dispose_music_sequence, __pyx_k_5Q6H_wc_l_2_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2477, 53};
    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[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_new_track, __pyx_k_6a7I_STTU_wc_l_2_K1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2496, 51};
    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[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_dispose_track, __pyx_k_MZWffg_wc_l_2_Oq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2515, 52};
    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[203] = __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_k_1_NjXYYZ_wc_l_2_PPQ_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, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2534, 59};
    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[204] = __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_k_9_LJVaannoop_wc_l_2_Na_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2554, 54};
    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[205] = __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_k_1_NjXYYZ_wc_l_2_PPQ_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2573, 53};
    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[206] = __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_k_Q_PPZZeef_wc_l_2_RRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2592, 53};
    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[207] = __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_k_Q_PPZZ_wc_l_2_RRS_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2611, 139};
    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[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_music_sequence_file_load, __pyx_k_QQR_IWAQ_I_1A_t1_j_DA_a_q_q_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2655, 121};
    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[209] = __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_k_k_1_8_e2Q_2Q_k_A_1_1_q_1_wc_l_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2690, 92};
    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[210] = __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_k_Zq_9Ja_9Ja_q_EQ_q_1_S_l_2_SST_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2722, 76};
    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[211] = __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_k_t3a_j_q_1_A_wc_l_2_UUV_1, 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), 2751, 7};
    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_event_type_null, __pyx_k_Q_6, 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), 2755, 7};
    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_event_type_extended_no, __pyx_k_Q_6, 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), 2759, 7};
    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_event_type_extended_te, __pyx_k_Q_6, 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), 2763, 7};
    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_event_type_user, __pyx_k_Q_6, 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), 2767, 7};
    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_event_type_meta, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2771, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_event_type_midi_note_m, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2775, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_event_type_midi_channe, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2779, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_event_type_midi_raw_da, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2783, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_event_type_parameter, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2787, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_event_type_au_preset, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2791, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_type_beats, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2795, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_type_seconds, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2799, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_type_samples, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2803, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_file_any_type, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2807, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_file_midi_typ, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2811, 7};
    PyObject* const varnames[] = {0};
    __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_get_music_sequence_file_imelody, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2815, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_loop, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2819, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_offs, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2823, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_mute, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2827, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_solo, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2831, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_auto, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2835, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_trac, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2839, 7};
    PyObject* const varnames[] = {0};
    __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_get_sequence_track_property_time, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2845, 56};
    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[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_midi_note_message, __pyx_k_BBZZ_82Q_Rq_IRq_Rq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2866, 37};
    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[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_create_midi_channel_message, __pyx_k_7q_1_r_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2888, 106};
    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[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_client_create, __pyx_k_D_q_a_a_t1_k_AYfF_1_7_Q_ar_J_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2917, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_client, __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_midi_client_dispose, __pyx_k_2_3EQ_wc_l_2_Gq_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, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2936, 112};
    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[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_input_port_create, __pyx_k_a_31_t1_k_q_hivV1A_7_Q_ar_MQ_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2967, 108};
    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[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_output_port_create, __pyx_k_a_31_t1_k_hiq_7_Q_ar_Na_vQ_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2998, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_port, __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_midi_port_dispose, __pyx_k_0_1A_wc_l_2_EQ_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3015, 52};
    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[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_port_connect_source, __pyx_k_6a_2_wc_l_2_K1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3034, 50};
    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[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_port_disconnect_source, __pyx_k_9_2_wc_l_2_Na_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3055, 12};
    PyObject* const varnames[] = {0};
    __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_midi_get_number_of_devices, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3063, 73};
    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[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_device, __pyx_k_4A_Bb_1_j_K_VWWX_1Kq_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3082, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device};
    __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_midi_device_get_number_of_entiti, __pyx_k_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3093, 81};
    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[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_get_entity, __pyx_k_A_Oq_Bb_1_j_K_WXXY_9_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3114, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __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_midi_entity_get_number_of_source, __pyx_k_Q_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3125, 81};
    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[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_source, __pyx_k_MQ_Bb_1_j_K_VWWX_1_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3146, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __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_midi_entity_get_number_of_destin, __pyx_k_q0B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3157, 82};
    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[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_entity_get_destination, __pyx_k_Q_PPQ_Bc_Cq_j_11NiWXXY_a_Q_6, 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), 3178, 12};
    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_midi_get_number_of_sources, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3186, 73};
    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[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_source, __pyx_k_4A_Bb_1_j_K_VWWX_Qk_6, 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), 3205, 12};
    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_midi_get_number_of_destinations, __pyx_k__4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3213, 71};
    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[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_get_destination, __pyx_k_7q_Bc_Cq_j_11NiWXXY_8_A_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3234, 107};
    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[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_source_create, __pyx_k_D_q_a_a_t1_k_A_7xy_7_Q_ar_J_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3264, 111};
    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[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_destination_create, __pyx_k_D_q_a_a_t1_k_hivV1A_7_Q_ar_Oq_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3295, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_status};
    __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_midi_endpoint_dispose, __pyx_k_4A5I_wc_l_2_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3314, 256};
    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[259] = __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_k_q_WA_t1_j_q_e_7_Q_ar_UUV_q_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3374, 106};
    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[260] = __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_k_M_C1_a_t1_j_0_e_7_Q_ar_VVW_q_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3406, 160};
    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[261] = __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_k_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[261])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3445, 106};
    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[262] = __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_k_M_C1_a_t1_j_0_e_A_7_Q_ar_VVW_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[262])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3479, 197};
    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[263] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_name, __pyx_k_1_5Qa_wc_l_2_QQR_q_A_1_U_1JF_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[263])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3527, 14};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device};
    __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_midi_device_get_name, __pyx_k_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[264])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3541, 14};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_endpoint};
    __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_midi_endpoint_get_name, __pyx_k_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[265])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3555, 14};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_entity};
    __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_midi_entity_get_name, __pyx_k_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[266])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3569, 197};
    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[267] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_manufacturer, __pyx_k_1_Qa_wc_l_2_QQR_q_A_1_U_1JF_a_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[267])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3617, 197};
    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[268] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_object_get_model, __pyx_k_1_6aq_wc_l_2_QQR_q_A_1_U_1JF_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[268])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3667, 199};
    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[269] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_send_data, __pyx_k_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[269])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3726, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_invalid_client, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[270])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3730, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_invalid_port, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[271])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3734, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_wrong_endpoint_ty, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[272])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3738, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_no_connection, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[273])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3742, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_unknown_endpoint, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[274])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3746, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_unknown_property, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[275])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3750, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_wrong_property_ty, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[276])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3754, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_no_current_setup, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[277])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3758, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_message_send_err, __pyx_k_Q_6, 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), 3762, 7};
    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_get_midi_error_server_start_err, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[279])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3766, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_setup_format_err, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[280])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3770, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_wrong_thread, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[281])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3774, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_object_not_found, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[282])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3778, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_id_not_unique, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[283])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3782, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_not_permitted, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[284])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3786, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_error_unknown_error, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[285])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3790, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_other, __pyx_k_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), 3794, 7};
    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_get_midi_object_type_device, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[287])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3798, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_entity, __pyx_k_Q_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), 3802, 7};
    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_get_midi_object_type_source, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[289])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3806, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_destination, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[290])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3810, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_external_de, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[291])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3814, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_external_en, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[292])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3818, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_external_so, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[293])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3822, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_object_type_external_de_2, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[294])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3826, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_protocol_1_0, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[295])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3830, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_protocol_2_0, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[296])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3836, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_name, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[297])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3840, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_manufacturer, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[298])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3844, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_model, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[299])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3848, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_unique_id, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[300])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3852, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_device_id, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[301])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3856, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_receive_channe, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[302])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3860, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_transmit_chann, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[303])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3864, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_property_offline, __pyx_k_1_2, 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), 3868, 7};
    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_property_private, __pyx_k_1_2, 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), 3872, 7};
    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_property_driver_owner, __pyx_k_1_2, 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), 3876, 7};
    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_property_display_name, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[307])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3883, 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_word};
    __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_midi_message_type_for_up_word, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[308])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3896, 34};
    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[309] = __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_k_7_A_5Yj_zYZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[309])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3912, 28};
    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[310] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_note_off, __pyx_k_AZwj_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[310])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3927, 28};
    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[311] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_note_on, __pyx_k_1JgZq_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[311])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3942, 29};
    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[312] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_control_change, __pyx_k_WJa_wj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[312])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3957, 29};
    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[313] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_pitch_bend, __pyx_k_az_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[313])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3972, 29};
    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[314] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_system_common, __pyx_k_G_Q_gZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[314])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3987, 68};
    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[315] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi1_up_sysex, __pyx_k_7_HT__6_zQXXbbc6_zQXXbbc_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[315])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4006, 49};
    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[316] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_channel_voice_message, __pyx_k_AZwjXYBLIU_ggrrs_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[316])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4023, 53};
    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[317] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_note_on, __pyx_k_q_9T__5_O_Zjjuuv_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[317])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4041, 54};
    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[318] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_note_off, __pyx_k_7_IU___6_PP_kkvvw_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[318])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4059, 42};
    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[319] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_control_change, __pyx_k_6az_RS_Fg_XY_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[319])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4075, 51};
    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[320] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_program_change, __pyx_k_6az_R_FizYccmmn_Cxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[320])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4093, 36};
    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[321] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi2_pitch_bend, __pyx_k_WJiWbbc_Cxs, 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), 4109, 7};
    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_message_type_utility, __pyx_k_Q_6, 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), 4113, 7};
    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_message_type_system, __pyx_k_Q_6, 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), 4117, 7};
    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_message_type_channel_vo, __pyx_k_Q_6, 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), 4121, 7};
    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_message_type_sysex, __pyx_k_Q_6, 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), 4125, 7};
    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_message_type_channel_vo_2, __pyx_k_Q_6, 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), 4129, 7};
    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_message_type_data128, __pyx_k_Q_6, 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), 4135, 7};
    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_cv_status_note_off, __pyx_k_Q_6, 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), 4139, 7};
    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_cv_status_note_on, __pyx_k_Q_6, 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), 4143, 7};
    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_cv_status_poly_pressure, __pyx_k_Q_6, 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), 4147, 7};
    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_cv_status_control_chang, __pyx_k_Q_6, 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), 4151, 7};
    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_cv_status_program_chang, __pyx_k_Q_6, 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), 4155, 7};
    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_cv_status_channel_press, __pyx_k_Q_6, 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), 4159, 7};
    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_cv_status_pitch_bend, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[334])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4166, 122};
    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_name_bytes, __pyx_mstate->__pyx_n_u_status};
    __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_midi_device_new_entity, __pyx_k_D_q_q_a_q_Q_7_Q_ar_MQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[335])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4214, 117};
    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_name_bytes, __pyx_mstate->__pyx_n_u_status};
    __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_midi_device_add_entity, __pyx_k_D_q_q_a_Q_7_Q_ar_MQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[336])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4260, 52};
    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[337] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_remove_entity, __pyx_k_7q_wc_l_2_LA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[337])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4283, 58};
    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[338] = __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_k_q_a_a_wc_l_2_TTU_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[338])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4308, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __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_midi_setup_add_device, __pyx_k_314Fa_wc_l_2_H_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[339])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4327, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __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_midi_setup_remove_device, __pyx_k_6a7I_wc_l_2_K1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[340])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4346, 46};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __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_midi_setup_add_external_device, __pyx_k_1_Na_wc_l_2_PPQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[341])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4365, 47};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __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_midi_setup_remove_external_devic, __pyx_k_a_QQR_wc_l_2_SST_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[342])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4384, 177};
    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[343] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_external_device_create, __pyx_k_D_q_L_q_U_a_2_6a_1_q_A_j_7_Q_ar, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[343])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4436, 181};
    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[344] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_device_create, __pyx_k_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[344])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4487, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_device, __pyx_mstate->__pyx_n_u_status};
    __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_midi_device_dispose, __pyx_k_2_3EQ_wc_l_2_Gq_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[345])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4506, 17};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list};
    __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_midi_device_list_get_number_of_d, __pyx_k_a_EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[346])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4517, 105};
    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[347] = __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_k_GqH___vRr_F_Q_j_E_PQQR_Q_j_a_wc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[347])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4544, 52};
    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[348] = __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_k_8_j_wc_l_2_MQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[348])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4566, 45};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_dev_list, __pyx_mstate->__pyx_n_u_status};
    __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_midi_device_list_dispose, __pyx_k_6a7MQ_wc_l_2_K1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[349])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4585, 62};
    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[350] = __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_k_m1_7q_A_q_q_wc_l_2_LA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[350])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4610, 61};
    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[351] = __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_k_7q_JavQa_wc_l_2_LA_F_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[351])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4633, 19};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_runloop};
    __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_midi_get_driver_io_runloop, __pyx_k_A_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[352])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4645, 23};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_driver, __pyx_mstate->__pyx_n_u_dev_list};
    __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_midi_get_driver_device_list, __pyx_k_C1DVVW_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[353])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4661, 52};
    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[354] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_driver_enable_monitoring, __pyx_k_1_a_wc_l_2_PPQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[354])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4690, 265};
    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[355] = __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_k_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[355])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4730, 842};
    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[356] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_create, __pyx_k_a_A_B_1_d_a_t1Kq_1Cq_U_6_QgQd_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[356])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4837, 46};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_connection, __pyx_mstate->__pyx_n_u_status};
    __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_midi_thru_connection_dispose, __pyx_k_UUV_wc_l_2_Oq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[357])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4856, 485};
    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[358] = __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_k_A_aq_wc_l_2_QQR_1_r_aq_q_vQ_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[358])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4937, 446};
    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[359] = __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_k_1_d_a_t1Kq_1Cq_U_6_QgQd_2__q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[359])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5001, 178};
    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[360] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_midi_thru_connection_find, __pyx_k_37_1_B_2_7_Q_ar_PPQ_1_c_1_E_aq, 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), 5053, 7};
    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_transform_none, __pyx_k_Q_6, 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), 5057, 7};
    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_transform_filter_out, __pyx_k_Q_6, 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), 5061, 7};
    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_transform_map_control, __pyx_k_Q_6, 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), 5065, 7};
    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_transform_add, __pyx_k_Q_6, 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), 5069, 7};
    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_transform_scale, __pyx_k_Q_6, 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), 5073, 7};
    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_transform_min_value, __pyx_k_Q_6, 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), 5077, 7};
    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_transform_max_value, __pyx_k_Q_6, 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), 5081, 7};
    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_transform_map_value, __pyx_k_Q_6, 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), 5085, 7};
    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_control_type_7bit, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[369])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5089, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_control_type_14bit, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[370])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5093, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_control_type_7bit_rpn, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[371])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5097, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_control_type_14bit_rpn, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[372])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5101, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_control_type_7bit_nrpn, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[373])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5105, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_control_type_14bit_nrpn, __pyx_k_Q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[374])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5109, 7};
    PyObject* const varnames[] = {0};
    __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_get_midi_thru_connection_max_end, __pyx_k_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[375])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5147, 22};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __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_dispose, __pyx_k_4t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[376])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5157, 29};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __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_ensure_not_disposed, __pyx_k_a_4q_ar_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[377])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5167, 14};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_object_id};
    __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_set_object_id, __pyx_k_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[378])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[379] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[379])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[380] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[380])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5176, 48};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph, __pyx_mstate->__pyx_n_u_status};
    __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_au_graph_new, __pyx_k_a_1A_wc_l_2_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[381])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5195, 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __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_au_graph_dispose, __pyx_k_q_A_wc_l_2_DA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[382])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5209, 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __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_au_graph_open, __pyx_k_A_wc_l_2_A, 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), 5223, 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __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_au_graph_close, __pyx_k_Ql_wc_l_2_B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[384])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5237, 39};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __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_au_graph_initialize, __pyx_k_2_q_wc_l_2_Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[385])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5251, 39};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __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_au_graph_uninitialize, __pyx_k_4A_wc_l_2_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[386])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5265, 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __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_au_graph_start, __pyx_k_Ql_wc_l_2_B, 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), 5279, 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __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_au_graph_stop, __pyx_k_A_wc_l_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[388])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5293, 54};
    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[389] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_open, __pyx_k_q_a_Qa_wc_l_2_C1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[389])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5312, 55};
    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[390] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_initialized, __pyx_k_a_5Ql_AQ_wc_l_2_J_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[390])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5331, 55};
    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[391] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_is_running, __pyx_k_1_j_wc_l_2_Fa_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[391])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5350, 122};
    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[392] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_add_node, __pyx_k_AQ_Kq_AQ_T_1_k_QnA_a_QfAQ_wc_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[392])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5382, 44};
    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[393] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_remove_node, __pyx_k_2_z_TU_wc_l_2_Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[393])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5397, 51};
    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[394] = __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_k_a_4A_1A_wc_l_2_I_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[394])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5416, 55};
    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[395] = __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_k_7q_2_z_PQQR_wc_l_2_Gq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[395])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5436, 105};
    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[396] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_node_info, __pyx_k_6a_q_Jk_6QRRS_wc_l_2_EQ_A_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[396])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5468, 56};
    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[397] = __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_k_q_A_1_1_wc_l_2_MQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[397])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5495, 49};
    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[398] = __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_k_A_1_wc_l_2_PPQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[398])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5517, 39};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_graph_id, __pyx_mstate->__pyx_n_u_status};
    __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_au_graph_clear_connections, __pyx_k_8_Q_wc_l_2_MQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[399])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5531, 54};
    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[400] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_coremusic_capi_pyx, __pyx_mstate->__pyx_n_u_au_graph_update, __pyx_k_a_a_Qa_wc_l_2_C1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[400])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5550, 51};
    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[401] = __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_k_A_2_z_wc_l_2_Gq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[401])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5569, 51};
    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[402] = __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_k_0_5Ql_AQ_wc_l_2_J_1, 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), 5589, 10};
    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_au_graph_err_node_not_found, __pyx_k_A_2, 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), 5593, 10};
    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_au_graph_err_invalid_connect, __pyx_k_Q_A, 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), 5597, 10};
    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_au_graph_err_output_node_err, __pyx_k_A_3, 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), 5601, 10};
    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_au_graph_err_cannot_do_in_cu, __pyx_k_7q_A, 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), 5605, 10};
    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_au_graph_err_invalid_audio_u, __pyx_k_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[407])) 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)

  /* 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)

  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 */
#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 */
#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 */
#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 */
#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 */
#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 */
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 */
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

/* RaiseDoubleKeywords */
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);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
    PyObject *kwdefs;
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    if (
            co->co_kwonlyargcount == 0 &&
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#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 */
#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 */
#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 PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
        vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
        if (f) {
            return f(func, args, _nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, _nargs, NULL);
        }
        #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL
        return PyObject_Vectorcall(func, args, _nargs, NULL);
        #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
}

/* UnpackUnboundCMethod */
#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;
}

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

/* 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)
{
    Py_ssize_t pos = 0;
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (PyDict_Next(kwds, &pos, &key, NULL)) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            #if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
            #endif
            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();
    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;
}
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);
}

/* 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;
}

/* SetStringIndexingError */
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);
    }
}

/* 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;
}

/* 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, x;
#ifdef HAVE_LONG_LONG
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla, llx;
#endif
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    if ((intval & PyLong_MASK) == intval) {
        long last_digit = (long) __Pyx_PyLong_Digits(op1)[0];
        long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1));
        return PyLong_FromLong(result);
    }
    if (unlikely(!__Pyx_PyLong_CompactAsLong(op1, &a))) {
        const digit* digits = __Pyx_PyLong_Digits(op1);
        const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
        switch (size) {
            case -2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
        }
    }
            x = a & b;
        return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
    long_long:
            llx = lla & llb;
        return PyLong_FromLongLong(llx);
#endif
    return __Pyx_Fallback___Pyx_PyLong_AndObjC(op1, op2, inplace);
    
    
}
#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, x;
#ifdef HAVE_LONG_LONG
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla, llx;
#endif
#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);
    }
    if (unlikely(!__Pyx_PyLong_CompactAsLong(op1, &a))) {
        const digit* digits = __Pyx_PyLong_Digits(op1);
        const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
        switch (size) {
            case -2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            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]));
                    break;
                #ifdef HAVE_LONG_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]));
                    goto long_long;
                #endif
                }
                CYTHON_FALLTHROUGH;
            default: return PyLong_Type.tp_as_number->nb_rshift(op1, op2);
        }
    }
            if ((!negative_shift_works) && unlikely(a < 0)) goto fallback;
            if (unlikely(b >= (long) (sizeof(long)*8))) {
                x = (a < 0) ? -1 : 0;
            } else
            x = a >> b;
        return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
    long_long:
            if ((!negative_shift_works) && unlikely(a < 0)) goto fallback;
            if (unlikely(llb >= (long long) (sizeof(long long)*8))) {
                llx = (lla < 0) ? -1 : 0;
            } else
            llx = lla >> llb;
        return PyLong_FromLongLong(llx);
#endif
  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

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    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
        #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)
            && 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

/* 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

/* GetTopmostException */
#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

/* PyObjectCall2Args */
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;
}

/* 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

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

/* 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

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

/* 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 {
        Py_ssize_t pos = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        PyDict_Next(kwds, &pos, &key, NULL);
        Py_INCREF(key);
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* 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");
}

/* 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();
}

/* CIntToDigits */
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 */
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 */
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) {
    if (likely(ulength <= 250)) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) (ulength - 1));
            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 -= ulength;
        memset(cpos, padding_char, (size_t) (ulength - 1));
        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, ulength - 1);
        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_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 == 'c') {
        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);
    }
    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_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 == 'c') {
        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);
    }
    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);
}

/* 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
}

/* PyDictVersioning */
#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);
}

/* 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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !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)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_PyList_GetItemRef(o, n);
        }
    }
    else 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)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (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 (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
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* PyObjectCallOneArg */
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);
}

/* PyObjectGetMethod */
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;
}

/* PyObjectCallMethod1 */
#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_GetMethod;
    (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;
}

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

/* LimitedApiGetTypeDict */
#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 */
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);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    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;
        }
    }
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallNoArg */
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 */
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_GetMethod;
    (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 */
#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 */
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 */
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;
}

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* dict_setdefault */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value,
                                                       int is_safe_type) {
    PyObject* value;
    CYTHON_MAYBE_UNUSED_VAR(is_safe_type);
#if CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value);
#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;
}

/* FetchCommonType */
#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;
    }
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromMetaclass(metaclass, 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, 1);
    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 */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
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},
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
#if PY_VERSION_HEX >= 0x030A0000
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
#endif
    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;
}

/* 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

/* PyMethodNew */
#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 */
#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_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, pos;
    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 = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(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
        Py_INCREF(key);
        Py_INCREF(value);
        #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:
    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 */
#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;
}
static PyObject *
__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op)
{
    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;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_dict_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
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},
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {"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
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL || 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
    op->func_dict = NULL;
    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
    Py_CLEAR(m->func_dict);
    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
    Py_VISIT(m->func_dict);
    __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 || CYTHON_BACKPORT_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 || CYTHON_BACKPORT_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;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    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;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    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;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    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);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    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_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, 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 >= 0x030A0000
    Py_TPFLAGS_IMMUTABLETYPE |
#endif
    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 */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict);
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback))
        Py_XINCREF(use_cline);
        __Pyx_END_CRITICAL_SECTION();
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_INCREF(use_cline);
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
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) {
        (void) __pyx_cfilenm;
        (void) __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;
        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

/* 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;\
    }

/* 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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;
}

/* 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

/* 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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SInt32) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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
    }
}

/* 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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(UInt32) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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
    }
}

/* 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(UInt32) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(UInt32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(UInt32) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(UInt32, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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_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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AudioFileStreamSeekFlags) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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
    }
}

/* 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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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_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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Boolean) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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_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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AudioFileStreamPropertyFlags) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(AudioFileStreamParseFlags) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MIDIMessageType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MIDICVStatus) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(UInt8) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MIDITransformType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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
    }
}

/* 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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SInt16) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(UInt8) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(UInt8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(UInt8) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(UInt8, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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;
}

/* 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(SInt16) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(SInt16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(SInt16) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(SInt16, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(UInt16) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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_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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CFIndex) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(CFIndex) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(CFIndex, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } 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))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(CFIndex) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(CFIndex, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        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_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 defined(HAVE_LONG_LONG) && !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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MIDITransformControlType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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
    }
}

/* 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__3);
    }
    goto done;
}
#endif

/* 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

/* GetRuntimeVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    static unsigned long __Pyx_cached_runtime_version = 0;
    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;
    }
    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 PY_VERSION_HEX >= 0x030800B2 && !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,
        const char *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_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) {
        line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length);
        if (unlikely(!line_table_bytes)) goto done;
        Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3;
        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_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    Py_XDECREF(line_table_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) {
    while (t->s) {
        PyObject *str;
        if (t->is_unicode) {
            if (t->intern) {
                str = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL);
            } else {
                str = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            str = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        if (!str)
            return -1;
        *target = str;
        if (PyObject_Hash(str) == -1)
            return -1;
        ++t;
        ++target;
    }
    return 0;
}

#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 b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}
#if CYTHON_USE_PYLONG_INTERNALS
static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) {
    if (unlikely(!__Pyx_PyLong_IsCompact(x)))
        return 0;
    Py_ssize_t value = __Pyx_PyLong_CompactValue(x);
    if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value))
        return 0;
    *return_value = (long) value;
    return 1;
}
#endif


/* 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 */
