/* Generated by Pyrex 0.9.6.2 on Sun Jan 20 00:25:32 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #endif #ifndef WIN32 #define __stdcall #define __cdecl #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #include #include "SDL/SDL.h" #include "SDL/SDL_mixer.h" typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; static char *__pyx_filename; static char **__pyx_f; static int __Pyx_PrintItem(PyObject *); /*proto*/ static int __Pyx_PrintNewline(void); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_WriteUnraisable(char *name); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static void __Pyx_AddTraceback(char *funcname); /*proto*/ /* Declarations from sdl_mixer */ struct __pyx_obj_9sdl_mixer_Sample { PyObject_HEAD struct __pyx_vtabstruct_9sdl_mixer_Sample *__pyx_vtab; Mix_Chunk *_chunk; }; struct __pyx_obj_9sdl_mixer_Channel { PyObject_HEAD }; struct __pyx_obj_9sdl_mixer_Music { PyObject_HEAD struct __pyx_vtabstruct_9sdl_mixer_Music *__pyx_vtab; Mix_Music *_music; PyObject *finished_callback; }; struct __pyx_vtabstruct_9sdl_mixer_Sample { PyObject *(*__load)(struct __pyx_obj_9sdl_mixer_Sample *,char *); void (*__del__)(struct __pyx_obj_9sdl_mixer_Sample *); }; static struct __pyx_vtabstruct_9sdl_mixer_Sample *__pyx_vtabptr_9sdl_mixer_Sample; struct __pyx_vtabstruct_9sdl_mixer_Music { PyObject *(*__load)(struct __pyx_obj_9sdl_mixer_Music *,char *); void (*__del__)(struct __pyx_obj_9sdl_mixer_Music *); }; static struct __pyx_vtabstruct_9sdl_mixer_Music *__pyx_vtabptr_9sdl_mixer_Music; static PyTypeObject *__pyx_ptype_9sdl_mixer_Sample = 0; static PyTypeObject *__pyx_ptype_9sdl_mixer_Channel = 0; static PyTypeObject *__pyx_ptype_9sdl_mixer_Music = 0; static int __pyx_k1; static unsigned int __pyx_k2; static int __pyx_k3; static int __pyx_k4; static int __pyx_k5; static int __pyx_k6; static int __pyx_k7; static int __pyx_k8; static int __pyx_k9; static PyObject *__pyx_k10; static PyObject *__pyx_k11; static int __pyx_k12; static int __pyx_k13; static int __pyx_k14; static int __pyx_k15; static int __pyx_k16; static int __pyx_k17; static PyObject *__pyx_k18; static PyObject *__pyx_k19; static PyObject *__pyx_k20; static PyObject *__pyx_k21; static int __pyx_k22; static int __pyx_k23; static int __pyx_k24; static void __pyx_f_9sdl_mixer_end_music_callback(void); /*proto*/ /* Implementation of sdl_mixer */ static PyObject *__pyx_n_False; static PyObject *__pyx_n_True; static PyObject *__pyx_k25p; static PyObject *__pyx_k26p; static PyObject *__pyx_k27p; static char __pyx_k25[] = "%s"; static char __pyx_k26[] = "Cannot init audio!"; static char __pyx_k27[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_init[] = " initialises the sdl mixer. the default parameters should be fine i think "; static PyObject *__pyx_f_9sdl_mixer_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_frequency; unsigned int __pyx_v_format; int __pyx_v_channels; int __pyx_v_chunksize; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"frequency","format","channels","chunksize",0}; __pyx_v_frequency = __pyx_k1; __pyx_v_format = __pyx_k2; __pyx_v_channels = __pyx_k3; __pyx_v_chunksize = __pyx_k4; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|iIii", __pyx_argnames, &__pyx_v_frequency, &__pyx_v_format, &__pyx_v_channels, &__pyx_v_chunksize)) return 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":127 */ __pyx_1 = (SDL_InitSubSystem(SDL_INIT_AUDIO) == (-1)); if (__pyx_1) { /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":128 */ __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k25p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;} /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":129 */ __Pyx_Raise(__pyx_k26p, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":131 */ __pyx_1 = (Mix_OpenAudio(__pyx_v_frequency,__pyx_v_format,__pyx_v_channels,__pyx_v_chunksize) == (-1)); if (__pyx_1) { /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":132 */ __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k27p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":133 */ __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":135 */ __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;} __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.init"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_shutdown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_shutdown[] = " closes the audio "; static PyObject *__pyx_f_9sdl_mixer_shutdown(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Mix_CloseAudio(); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_k28p; static char __pyx_k28[] = "frequency: %d format: %d channels: %d"; static PyObject *__pyx_f_9sdl_mixer_print_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_print_info[] = " prints debugging info on the audio system "; static PyObject *__pyx_f_9sdl_mixer_print_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_freq; unsigned int __pyx_v_format; int __pyx_v_channels; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":148 */ Mix_QuerySpec((&__pyx_v_freq),(&__pyx_v_format),(&__pyx_v_channels)); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":151 */ __pyx_1 = PyInt_FromLong(__pyx_v_freq); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_format); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_3 = PyInt_FromLong(__pyx_v_channels); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); __pyx_1 = 0; __pyx_2 = 0; __pyx_3 = 0; __pyx_1 = PyNumber_Remainder(__pyx_k28p, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("sdl_mixer.print_info"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_allocate_channels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_allocate_channels[] = " allocate \"numchans\" channels for mixing "; static PyObject *__pyx_f_9sdl_mixer_allocate_channels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_numchans; PyObject *__pyx_r; static char *__pyx_argnames[] = {"numchans",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_numchans)) return 0; Mix_AllocateChannels(__pyx_v_numchans); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_volume(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_volume[] = " set \"channel\"\'s volume to \"volume\". passing -1 as channel will set the volume of all \n channels "; static PyObject *__pyx_f_9sdl_mixer_channel_volume(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; int __pyx_v_volume; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel","volume",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii", __pyx_argnames, &__pyx_v_channel, &__pyx_v_volume)) return 0; Mix_Volume(__pyx_v_channel,__pyx_v_volume); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_panning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_panning[] = " set \"channel\"\'s panning to \"left\" and \"right\". passing -1 as channel will set the panning of all \n channels "; static PyObject *__pyx_f_9sdl_mixer_channel_panning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; int __pyx_v_left; int __pyx_v_right; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel","left","right",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iii", __pyx_argnames, &__pyx_v_channel, &__pyx_v_left, &__pyx_v_right)) return 0; Mix_SetPanning(__pyx_v_channel,__pyx_v_left,__pyx_v_right); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_set_position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_set_position[] = " set \"channel\"\'s panning to \"left\" and \"right\". passing -1 as channel will set the panning of all \n channels "; static PyObject *__pyx_f_9sdl_mixer_channel_set_position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; int __pyx_v_angle; int __pyx_v_distance; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"channel","angle","distance",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "iii", __pyx_argnames, &__pyx_v_channel, &__pyx_v_angle, &__pyx_v_distance)) return 0; __pyx_1 = PyInt_FromLong(Mix_SetPosition(__pyx_v_channel,__pyx_v_angle,__pyx_v_distance)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.channel_set_position"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_pause_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_pause_channel[] = " pause \"channel\" or all playing channels if -1 "; static PyObject *__pyx_f_9sdl_mixer_pause_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel",0}; __pyx_v_channel = __pyx_k5; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_channel)) return 0; Mix_Pause(__pyx_v_channel); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_resume_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_resume_channel[] = " resume \"channle\" or all playing channels if -1 "; static PyObject *__pyx_f_9sdl_mixer_resume_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel",0}; __pyx_v_channel = __pyx_k6; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_channel)) return 0; Mix_Resume(__pyx_v_channel); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_halt_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_halt_channel[] = " stop \"channel\" or all channels if -1 "; static PyObject *__pyx_f_9sdl_mixer_halt_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel",0}; __pyx_v_channel = __pyx_k7; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_channel)) return 0; Mix_HaltChannel(__pyx_v_channel); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_expire_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_expire_channel[] = " stop \"channel\" or all channels if -1 in so many \"ms\" "; static PyObject *__pyx_f_9sdl_mixer_expire_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; int __pyx_v_ms; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel","ms",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii", __pyx_argnames, &__pyx_v_channel, &__pyx_v_ms)) return 0; Mix_ExpireChannel(__pyx_v_channel,__pyx_v_ms); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_fade_out_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_fade_out_channel[] = " fade out \"channel\" or all chanels if -1 in so many \"ms\" "; static PyObject *__pyx_f_9sdl_mixer_fade_out_channel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; int __pyx_v_ms; PyObject *__pyx_r; static char *__pyx_argnames[] = {"channel","ms",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii", __pyx_argnames, &__pyx_v_channel, &__pyx_v_ms)) return 0; Mix_FadeOutChannel(__pyx_v_channel,__pyx_v_ms); __pyx_r = Py_None; Py_INCREF(Py_None); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_is_playing(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_is_playing[] = " tests wether \"channel\" is currently playing. passing -1 will return how many \n channels are currently playing "; static PyObject *__pyx_f_9sdl_mixer_channel_is_playing(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"channel",0}; __pyx_v_channel = __pyx_k8; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_channel)) return 0; __pyx_1 = PyInt_FromLong(Mix_Playing(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.channel_is_playing"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_is_paused(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_is_paused[] = " tests wether \"channel\" is currently paused. passing -1 will return how many \n channels are currently paused "; static PyObject *__pyx_f_9sdl_mixer_channel_is_paused(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"channel",0}; __pyx_v_channel = __pyx_k9; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_channel)) return 0; __pyx_1 = PyInt_FromLong(Mix_Paused(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.channel_is_paused"); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_channel_is_fading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_channel_is_fading[] = " tests wether \"channel\" is currently fading. passing -1 is not valid "; static PyObject *__pyx_f_9sdl_mixer_channel_is_fading(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_channel; PyObject *__pyx_v_fade; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {"channel",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_channel)) return 0; __pyx_v_fade = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":219 */ __pyx_1 = PyInt_FromLong(Mix_FadingChannel(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_v_fade); __pyx_v_fade = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":221 */ __pyx_1 = PyInt_FromLong(MIX_NO_FADING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MIX_FADING_OUT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MIX_FADING_IN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.channel_is_fading"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_fade); return __pyx_r; } static PyObject *__pyx_k29p; static char __pyx_k29[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_6Sample___load(struct __pyx_obj_9sdl_mixer_Sample *__pyx_v_self,char *__pyx_v_file) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":244 */ __pyx_v_self->_chunk = Mix_LoadWAV(__pyx_v_file); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":245 */ __pyx_1 = (!(__pyx_v_self->_chunk != 0)); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k29p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Sample.__load"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_9sdl_mixer_6Sample___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_9sdl_mixer_6Sample___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; int __pyx_r; char *__pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"file",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_file)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_file); __pyx_1 = PyString_AsString(__pyx_v_file); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} __pyx_2 = ((struct __pyx_vtabstruct_9sdl_mixer_Sample *)((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->__pyx_vtab)->__load(((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self),__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("sdl_mixer.Sample.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_file); return __pyx_r; } static void __pyx_f_9sdl_mixer_6Sample___del__(struct __pyx_obj_9sdl_mixer_Sample *__pyx_v_self) { Py_INCREF(__pyx_v_self); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":253 */ Mix_FreeChunk(__pyx_v_self->_chunk); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":254 */ __pyx_v_self->_chunk = NULL; Py_DECREF(__pyx_v_self); } static PyObject *__pyx_k30p; static char __pyx_k30[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_6Sample_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_9sdl_mixer_6Sample_play[] = " play the sound on the specified channel \"loops\" amount of times \n if loops is -1 the sound will play forever \n if loops is 1 the sound will be played twice\n "; static PyObject *__pyx_f_9sdl_mixer_6Sample_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_channel = 0; PyObject *__pyx_v_loops = 0; PyObject *__pyx_r; int __pyx_1; int __pyx_2; int __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"channel","loops",0}; __pyx_v_channel = __pyx_k10; __pyx_v_loops = __pyx_k11; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_channel, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_channel); Py_INCREF(__pyx_v_loops); __pyx_1 = PyInt_AsLong(__pyx_v_channel); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} __pyx_2 = PyInt_AsLong(__pyx_v_loops); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;} __pyx_3 = (Mix_PlayChannel(__pyx_1,((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,__pyx_2) == (-1)); if (__pyx_3) { __pyx_4 = PyString_FromString(Mix_GetError()); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} __pyx_5 = PyNumber_Remainder(__pyx_k30p, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("sdl_mixer.Sample.play"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_channel); Py_DECREF(__pyx_v_loops); return __pyx_r; } static PyObject *__pyx_k31p; static char __pyx_k31[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_6Sample_play_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_6Sample_play_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_ms; int __pyx_v_channel; int __pyx_v_loops; PyObject *__pyx_v_c; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms","channel","loops",0}; __pyx_v_channel = __pyx_k12; __pyx_v_loops = __pyx_k13; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i|ii", __pyx_argnames, &__pyx_v_ms, &__pyx_v_channel, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_c = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":266 */ __pyx_1 = PyInt_FromLong(Mix_PlayChannelTimed(__pyx_v_channel,((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,__pyx_v_loops,__pyx_v_ms)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L1;} Py_DECREF(__pyx_v_c); __pyx_v_c = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":268 */ __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_c, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyString_FromString(Mix_GetError()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k31p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":271 */ Py_INCREF(__pyx_v_c); __pyx_r = __pyx_v_c; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Sample.play_timed"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_c); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k32p; static char __pyx_k32[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_6Sample_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_6Sample_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_ms; int __pyx_v_channel; int __pyx_v_loops; PyObject *__pyx_v_c; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms","channel","loops",0}; __pyx_v_channel = __pyx_k14; __pyx_v_loops = __pyx_k15; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i|ii", __pyx_argnames, &__pyx_v_ms, &__pyx_v_channel, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_c = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":274 */ __pyx_1 = PyInt_FromLong(Mix_FadeInChannel(__pyx_v_channel,((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,__pyx_v_loops,__pyx_v_ms)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L1;} Py_DECREF(__pyx_v_c); __pyx_v_c = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":276 */ __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_c, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyString_FromString(Mix_GetError()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k32p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":279 */ Py_INCREF(__pyx_v_c); __pyx_r = __pyx_v_c; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Sample.play_fade_in"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_c); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k33p; static char __pyx_k33[] = "Audio Error: %s"; static PyObject *__pyx_f_9sdl_mixer_6Sample_play_fade_in_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_6Sample_play_fade_in_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_fade; int __pyx_v_time; int __pyx_v_channel; int __pyx_v_loops; PyObject *__pyx_v_c; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"fade","time","channel","loops",0}; __pyx_v_channel = __pyx_k16; __pyx_v_loops = __pyx_k17; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ii|ii", __pyx_argnames, &__pyx_v_fade, &__pyx_v_time, &__pyx_v_channel, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_c = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":282 */ __pyx_1 = PyInt_FromLong(Mix_FadeInChannelTimed(__pyx_v_channel,((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,__pyx_v_loops,__pyx_v_fade,__pyx_v_time)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} Py_DECREF(__pyx_v_c); __pyx_v_c = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":284 */ __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_c, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyString_FromString(Mix_GetError()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k33p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":287 */ Py_INCREF(__pyx_v_c); __pyx_r = __pyx_v_c; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Sample.play_fade_in_timed"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_c); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_6Sample_6volume___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_6Sample_6volume___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); __pyx_1 = PyInt_FromLong(Mix_VolumeChunk(((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,(-1))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Sample.volume.__get__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_9sdl_mixer_6Sample_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_9sdl_mixer_6Sample_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; int __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); __pyx_1 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} Mix_VolumeChunk(((struct __pyx_obj_9sdl_mixer_Sample *)__pyx_v_self)->_chunk,__pyx_1); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("sdl_mixer.Sample.volume.__set__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_value); return __pyx_r; } static PyObject *__pyx_n_self; static PyObject *__pyx_n_channel; static int __pyx_f_9sdl_mixer_7Channel___init__(PyObject *__pyx_v_channel, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_9sdl_mixer_7Channel___init__(PyObject *__pyx_v_channel, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_channel); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_self); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_1, __pyx_n_channel, __pyx_v_channel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Channel.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_channel); return __pyx_r; } static PyObject *__pyx_n_audio_channel_volume; static PyObject *__pyx_f_9sdl_mixer_7Channel_6volume___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_6volume___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_volume); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} __pyx_3 = PyInt_FromLong((-1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); __pyx_2 = 0; __pyx_3 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); __Pyx_AddTraceback("sdl_mixer.Channel.volume.__get__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_9sdl_mixer_7Channel_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ static int __pyx_f_9sdl_mixer_7Channel_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_val); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_volume); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); Py_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_val); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.volume.__set__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_val); return __pyx_r; } static PyObject *__pyx_n_audio_fade_out_channel; static PyObject *__pyx_f_9sdl_mixer_7Channel_fade_out(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_fade_out(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ms = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_ms)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ms); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_fade_out_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); Py_INCREF(__pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_ms); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.fade_out"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ms); return __pyx_r; } static PyObject *__pyx_n_audio_export_channel; static PyObject *__pyx_f_9sdl_mixer_7Channel_expire_channel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_expire_channel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ms = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_ms)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_ms); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_export_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); Py_INCREF(__pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_ms); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.expire_channel"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_ms); return __pyx_r; } static PyObject *__pyx_n_audio_pause_channel; static PyObject *__pyx_f_9sdl_mixer_7Channel_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_pause_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self); __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.pause"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_audio_halt_channel; static PyObject *__pyx_f_9sdl_mixer_7Channel_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_halt_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.stop"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_audio_resume_channel; static PyObject *__pyx_f_9sdl_mixer_7Channel_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_resume_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.resume"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_audio_channel_is_paused; static PyObject *__pyx_f_9sdl_mixer_7Channel_is_paused(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_is_paused(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_paused); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.is_paused"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_audio_channel_is_playing; static PyObject *__pyx_f_9sdl_mixer_7Channel_is_playing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_is_playing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_playing); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.is_playing"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_audio_channel_is_fading; static PyObject *__pyx_f_9sdl_mixer_7Channel_is_fading(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_is_fading(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_fading); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.is_fading"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_play; static PyObject *__pyx_f_9sdl_mixer_7Channel_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_audiofile = 0; PyObject *__pyx_v_loops = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"audiofile","loops",0}; __pyx_v_loops = __pyx_k18; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_audiofile, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_audiofile); Py_INCREF(__pyx_v_loops); __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); Py_INCREF(__pyx_v_loops); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_loops); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.play"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_audiofile); Py_DECREF(__pyx_v_loops); return __pyx_r; } static PyObject *__pyx_n_play_timed; static PyObject *__pyx_f_9sdl_mixer_7Channel_play_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_play_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_audiofile = 0; PyObject *__pyx_v_ms = 0; PyObject *__pyx_v_loops = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"audiofile","ms","loops",0}; __pyx_v_loops = __pyx_k19; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_audiofile, &__pyx_v_ms, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_audiofile); Py_INCREF(__pyx_v_ms); Py_INCREF(__pyx_v_loops); __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_timed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} Py_INCREF(__pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); Py_INCREF(__pyx_v_loops); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_loops); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.play_timed"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_audiofile); Py_DECREF(__pyx_v_ms); Py_DECREF(__pyx_v_loops); return __pyx_r; } static PyObject *__pyx_n_play_fade_in; static PyObject *__pyx_f_9sdl_mixer_7Channel_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_audiofile = 0; PyObject *__pyx_v_ms = 0; PyObject *__pyx_v_loops = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"audiofile","ms","loops",0}; __pyx_v_loops = __pyx_k20; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_audiofile, &__pyx_v_ms, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_audiofile); Py_INCREF(__pyx_v_ms); Py_INCREF(__pyx_v_loops); __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_fade_in); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} Py_INCREF(__pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_ms); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); Py_INCREF(__pyx_v_loops); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_loops); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.play_fade_in"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_audiofile); Py_DECREF(__pyx_v_ms); Py_DECREF(__pyx_v_loops); return __pyx_r; } static PyObject *__pyx_n_play_fade_in_timed; static PyObject *__pyx_f_9sdl_mixer_7Channel_play_fade_in_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_7Channel_play_fade_in_timed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_audiofile = 0; PyObject *__pyx_v_fade = 0; PyObject *__pyx_v_time = 0; PyObject *__pyx_v_loops = 0; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"audiofile","fade","time","loops",0}; __pyx_v_loops = __pyx_k21; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_audiofile, &__pyx_v_fade, &__pyx_v_time, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_audiofile); Py_INCREF(__pyx_v_fade); Py_INCREF(__pyx_v_time); Py_INCREF(__pyx_v_loops); __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_fade_in_timed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;} __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;} __pyx_3 = PyTuple_New(4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;} Py_INCREF(__pyx_v_fade); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_fade); Py_INCREF(__pyx_v_time); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_time); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_2); Py_INCREF(__pyx_v_loops); PyTuple_SET_ITEM(__pyx_3, 3, __pyx_v_loops); __pyx_2 = 0; __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Channel.play_fade_in_timed"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_audiofile); Py_DECREF(__pyx_v_fade); Py_DECREF(__pyx_v_time); Py_DECREF(__pyx_v_loops); return __pyx_r; } static PyObject *__pyx_k34p; static char __pyx_k34[] = "%s"; static PyObject *__pyx_f_9sdl_mixer_5Music___load(struct __pyx_obj_9sdl_mixer_Music *__pyx_v_self,char *__pyx_v_file) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":359 */ __pyx_v_self->_music = Mix_LoadMUS(__pyx_v_file); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":360 */ __pyx_1 = (!(__pyx_v_self->_music != 0)); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k34p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.__load"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static void __pyx_f_9sdl_mixer_5Music___del__(struct __pyx_obj_9sdl_mixer_Music *__pyx_v_self) { Py_INCREF(__pyx_v_self); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":364 */ Mix_FreeMusic(__pyx_v_self->_music); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":365 */ __pyx_v_self->_music = NULL; Py_DECREF(__pyx_v_self); } static int __pyx_f_9sdl_mixer_5Music___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_9sdl_mixer_5Music___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_file = 0; int __pyx_r; char *__pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"file",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_file)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_file); __pyx_1 = PyString_AsString(__pyx_v_file); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;} __pyx_2 = ((struct __pyx_vtabstruct_9sdl_mixer_Music *)((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->__pyx_vtab)->__load(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self),__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); __Pyx_AddTraceback("sdl_mixer.Music.__init__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_file); return __pyx_r; } static PyObject *__pyx_k35p; static char __pyx_k35[] = "%s"; static PyObject *__pyx_f_9sdl_mixer_5Music_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_play(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_loops; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"loops",0}; __pyx_v_loops = __pyx_k22; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|i", __pyx_argnames, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = (Mix_PlayMusic(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music,__pyx_v_loops) == (-1)); if (__pyx_1) { /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":373 */ __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k35p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;} /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":374 */ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.play"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k36p; static char __pyx_k36[] = "%s"; static PyObject *__pyx_f_9sdl_mixer_5Music_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_play_fade_in(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_ms; int __pyx_v_loops; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms","loops",0}; __pyx_v_loops = __pyx_k23; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i|i", __pyx_argnames, &__pyx_v_ms, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = Mix_FadeInMusic(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music,__pyx_v_loops,__pyx_v_ms); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k36p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.play_fade_in"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k37p; static char __pyx_k37[] = "%s"; static PyObject *__pyx_f_9sdl_mixer_5Music_play_fade_in_at_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_play_fade_in_at_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_ms; double __pyx_v_position; int __pyx_v_loops; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms","position","loops",0}; __pyx_v_loops = __pyx_k24; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "id|i", __pyx_argnames, &__pyx_v_ms, &__pyx_v_position, &__pyx_v_loops)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = Mix_FadeInMusicPos(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music,__pyx_v_loops,__pyx_v_ms,__pyx_v_position); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k37p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.play_fade_in_at_pos"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_6volume___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_6volume___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); __pyx_1 = PyInt_FromLong(Mix_VolumeMusic((-1))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Music.volume.__get__"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static int __pyx_f_9sdl_mixer_5Music_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_f_9sdl_mixer_5Music_6volume___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { int __pyx_v_value; int __pyx_r; Py_INCREF(__pyx_v_self); __pyx_v_value = PyInt_AsLong(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;} Mix_VolumeMusic(__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("sdl_mixer.Music.volume.__set__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_rewind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_rewind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); Mix_RewindMusic(); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k38p; static char __pyx_k38[] = "set_position failed: %s"; static PyObject *__pyx_f_9sdl_mixer_5Music_set_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_set_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_position; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"position",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "d", __pyx_argnames, &__pyx_v_position)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = (Mix_SetMusicPosition(__pyx_v_position) == (-1)); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k38p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.set_position"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); Mix_HaltMusic(); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k39p; static char __pyx_k39[] = "%s"; static PyObject *__pyx_f_9sdl_mixer_5Music_stop_fade_out(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_stop_fade_out(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_ms; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"ms",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_ms)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = (Mix_FadeOutMusic(__pyx_v_ms) == 0); if (__pyx_1) { __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;} __pyx_3 = PyNumber_Remainder(__pyx_k39p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("sdl_mixer.Music.stop_fade_out"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_resume(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); Mix_ResumeMusic(); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); Mix_PauseMusic(); __pyx_r = Py_None; Py_INCREF(Py_None); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_n_MOD; static PyObject *__pyx_n_MIDI; static PyObject *__pyx_n_OGG; static PyObject *__pyx_n_MP3; static PyObject *__pyx_n_Unknown; static PyObject *__pyx_k40p; static PyObject *__pyx_k41p; static char __pyx_k40[] = "Command based playing"; static char __pyx_k41[] = "WAVE/RIFF"; static PyObject *__pyx_f_9sdl_mixer_5Music_get_type(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_get_type(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_type; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_type = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":414 */ __pyx_1 = PyInt_FromLong(Mix_GetMusicType(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L1;} Py_DECREF(__pyx_v_type); __pyx_v_type = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":416 */ __pyx_1 = PyInt_FromLong(MUS_NONE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_CMD); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_k40p); __pyx_r = __pyx_k40p; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_WAV); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_k41p); __pyx_r = __pyx_k41p; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_MOD); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_n_MOD); __pyx_r = __pyx_n_MOD; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_MID); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_n_MIDI); __pyx_r = __pyx_n_MIDI; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_OGG); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_n_OGG); __pyx_r = __pyx_n_OGG; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MUS_MP3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { Py_INCREF(__pyx_n_MP3); __pyx_r = __pyx_n_MP3; goto __pyx_L0; goto __pyx_L2; } /*else*/ { Py_INCREF(__pyx_n_Unknown); __pyx_r = __pyx_n_Unknown; goto __pyx_L0; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Music.get_type"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_type); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_is_playing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_is_playing(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = PyInt_FromLong((Mix_PlayingMusic() == 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Music.is_playing"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_is_paused(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_is_paused(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_1 = PyInt_FromLong((Mix_PausedMusic() == 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Music.is_paused"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_f_9sdl_mixer_5Music_is_fading(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_9sdl_mixer_5Music_is_fading(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fading; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_fading = Py_None; Py_INCREF(Py_None); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":440 */ __pyx_1 = PyInt_FromLong(Mix_FadingMusic()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;} Py_DECREF(__pyx_v_fading); __pyx_v_fading = __pyx_1; __pyx_1 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":442 */ __pyx_1 = PyInt_FromLong(MIX_NO_FADING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fading, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MIX_FADING_OUT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fading, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_1 = PyInt_FromLong(MIX_FADING_IN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; goto __pyx_L1;} if (PyObject_Cmp(__pyx_v_fading, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; goto __pyx_L1;} __pyx_2 = __pyx_2 == 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); __Pyx_AddTraceback("sdl_mixer.Music.is_fading"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_fading); Py_DECREF(__pyx_v_self); return __pyx_r; } static PyObject *__pyx_k47p; static char __pyx_k47[] = "end music"; static void __pyx_f_9sdl_mixer_end_music_callback(void) { if (__Pyx_PrintItem(__pyx_k47p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;} if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;} goto __pyx_L0; __pyx_L1:; __Pyx_WriteUnraisable("sdl_mixer.end_music_callback"); __pyx_L0:; } static __Pyx_InternTabEntry __pyx_intern_tab[] = { {&__pyx_n_False, "False"}, {&__pyx_n_MIDI, "MIDI"}, {&__pyx_n_MOD, "MOD"}, {&__pyx_n_MP3, "MP3"}, {&__pyx_n_OGG, "OGG"}, {&__pyx_n_True, "True"}, {&__pyx_n_Unknown, "Unknown"}, {&__pyx_n_audio_channel_is_fading, "audio_channel_is_fading"}, {&__pyx_n_audio_channel_is_paused, "audio_channel_is_paused"}, {&__pyx_n_audio_channel_is_playing, "audio_channel_is_playing"}, {&__pyx_n_audio_channel_volume, "audio_channel_volume"}, {&__pyx_n_audio_export_channel, "audio_export_channel"}, {&__pyx_n_audio_fade_out_channel, "audio_fade_out_channel"}, {&__pyx_n_audio_halt_channel, "audio_halt_channel"}, {&__pyx_n_audio_pause_channel, "audio_pause_channel"}, {&__pyx_n_audio_resume_channel, "audio_resume_channel"}, {&__pyx_n_channel, "channel"}, {&__pyx_n_play, "play"}, {&__pyx_n_play_fade_in, "play_fade_in"}, {&__pyx_n_play_fade_in_timed, "play_fade_in_timed"}, {&__pyx_n_play_timed, "play_timed"}, {&__pyx_n_self, "self"}, {0, 0} }; static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_k25p, __pyx_k25, sizeof(__pyx_k25)}, {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)}, {&__pyx_k27p, __pyx_k27, sizeof(__pyx_k27)}, {&__pyx_k28p, __pyx_k28, sizeof(__pyx_k28)}, {&__pyx_k29p, __pyx_k29, sizeof(__pyx_k29)}, {&__pyx_k30p, __pyx_k30, sizeof(__pyx_k30)}, {&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)}, {&__pyx_k32p, __pyx_k32, sizeof(__pyx_k32)}, {&__pyx_k33p, __pyx_k33, sizeof(__pyx_k33)}, {&__pyx_k34p, __pyx_k34, sizeof(__pyx_k34)}, {&__pyx_k35p, __pyx_k35, sizeof(__pyx_k35)}, {&__pyx_k36p, __pyx_k36, sizeof(__pyx_k36)}, {&__pyx_k37p, __pyx_k37, sizeof(__pyx_k37)}, {&__pyx_k38p, __pyx_k38, sizeof(__pyx_k38)}, {&__pyx_k39p, __pyx_k39, sizeof(__pyx_k39)}, {&__pyx_k40p, __pyx_k40, sizeof(__pyx_k40)}, {&__pyx_k41p, __pyx_k41, sizeof(__pyx_k41)}, {&__pyx_k47p, __pyx_k47, sizeof(__pyx_k47)}, {0, 0, 0} }; static struct __pyx_vtabstruct_9sdl_mixer_Sample __pyx_vtable_9sdl_mixer_Sample; static PyObject *__pyx_tp_new_9sdl_mixer_Sample(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9sdl_mixer_Sample *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_9sdl_mixer_Sample *)o); *(struct __pyx_vtabstruct_9sdl_mixer_Sample **)&p->__pyx_vtab = __pyx_vtabptr_9sdl_mixer_Sample; return o; } static void __pyx_tp_dealloc_9sdl_mixer_Sample(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_9sdl_mixer_Sample(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_9sdl_mixer_Sample(PyObject *o) { return 0; } static PyObject *__pyx_getprop_9sdl_mixer_6Sample_volume(PyObject *o, void *x) { return __pyx_f_9sdl_mixer_6Sample_6volume___get__(o); } static int __pyx_setprop_9sdl_mixer_6Sample_volume(PyObject *o, PyObject *v, void *x) { if (v) { return __pyx_f_9sdl_mixer_6Sample_6volume___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static struct PyMethodDef __pyx_methods_9sdl_mixer_Sample[] = { {"play", (PyCFunction)__pyx_f_9sdl_mixer_6Sample_play, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_6Sample_play}, {"play_timed", (PyCFunction)__pyx_f_9sdl_mixer_6Sample_play_timed, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in", (PyCFunction)__pyx_f_9sdl_mixer_6Sample_play_fade_in, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in_timed", (PyCFunction)__pyx_f_9sdl_mixer_6Sample_play_fade_in_timed, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9sdl_mixer_Sample[] = { {"volume", __pyx_getprop_9sdl_mixer_6Sample_volume, __pyx_setprop_9sdl_mixer_6Sample_volume, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Sample = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Sample = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Sample = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Sample = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_9sdl_mixer_Sample = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "sdl_mixer.Sample", /*tp_name*/ sizeof(struct __pyx_obj_9sdl_mixer_Sample), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9sdl_mixer_Sample, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Sample, /*tp_as_number*/ &__pyx_tp_as_sequence_Sample, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Sample, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Sample, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ " class for loading and playing audio samples.\n\n all play functions accept either a channel to play on or \n the default (-1) is to play on the next available channel. \n the play functions will return the channel the sound \n was played on.\n\n to play sounds on specific channels you might want to use \n the AudioChannel class.\n ", /*tp_doc*/ __pyx_tp_traverse_9sdl_mixer_Sample, /*tp_traverse*/ __pyx_tp_clear_9sdl_mixer_Sample, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9sdl_mixer_Sample, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9sdl_mixer_Sample, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_9sdl_mixer_6Sample___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9sdl_mixer_Sample, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static PyObject *__pyx_tp_new_9sdl_mixer_Channel(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; return o; } static void __pyx_tp_dealloc_9sdl_mixer_Channel(PyObject *o) { (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_9sdl_mixer_Channel(PyObject *o, visitproc v, void *a) { return 0; } static int __pyx_tp_clear_9sdl_mixer_Channel(PyObject *o) { return 0; } static PyObject *__pyx_getprop_9sdl_mixer_7Channel_volume(PyObject *o, void *x) { return __pyx_f_9sdl_mixer_7Channel_6volume___get__(o); } static int __pyx_setprop_9sdl_mixer_7Channel_volume(PyObject *o, PyObject *v, void *x) { if (v) { return __pyx_f_9sdl_mixer_7Channel_6volume___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static struct PyMethodDef __pyx_methods_9sdl_mixer_Channel[] = { {"fade_out", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_fade_out, METH_VARARGS|METH_KEYWORDS, 0}, {"expire_channel", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_expire_channel, METH_VARARGS|METH_KEYWORDS, 0}, {"pause", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_pause, METH_VARARGS|METH_KEYWORDS, 0}, {"stop", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_stop, METH_VARARGS|METH_KEYWORDS, 0}, {"resume", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_resume, METH_VARARGS|METH_KEYWORDS, 0}, {"is_paused", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_is_paused, METH_VARARGS|METH_KEYWORDS, 0}, {"is_playing", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_is_playing, METH_VARARGS|METH_KEYWORDS, 0}, {"is_fading", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_is_fading, METH_VARARGS|METH_KEYWORDS, 0}, {"play", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_play, METH_VARARGS|METH_KEYWORDS, 0}, {"play_timed", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_play_timed, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_play_fade_in, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in_timed", (PyCFunction)__pyx_f_9sdl_mixer_7Channel_play_fade_in_timed, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9sdl_mixer_Channel[] = { {"volume", __pyx_getprop_9sdl_mixer_7Channel_volume, __pyx_setprop_9sdl_mixer_7Channel_volume, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Channel = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Channel = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Channel = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Channel = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_9sdl_mixer_Channel = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "sdl_mixer.Channel", /*tp_name*/ sizeof(struct __pyx_obj_9sdl_mixer_Channel), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9sdl_mixer_Channel, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Channel, /*tp_as_number*/ &__pyx_tp_as_sequence_Channel, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Channel, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Channel, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ " class to encapsulate a channel.\n \n this simplifies having to deal with channels.\n\n all the play functions accept an audiofile class, \n this class is used to play the sound but the channel \n argument is passed as well for simplicity ", /*tp_doc*/ __pyx_tp_traverse_9sdl_mixer_Channel, /*tp_traverse*/ __pyx_tp_clear_9sdl_mixer_Channel, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9sdl_mixer_Channel, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9sdl_mixer_Channel, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_9sdl_mixer_7Channel___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9sdl_mixer_Channel, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static struct __pyx_vtabstruct_9sdl_mixer_Music __pyx_vtable_9sdl_mixer_Music; static PyObject *__pyx_tp_new_9sdl_mixer_Music(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_9sdl_mixer_Music *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; p = ((struct __pyx_obj_9sdl_mixer_Music *)o); *(struct __pyx_vtabstruct_9sdl_mixer_Music **)&p->__pyx_vtab = __pyx_vtabptr_9sdl_mixer_Music; p->finished_callback = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_9sdl_mixer_Music(PyObject *o) { struct __pyx_obj_9sdl_mixer_Music *p = (struct __pyx_obj_9sdl_mixer_Music *)o; Py_XDECREF(p->finished_callback); (*o->ob_type->tp_free)(o); } static int __pyx_tp_traverse_9sdl_mixer_Music(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9sdl_mixer_Music *p = (struct __pyx_obj_9sdl_mixer_Music *)o; if (p->finished_callback) { e = (*v)(p->finished_callback, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9sdl_mixer_Music(PyObject *o) { struct __pyx_obj_9sdl_mixer_Music *p = (struct __pyx_obj_9sdl_mixer_Music *)o; Py_XDECREF(p->finished_callback); p->finished_callback = Py_None; Py_INCREF(Py_None); return 0; } static PyObject *__pyx_getprop_9sdl_mixer_5Music_volume(PyObject *o, void *x) { return __pyx_f_9sdl_mixer_5Music_6volume___get__(o); } static int __pyx_setprop_9sdl_mixer_5Music_volume(PyObject *o, PyObject *v, void *x) { if (v) { return __pyx_f_9sdl_mixer_5Music_6volume___set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static struct PyMethodDef __pyx_methods_9sdl_mixer_Music[] = { {"play", (PyCFunction)__pyx_f_9sdl_mixer_5Music_play, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in", (PyCFunction)__pyx_f_9sdl_mixer_5Music_play_fade_in, METH_VARARGS|METH_KEYWORDS, 0}, {"play_fade_in_at_pos", (PyCFunction)__pyx_f_9sdl_mixer_5Music_play_fade_in_at_pos, METH_VARARGS|METH_KEYWORDS, 0}, {"rewind", (PyCFunction)__pyx_f_9sdl_mixer_5Music_rewind, METH_VARARGS|METH_KEYWORDS, 0}, {"set_position", (PyCFunction)__pyx_f_9sdl_mixer_5Music_set_position, METH_VARARGS|METH_KEYWORDS, 0}, {"stop", (PyCFunction)__pyx_f_9sdl_mixer_5Music_stop, METH_VARARGS|METH_KEYWORDS, 0}, {"stop_fade_out", (PyCFunction)__pyx_f_9sdl_mixer_5Music_stop_fade_out, METH_VARARGS|METH_KEYWORDS, 0}, {"resume", (PyCFunction)__pyx_f_9sdl_mixer_5Music_resume, METH_VARARGS|METH_KEYWORDS, 0}, {"pause", (PyCFunction)__pyx_f_9sdl_mixer_5Music_pause, METH_VARARGS|METH_KEYWORDS, 0}, {"get_type", (PyCFunction)__pyx_f_9sdl_mixer_5Music_get_type, METH_VARARGS|METH_KEYWORDS, 0}, {"is_playing", (PyCFunction)__pyx_f_9sdl_mixer_5Music_is_playing, METH_VARARGS|METH_KEYWORDS, 0}, {"is_paused", (PyCFunction)__pyx_f_9sdl_mixer_5Music_is_paused, METH_VARARGS|METH_KEYWORDS, 0}, {"is_fading", (PyCFunction)__pyx_f_9sdl_mixer_5Music_is_fading, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_9sdl_mixer_Music[] = { {"volume", __pyx_getprop_9sdl_mixer_5Music_volume, __pyx_setprop_9sdl_mixer_5Music_volume, 0, 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Music = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ 0, /*nb_divide*/ 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ 0, /*nb_coerce*/ 0, /*nb_int*/ 0, /*nb_long*/ 0, /*nb_float*/ 0, /*nb_oct*/ 0, /*nb_hex*/ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ 0, /*nb_inplace_divide*/ 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX 0, /*nb_index*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Music = { 0, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Music = { 0, /*mp_length*/ 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_Music = { 0, /*bf_getreadbuffer*/ 0, /*bf_getwritebuffer*/ 0, /*bf_getsegcount*/ 0, /*bf_getcharbuffer*/ }; PyTypeObject __pyx_type_9sdl_mixer_Music = { PyObject_HEAD_INIT(0) 0, /*ob_size*/ "sdl_mixer.Music", /*tp_name*/ sizeof(struct __pyx_obj_9sdl_mixer_Music), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9sdl_mixer_Music, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ 0, /*tp_repr*/ &__pyx_tp_as_number_Music, /*tp_as_number*/ &__pyx_tp_as_sequence_Music, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Music, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Music, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ " class for managing music playback ", /*tp_doc*/ __pyx_tp_traverse_9sdl_mixer_Music, /*tp_traverse*/ __pyx_tp_clear_9sdl_mixer_Music, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_9sdl_mixer_Music, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_9sdl_mixer_Music, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_f_9sdl_mixer_5Music___init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9sdl_mixer_Music, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ }; static struct PyMethodDef __pyx_methods[] = { {"init", (PyCFunction)__pyx_f_9sdl_mixer_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_init}, {"shutdown", (PyCFunction)__pyx_f_9sdl_mixer_shutdown, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_shutdown}, {"print_info", (PyCFunction)__pyx_f_9sdl_mixer_print_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_print_info}, {"allocate_channels", (PyCFunction)__pyx_f_9sdl_mixer_allocate_channels, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_allocate_channels}, {"channel_volume", (PyCFunction)__pyx_f_9sdl_mixer_channel_volume, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_volume}, {"channel_panning", (PyCFunction)__pyx_f_9sdl_mixer_channel_panning, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_panning}, {"channel_set_position", (PyCFunction)__pyx_f_9sdl_mixer_channel_set_position, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_set_position}, {"pause_channel", (PyCFunction)__pyx_f_9sdl_mixer_pause_channel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_pause_channel}, {"resume_channel", (PyCFunction)__pyx_f_9sdl_mixer_resume_channel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_resume_channel}, {"halt_channel", (PyCFunction)__pyx_f_9sdl_mixer_halt_channel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_halt_channel}, {"expire_channel", (PyCFunction)__pyx_f_9sdl_mixer_expire_channel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_expire_channel}, {"fade_out_channel", (PyCFunction)__pyx_f_9sdl_mixer_fade_out_channel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_fade_out_channel}, {"channel_is_playing", (PyCFunction)__pyx_f_9sdl_mixer_channel_is_playing, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_is_playing}, {"channel_is_paused", (PyCFunction)__pyx_f_9sdl_mixer_channel_is_paused, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_is_paused}, {"channel_is_fading", (PyCFunction)__pyx_f_9sdl_mixer_channel_is_fading, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9sdl_mixer_channel_is_fading}, {0, 0, 0, 0} }; static void __pyx_init_filenames(void); /*proto*/ PyMODINIT_FUNC initsdl_mixer(void); /*proto*/ PyMODINIT_FUNC initsdl_mixer(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; __pyx_init_filenames(); __pyx_m = Py_InitModule4("sdl_mixer", __pyx_methods, 0, 0, PYTHON_API_VERSION); if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; __pyx_b = PyImport_AddModule("__builtin__"); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; __pyx_vtabptr_9sdl_mixer_Sample = &__pyx_vtable_9sdl_mixer_Sample; *(void(**)(void))&__pyx_vtable_9sdl_mixer_Sample.__load = (void(*)(void))__pyx_f_9sdl_mixer_6Sample___load; *(void(**)(void))&__pyx_vtable_9sdl_mixer_Sample.__del__ = (void(*)(void))__pyx_f_9sdl_mixer_6Sample___del__; if (PyType_Ready(&__pyx_type_9sdl_mixer_Sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} if (__Pyx_SetVtable(__pyx_type_9sdl_mixer_Sample.tp_dict, __pyx_vtabptr_9sdl_mixer_Sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Sample", (PyObject *)&__pyx_type_9sdl_mixer_Sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} __pyx_ptype_9sdl_mixer_Sample = &__pyx_type_9sdl_mixer_Sample; if (PyType_Ready(&__pyx_type_9sdl_mixer_Channel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Channel", (PyObject *)&__pyx_type_9sdl_mixer_Channel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} __pyx_ptype_9sdl_mixer_Channel = &__pyx_type_9sdl_mixer_Channel; __pyx_vtabptr_9sdl_mixer_Music = &__pyx_vtable_9sdl_mixer_Music; *(void(**)(void))&__pyx_vtable_9sdl_mixer_Music.__load = (void(*)(void))__pyx_f_9sdl_mixer_5Music___load; *(void(**)(void))&__pyx_vtable_9sdl_mixer_Music.__del__ = (void(*)(void))__pyx_f_9sdl_mixer_5Music___del__; __pyx_type_9sdl_mixer_Music.tp_free = _PyObject_GC_Del; if (PyType_Ready(&__pyx_type_9sdl_mixer_Music) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;} if (__Pyx_SetVtable(__pyx_type_9sdl_mixer_Music.tp_dict, __pyx_vtabptr_9sdl_mixer_Music) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "Music", (PyObject *)&__pyx_type_9sdl_mixer_Music) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;} __pyx_ptype_9sdl_mixer_Music = &__pyx_type_9sdl_mixer_Music; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":122 */ __pyx_k1 = MIX_DEFAULT_FREQUENCY; __pyx_k2 = MIX_DEFAULT_FORMAT; __pyx_k3 = MIX_DEFAULT_CHANNELS; __pyx_k4 = 1024; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":179 */ __pyx_k5 = (-1); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":184 */ __pyx_k6 = (-1); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":189 */ __pyx_k7 = (-1); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":204 */ __pyx_k8 = (-1); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":210 */ __pyx_k9 = (-1); /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":256 */ __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;} __pyx_k10 = __pyx_1; __pyx_1 = 0; __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;} __pyx_k11 = __pyx_2; __pyx_2 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":265 */ __pyx_k12 = (-1); __pyx_k13 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":273 */ __pyx_k14 = (-1); __pyx_k15 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":281 */ __pyx_k16 = (-1); __pyx_k17 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":339 */ __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} __pyx_k18 = __pyx_3; __pyx_3 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":342 */ __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; goto __pyx_L1;} __pyx_k19 = __pyx_4; __pyx_4 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":345 */ __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; goto __pyx_L1;} __pyx_k20 = __pyx_5; __pyx_5 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":348 */ __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; goto __pyx_L1;} __pyx_k21 = __pyx_6; __pyx_6 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":371 */ __pyx_k22 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":379 */ __pyx_k23 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":383 */ __pyx_k24 = 0; /* "/mnt/gmirror/ports/audio/py-sdl_mixer/work/pysdl_mixer-0.0.3/sdl_mixer.pyx":450 */ return; __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); __Pyx_AddTraceback("sdl_mixer"); } static char *__pyx_filenames[] = { "sdl_mixer.pyx", }; /* Runtime support code */ static void __pyx_init_filenames(void) { __pyx_f = __pyx_filenames; } static PyObject *__Pyx_GetStdout(void) { PyObject *f = PySys_GetObject("stdout"); if (!f) { PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); } return f; } static int __Pyx_PrintItem(PyObject *v) { PyObject *f; if (!(f = __Pyx_GetStdout())) return -1; if (PyFile_SoftSpace(f, 1)) { if (PyFile_WriteString(" ", f) < 0) return -1; } if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) return -1; if (PyString_Check(v)) { char *s = PyString_AsString(v); Py_ssize_t len = PyString_Size(v); if (len > 0 && isspace(Py_CHARMASK(s[len-1])) && s[len-1] != ' ') PyFile_SoftSpace(f, 0); } return 0; } static int __Pyx_PrintNewline(void) { PyObject *f; if (!(f = __Pyx_GetStdout())) return -1; if (PyFile_WriteString("\n", f) < 0) return -1; PyFile_SoftSpace(f, 0); return 0; } static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); /* First, check the traceback argument, replacing None with NULL. */ if (tb == Py_None) { Py_DECREF(tb); tb = 0; } else if (tb != NULL && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } /* Next, replace a missing value with None */ if (value == NULL) { value = Py_None; Py_INCREF(value); } #if PY_VERSION_HEX < 0x02050000 if (!PyClass_Check(type)) #else if (!PyType_Check(type)) #endif { /* Raising an instance. The value should be a dummy. */ if (value != Py_None) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } /* Normalize to raise , */ Py_DECREF(value); value = type; #if PY_VERSION_HEX < 0x02050000 if (PyInstance_Check(type)) { type = (PyObject*) ((PyInstanceObject*)type)->in_class; Py_INCREF(type); } else { PyErr_SetString(PyExc_TypeError, "raise: exception must be an old-style class or instance"); goto raise_error; } #else type = (PyObject*) type->ob_type; Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } #endif } PyErr_Restore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { PyObject *result; result = PyObject_GetAttr(dict, name); if (!result) PyErr_SetObject(PyExc_NameError, name); return result; } static void __Pyx_WriteUnraisable(char *name) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; PyErr_Fetch(&old_exc, &old_val, &old_tb); ctx = PyString_FromString(name); PyErr_Restore(old_exc, old_val, old_tb); if (!ctx) ctx = Py_None; PyErr_WriteUnraisable(ctx); } static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { while (t->p) { *t->p = PyString_InternFromString(t->s); if (!*t->p) return -1; ++t; } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; ++t; } return 0; } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { PyObject *pycobj = 0; int result; pycobj = PyCObject_FromVoidPtr(vtable, 0); if (!pycobj) goto bad; if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0) goto bad; result = 0; goto done; bad: result = -1; done: Py_XDECREF(pycobj); return result; } #include "compile.h" #include "frameobject.h" #include "traceback.h" static void __Pyx_AddTraceback(char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; PyObject *empty_tuple = 0; PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_srcfile = PyString_FromString(__pyx_filename); if (!py_srcfile) goto bad; py_funcname = PyString_FromString(funcname); if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; empty_tuple = PyTuple_New(0); if (!empty_tuple) goto bad; empty_string = PyString_FromString(""); if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ empty_string, /*PyObject *code,*/ empty_tuple, /*PyObject *consts,*/ empty_tuple, /*PyObject *names,*/ empty_tuple, /*PyObject *varnames,*/ empty_tuple, /*PyObject *freevars,*/ empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ empty_string /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ py_globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = __pyx_lineno; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); Py_XDECREF(empty_tuple); Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); }