API exported by pygame.mixer — pygame v2.6.1 documentation

##### pygame documentation

Pygame Home || Help Contents || Reference Index

Most useful stuff: Color | display | draw | event | font | image | key | locals | mixer | mouse | Rect | Surface | time | music | pygame

Advanced stuff: cursors | joystick | mask | sprite | transform | BufferProxy | freetype | gfxdraw | midi | PixelArray | pixelcopy | sndarray | surfarray | math

Other: camera | controller | examples | fastevent | scrap | tests | touch | version

## src_c/mixer.c

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

Header file: src_c/include/pygame_mixer.h

type 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.

type 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.

int 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.

Edit on GitHub