src_c/mixer.c

Python types and module startup/shutdown functions defined in the pygame.mixerpygame module for loading and playing sounds extension module.

Header file: src_c/include/pygame_mixer.h

pgSoundObject

The pygame.mixer.Sound instance C structure.

PyTypeObject *pgSound_Type

The pygame.mixer.Sound Python type.

PyObject* pgSound_New(Mix_Chunk *chunk)

Return a new pygame.mixer.Sound instance for the SDL mixer chunk chunk. On failure, raise a Python exception and return NULL.

int pgSound_Check(PyObject *obj)

Return true if obj is an instance of type pgSound_Type, but not a pgSound_Type subclass instance. A macro.

Mix_Chunk* pgSound_AsChunk(PyObject *x)

Return the SDL Mix_Chunk struct associated with the pgSound_Type instance x. A macro that does no NULL or Python type check on x.

pgChannelObject

The pygame.mixer.Channel instance C structure.

PyTypeObject *pgChannel_Type

The pygame.mixer.Channel Python type.

PyObject* pgChannel_New(int channelnum)

Return a new pygame.mixer.Channel instance for the SDL mixer channel channelnum. On failure, raise a Python exception and return NULL.

int pgChannel_Check(PyObject *obj)

Return true if obj is an instance of type pgChannel_Type, but not a pgChannel_Type subclass instance. A macro.

Mix_Chunk *pgChannel_AsInt(PyObject *x)

Return the SDL mixer music channel number associated with pgChannel_Type instance x. A macro that does no NULL or Python type check on x.

void pgMixer_AutoInit(void)

Initialize the pygame.mixer module and start the SDL mixer.

void pgMixer_AutoQuit(void)

Stop all playing channels and close the SDL mixer.




Edit on GitHub