/* Generated by Pyrex 0.9.3 on Sun Jul 17 21:32:31 2005 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#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_UnpackItem(PyObject *, int); /*proto*/
static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
static int __Pyx_PrintItem(PyObject *); /*proto*/
static int __Pyx_PrintNewline(void); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static void __Pyx_ReRaise(void); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetExcValue(void); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
static void __Pyx_WriteUnraisable(char *name); /*proto*/
static void __Pyx_AddTraceback(char *funcname); /*proto*/
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
staticforward char **__pyx_f;

/* Declarations from sdl_mixer */

staticforward PyTypeObject __pyx_type_9sdl_mixer_Sample;

struct __pyx_obj_9sdl_mixer_Sample {
  PyObject_HEAD
  struct __pyx_vtabstruct_9sdl_mixer_Sample *__pyx_vtab;
  Mix_Chunk (*_chunk);
};

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;

staticforward PyTypeObject __pyx_type_9sdl_mixer_Channel;

struct __pyx_obj_9sdl_mixer_Channel {
  PyObject_HEAD
};

staticforward PyTypeObject __pyx_type_9sdl_mixer_Music;

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_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_init;
static PyObject *__pyx_n_shutdown;
static PyObject *__pyx_n_print_info;
static PyObject *__pyx_n_allocate_channels;
static PyObject *__pyx_n_channel_volume;
static PyObject *__pyx_n_channel_panning;
static PyObject *__pyx_n_channel_set_position;
static PyObject *__pyx_n_pause_channel;
static PyObject *__pyx_n_resume_channel;
static PyObject *__pyx_n_halt_channel;
static PyObject *__pyx_n_expire_channel;
static PyObject *__pyx_n_fade_out_channel;
static PyObject *__pyx_n_channel_is_playing;
static PyObject *__pyx_n_channel_is_paused;
static PyObject *__pyx_n_channel_is_fading;

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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":111 */
  __pyx_1 = (SDL_InitSubSystem(SDL_INIT_AUDIO) == (-1));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":112 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k25p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":113 */
    __Pyx_Raise(__pyx_k26p, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":115 */
  __pyx_1 = (Mix_OpenAudio(__pyx_v_frequency,__pyx_v_format,__pyx_v_channels,__pyx_v_chunksize) == (-1));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":116 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k27p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;}

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":117 */
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":119 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":123 */
  Mix_CloseAudio();

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.shutdown");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":132 */
  Mix_QuerySpec((&__pyx_v_freq),(&__pyx_v_format),(&__pyx_v_channels));

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":135 */
  __pyx_1 = PyInt_FromLong(__pyx_v_freq); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(__pyx_v_format); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
  __pyx_3 = PyInt_FromLong(__pyx_v_channels); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; 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 = 135; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":143 */
  Mix_AllocateChannels(__pyx_v_numchans);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.allocate_channels");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":149 */
  Mix_Volume(__pyx_v_channel,__pyx_v_volume);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.channel_volume");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":155 */
  Mix_SetPanning(__pyx_v_channel,__pyx_v_left,__pyx_v_right);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.channel_panning");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":161 */
  __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 = 161; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":166 */
  Mix_Pause(__pyx_v_channel);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.pause_channel");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":171 */
  Mix_Resume(__pyx_v_channel);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.resume_channel");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":176 */
  Mix_HaltChannel(__pyx_v_channel);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.halt_channel");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":181 */
  Mix_ExpireChannel(__pyx_v_channel,__pyx_v_ms);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.expire_channel");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":186 */
  Mix_FadeOutChannel(__pyx_v_channel,__pyx_v_ms);

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.fade_out_channel");
  __pyx_r = 0;
  __pyx_L0:;
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":192 */
  __pyx_1 = PyInt_FromLong(Mix_Playing(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":198 */
  __pyx_1 = PyInt_FromLong(Mix_Paused(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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(__pyx_v_fade);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":203 */
  __pyx_1 = PyInt_FromLong(Mix_FadingChannel(__pyx_v_channel)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
  Py_DECREF(__pyx_v_fade);
  __pyx_v_fade = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":205 */
  __pyx_1 = PyInt_FromLong(MIX_NO_FADING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":206 */
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; 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 = 207; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":208 */
    __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; 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 = 209; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fade, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":210 */
    __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":228 */
  __pyx_v_self->_chunk = Mix_LoadWAV(__pyx_v_file);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":229 */
  __pyx_1 = (!(__pyx_v_self->_chunk != 0));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":230 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k29p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; 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 = 230; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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 char __pyx_doc_9sdl_mixer_6Sample___init__[] = " construct a new audio class with file as the sound ";
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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":234 */
  __pyx_1 = PyString_AsString(__pyx_v_file); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; 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 = 234; 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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":237 */
  Mix_FreeChunk(__pyx_v_self->_chunk);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":238 */
  __pyx_v_self->_chunk = 0;

  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_WriteUnraisable("sdl_mixer.Sample.__del__");
  __pyx_L0:;
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":246 */
  __pyx_1 = PyInt_AsLong(__pyx_v_channel); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;}
  __pyx_2 = PyInt_AsLong(__pyx_v_loops); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; 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) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":247 */
    __pyx_4 = PyString_FromString(Mix_GetError()); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
    __pyx_5 = PyNumber_Remainder(__pyx_k30p, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; 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 = 247; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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(__pyx_v_c);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":250 */
  __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 = 250; goto __pyx_L1;}
  Py_DECREF(__pyx_v_c);
  __pyx_v_c = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":252 */
  __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_c, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":253 */
    __pyx_1 = PyString_FromString(Mix_GetError()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k31p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; 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 = 253; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":255 */
  Py_INCREF(__pyx_v_c);
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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(__pyx_v_c);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":258 */
  __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 = 258; goto __pyx_L1;}
  Py_DECREF(__pyx_v_c);
  __pyx_v_c = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":260 */
  __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_c, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":261 */
    __pyx_1 = PyString_FromString(Mix_GetError()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k32p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; 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 = 261; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":263 */
  Py_INCREF(__pyx_v_c);
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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(__pyx_v_c);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":266 */
  __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 = 266; goto __pyx_L1;}
  Py_DECREF(__pyx_v_c);
  __pyx_v_c = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/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) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":269 */
    __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_k33p, __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:;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":271 */
  Py_INCREF(__pyx_v_c);
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":275 */
  __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 = 275; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":277 */
  __pyx_1 = PyInt_AsLong(__pyx_v_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; 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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":290 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_self); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_1, __pyx_n_channel, __pyx_v_channel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; 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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":295 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_volume); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;}
  __pyx_3 = PyInt_FromLong((-1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; 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 = 295; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":297 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_volume); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; 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 = 297; 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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":300 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_fade_out_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; 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 = 300; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":303 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_export_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; 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 = 303; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":306 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_pause_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; 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 = 306; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":309 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_halt_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; 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 = 309; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":312 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_resume_channel); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; 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 = 312; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":315 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_paused); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; 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 = 315; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":318 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_playing); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; 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 = 318; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":321 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_audio_channel_is_fading); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; 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 = 321; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":324 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; 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 = 324; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":327 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_timed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; 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 = 327; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":330 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_fade_in); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; 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 = 330; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":333 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_audiofile, __pyx_n_play_fade_in_timed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_channel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; 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 = 333; 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(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":343 */
  __pyx_v_self->_music = Mix_LoadMUS(__pyx_v_file);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":344 */
  __pyx_1 = (!(__pyx_v_self->_music != 0));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":345 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k34p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; 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 = 345; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":348 */
  Mix_FreeMusic(__pyx_v_self->_music);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":349 */
  __pyx_v_self->_music = 0;

  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_WriteUnraisable("sdl_mixer.Music.__del__");
  __pyx_L0:;
  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 char __pyx_doc_9sdl_mixer_5Music___init__[] = " create a new MusicFile class with file as the music";
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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":353 */
  __pyx_1 = PyString_AsString(__pyx_v_file); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; 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 = 353; 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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":356 */
  __pyx_1 = (Mix_PlayMusic(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music,__pyx_v_loops) == (-1));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":357 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k35p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":358 */
    __pyx_r = Py_None; Py_INCREF(__pyx_r);
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":364 */
  __pyx_1 = Mix_FadeInMusic(((struct __pyx_obj_9sdl_mixer_Music *)__pyx_v_self)->_music,__pyx_v_loops,__pyx_v_ms);
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":365 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k36p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":368 */
  __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) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":369 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k37p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":373 */
  __pyx_1 = PyInt_FromLong(Mix_VolumeMusic((-1))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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 = 374; goto __pyx_L1;}

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":375 */
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":378 */
  Mix_RewindMusic();

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.Music.rewind");
  __pyx_r = 0;
  __pyx_L0:;
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":381 */
  __pyx_1 = (Mix_SetMusicPosition(__pyx_v_position) == (-1));
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":382 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k38p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":385 */
  Mix_HaltMusic();

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.Music.stop");
  __pyx_r = 0;
  __pyx_L0:;
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":388 */
  __pyx_1 = (Mix_FadeOutMusic(__pyx_v_ms) == 0);
  if (__pyx_1) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":389 */
    __pyx_2 = PyString_FromString(Mix_GetError()); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k39p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":392 */
  Mix_ResumeMusic();

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.Music.resume");
  __pyx_r = 0;
  __pyx_L0:;
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":395 */
  Mix_PauseMusic();

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("sdl_mixer.Music.pause");
  __pyx_r = 0;
  __pyx_L0:;
  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(__pyx_v_type);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":398 */
  __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 = 398; goto __pyx_L1;}
  Py_DECREF(__pyx_v_type);
  __pyx_v_type = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":400 */
  __pyx_1 = PyInt_FromLong(MUS_NONE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":401 */
    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 = 402; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":403 */
    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 = 404; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":405 */
    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 = 406; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":407 */
    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 = 408; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":409 */
    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 = 410; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":411 */
    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 = 412; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_type, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":413 */
    Py_INCREF(__pyx_n_MP3);
    __pyx_r = __pyx_n_MP3;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":415 */
    Py_INCREF(__pyx_n_Unknown);
    __pyx_r = __pyx_n_Unknown;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":418 */
  __pyx_1 = PyInt_FromLong((Mix_PlayingMusic() == 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":421 */
  __pyx_1 = PyInt_FromLong((Mix_PausedMusic() == 1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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(__pyx_v_fading);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":424 */
  __pyx_1 = PyInt_FromLong(Mix_FadingMusic()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
  Py_DECREF(__pyx_v_fading);
  __pyx_v_fading = __pyx_1;
  __pyx_1 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":426 */
  __pyx_1 = PyInt_FromLong(MIX_NO_FADING); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fading, __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) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":427 */
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; 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 = 428; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fading, __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) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":429 */
    __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; 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 = 430; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_fading, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; goto __pyx_L1;}
  __pyx_2 = __pyx_2 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":431 */
    __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  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) {

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":435 */
  if (__Pyx_PrintItem(__pyx_k47p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; 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_allocate_channels, "allocate_channels"},
  {&__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_channel_is_fading, "channel_is_fading"},
  {&__pyx_n_channel_is_paused, "channel_is_paused"},
  {&__pyx_n_channel_is_playing, "channel_is_playing"},
  {&__pyx_n_channel_panning, "channel_panning"},
  {&__pyx_n_channel_set_position, "channel_set_position"},
  {&__pyx_n_channel_volume, "channel_volume"},
  {&__pyx_n_expire_channel, "expire_channel"},
  {&__pyx_n_fade_out_channel, "fade_out_channel"},
  {&__pyx_n_halt_channel, "halt_channel"},
  {&__pyx_n_init, "init"},
  {&__pyx_n_pause_channel, "pause_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_print_info, "print_info"},
  {&__pyx_n_resume_channel, "resume_channel"},
  {&__pyx_n_self, "self"},
  {&__pyx_n_shutdown, "shutdown"},
  {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) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_9sdl_mixer_Sample *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) {
  struct __pyx_obj_9sdl_mixer_Sample *p = (struct __pyx_obj_9sdl_mixer_Sample *)o;
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9sdl_mixer_Sample(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9sdl_mixer_Sample *p = (struct __pyx_obj_9sdl_mixer_Sample *)o;
  return 0;
}

static int __pyx_tp_clear_9sdl_mixer_Sample(PyObject *o) {
  struct __pyx_obj_9sdl_mixer_Sample *p = (struct __pyx_obj_9sdl_mixer_Sample *)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*/
};

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

statichere 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, /*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);
  struct __pyx_obj_9sdl_mixer_Channel *p = (struct __pyx_obj_9sdl_mixer_Channel *)o;
  return o;
}

static void __pyx_tp_dealloc_9sdl_mixer_Channel(PyObject *o) {
  struct __pyx_obj_9sdl_mixer_Channel *p = (struct __pyx_obj_9sdl_mixer_Channel *)o;
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9sdl_mixer_Channel(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9sdl_mixer_Channel *p = (struct __pyx_obj_9sdl_mixer_Channel *)o;
  return 0;
}

static int __pyx_tp_clear_9sdl_mixer_Channel(PyObject *o) {
  struct __pyx_obj_9sdl_mixer_Channel *p = (struct __pyx_obj_9sdl_mixer_Channel *)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*/
};

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

statichere 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, /*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) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_9sdl_mixer_Music *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(p->finished_callback);
  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(p->finished_callback);
  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*/
};

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

statichere 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}
};

DL_EXPORT(void) initsdl_mixer(void); /*proto*/
DL_EXPORT(void) 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_m = Py_InitModule4("sdl_mixer", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;};
  __pyx_vtabptr_9sdl_mixer_Sample = &__pyx_vtable_9sdl_mixer_Sample;
  __pyx_vtable_9sdl_mixer_Sample.__load = (void *)__pyx_f_9sdl_mixer_6Sample___load;
  __pyx_vtable_9sdl_mixer_Sample.__del__ = (void *)__pyx_f_9sdl_mixer_6Sample___del__;
  if (PyType_Ready(&__pyx_type_9sdl_mixer_Sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; 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 = 212; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Sample", (PyObject *)&__pyx_type_9sdl_mixer_Sample) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; 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 = 280; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Channel", (PyObject *)&__pyx_type_9sdl_mixer_Channel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
  __pyx_ptype_9sdl_mixer_Channel = &__pyx_type_9sdl_mixer_Channel;
  __pyx_vtabptr_9sdl_mixer_Music = &__pyx_vtable_9sdl_mixer_Music;
  __pyx_vtable_9sdl_mixer_Music.__load = (void *)__pyx_f_9sdl_mixer_5Music___load;
  __pyx_vtable_9sdl_mixer_Music.__del__ = (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 = 336; 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 = 336; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Music", (PyObject *)&__pyx_type_9sdl_mixer_Music) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; goto __pyx_L1;}
  __pyx_ptype_9sdl_mixer_Music = &__pyx_type_9sdl_mixer_Music;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":106 */
  __pyx_k1 = MIX_DEFAULT_FREQUENCY;
  __pyx_k2 = MIX_DEFAULT_FORMAT;
  __pyx_k3 = MIX_DEFAULT_CHANNELS;
  __pyx_k4 = 1024;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":163 */
  __pyx_k5 = (-1);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":168 */
  __pyx_k6 = (-1);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":173 */
  __pyx_k7 = (-1);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":188 */
  __pyx_k8 = (-1);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":194 */
  __pyx_k9 = (-1);

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":240 */
  __pyx_1 = PyInt_FromLong((-1)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; 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 = 240; goto __pyx_L1;}
  __pyx_k11 = __pyx_2;
  __pyx_2 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":249 */
  __pyx_k12 = (-1);
  __pyx_k13 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":257 */
  __pyx_k14 = (-1);
  __pyx_k15 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":265 */
  __pyx_k16 = (-1);
  __pyx_k17 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":323 */
  __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;}
  __pyx_k18 = __pyx_3;
  __pyx_3 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":326 */
  __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
  __pyx_k19 = __pyx_4;
  __pyx_4 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":329 */
  __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;}
  __pyx_k20 = __pyx_5;
  __pyx_5 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":332 */
  __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; goto __pyx_L1;}
  __pyx_k21 = __pyx_6;
  __pyx_6 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":355 */
  __pyx_k22 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":363 */
  __pyx_k23 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":367 */
  __pyx_k24 = 0;

  /* "/home/dunk/cvs/pysdl_mixer/sdl_mixer.pyx":434 */
  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",
};
statichere char **__pyx_f = __pyx_filenames;

/* Runtime support code */

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);
        int 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);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type))
        ;
    else if (PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else if (PyInstance_Check(type)) {
        /* 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;
        }
        else {
            /* Normalize to raise <class>, <instance> */
            Py_DECREF(value);
            value = type;
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        }
    }
    else {
        /* Not something you can raise.  You get an exception
           anyway, just not what you specified :-) */
        PyErr_Format(PyExc_TypeError,
                 "exceptions must be strings, classes, or "
                 "instances, not %s", type->ob_type->tp_name);
        goto raise_error;
    }
    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);
}
