Module Expr Str Assign NameStore Str Assign NameStore Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad TupleLoad Str NameLoad TupleLoad Str Call NameLoad NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad decorator_list decorator_list Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str Str keyword ListLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword NameLoad FunctionDef arguments args defaults body Expr Str Assign TupleStore NameStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad Call NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Return TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad Call NameLoad AttributeLoad NameLoad attr NameLoad keyword Call NameLoad NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad Call NameLoad NameLoad keyword Call NameLoad NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad Call NameLoad NameLoad NameLoad keyword Call NameLoad NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareLt NameLoad Num body Return Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list Return Call NameLoad NameLoad orelse Return Call NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Global identifier Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Global identifier Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Expr Call NameLoad Call NameLoad NameLoad orelse Expr Call NameLoad Call NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Global identifier If NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad Expr Call NameLoad NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list Return Call NameLoad NameLoad orelse Return Call NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad NameLoad NameLoad decorator_list Return Call NameLoad NameLoad orelse Return Call NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str keyword ListLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str keyword ListLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str keyword ListLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad NameLoad NameLoad Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str Str keyword ListLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str keyword ListLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str Str keyword ListLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad NameLoad NameLoad Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str Str Str Str keyword ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str Str keyword ListLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad Str keyword ListLoad NameLoad keyword Call NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword ListLoad keyword ListLoad keyword NameLoad
N/A N/A A simple multi-channel audio mixer.

It supports 8 channels of 16 bit stereo audio, plus a single channel
of music, mixed by MidMod MOD, Timidity MIDI or SMPEG MP3 libraries.

The mixer can currently load Microsoft WAVE files and Creative Labs VOC
files as audio samples, and can load MIDI files via Timidity and the
following music formats via MikMod: MOD, S3M, IT, XM.  It can load Ogg
Vorbis streams as music if built with the Ogg Vorbis libraries, and finally
it can load MP3 music using the SMPEG library.

The process of mixing MIDI files to wave output is very CPU intensive, so
if playing regular WAVE files sounds great, but playing MIDI files sounds
choppy, try using 8-bit audio, mono audio, or lower frequencies.

:note: The music stream does not resample to the required audio rate.  You
    must call `Mix_OpenAudio` with the sampling rate of your music track.
 N/A __docformat__ restructuredtext N/A __version__ $Id: $ ctypes * N/A cocos.compat N/A dll N/A version N/A array N/A rwops N/A _dll N/A N/A dll SDL_DLL SDL_mixer Mix_Linked_Version 1.2 N/A Mix_Linked_Version N/A N/A _dll function Mix_Linked_Version Get the version of the dynamically linked SDL_mixer library.
     args N/A arg_types N/A return_type N/A POINTER N/A version SDL_version dereference_return True require_return True Mix_Chunk N/A Structure N/A N/A Internal format for an audio chunk.

    :Ivariables:
        `allocated` : int
            Undocumented.
        `abuf` : `SDL_array`
            Buffer of audio data
        `alen` : int
            Length of audio buffer
        `volume` : int
            Per-sample volume, in range [0, 128]

     N/A _fields_ N/A N/A allocated c_int N/A _abuf N/A POINTER c_ubyte N/A alen c_uint N/A volume c_ubyte __getattr__ N/A N/A self attr N/A N/A N/A N/A attr abuf N/A N/A N/A N/A array SDL_array N/A self _abuf N/A self alen c_ubyte N/A N/A AttributeError attr N/A N/A N/A _Mix_Music c_void_p N/A Mix_OpenAudio N/A N/A _dll function Mix_OpenAudio Open the mixer with a certain audio format.

    :Parameters:
        `frequency` : int
            Samples per second.  Typical values are 22050, 44100, 44800.
        `format` : int
            Audio format; one of AUDIO_U8, AUDIO_S8, AUDIO_U16LSB,
            AUDIO_S16LSB, AUDIO_U16MSB or AUDIO_S16MSB
        `channels` : int
            Either 1 for monophonic or 2 for stereo.
        `chunksize` : int
            Size of the audio buffer.  Typical values are 4096, 8192.

     args N/A frequency format channels chunksize arg_types N/A c_int c_ushort c_int c_int return_type c_int error_return -1 N/A Mix_AllocateChannels N/A N/A _dll function Mix_AllocateChannels Dynamically change the number of channels managed by the mixer.

    If decreasing the number of channels, the upper channels
    are stopped.

    :Parameters:
     - `numchans`: int

    :rtype: int
    :return: the new number of allocated channels.
     args N/A numchans arg_types N/A c_int return_type c_int N/A _Mix_QuerySpec N/A N/A _dll private_function Mix_QuerySpec arg_types N/A N/A POINTER c_int N/A POINTER c_ushort N/A POINTER c_int return_type c_int Mix_QuerySpec N/A N/A N/A N/A N/A Find out what the actual audio device parameters are.

    The function returns a tuple giving each parameter value.  The first
    value is 1 if the audio has been opened, 0 otherwise.

    :rtype: (int, int, int, int)
    :return: (opened, frequency, format, channels)
     N/A N/A frequency format channels N/A N/A c_int N/A c_ushort N/A c_int N/A opened N/A _Mix_QuerySpec N/A byref frequency N/A byref format N/A byref channels N/A N/A opened N/A frequency value N/A format value N/A channels value N/A N/A Mix_LoadWAV_RW N/A N/A _dll function Mix_LoadWAV_RW Load a WAV, RIFF, AIFF, OGG or VOC file from a RWops source.



    :rtype: `Mix_Chunk`
     args N/A src freesrc arg_types N/A N/A POINTER N/A rwops SDL_RWops c_int return_type N/A POINTER Mix_Chunk dereference_return True require_return True Mix_LoadWAV N/A N/A file N/A N/A N/A Load a WAV, RIFF, AIFF, OGG or VOC file.

    :Parameters:
        `file` : string
            Filename to load.

    :rtype: `Mix_Chunk`
     N/A filename N/A N/A N/A cocos compat asciibytes file N/A N/A Mix_LoadWAV_RW N/A N/A rwops SDL_RWFromFile filename rb 1 N/A N/A Mix_LoadMUS N/A N/A _dll function Mix_LoadMUS Load a WAV, MID, OGG, MP3 or MOD file.

    :Parameters:
        `file` : string
            Filename to load.

    :rtype: ``Mix_Music``
     args N/A file arg_types N/A c_char_p return_type _Mix_Music require_return True N/A Mix_LoadMUS_RW N/A N/A _dll function Mix_LoadMUS_RW Load a MID, OGG, MP3 or MOD file from a RWops source.

    :Parameters:
        `src` : `SDL_RWops`
            Readable RWops to load from.
        `freesrc` : `int`
            If non-zero, the source will be closed after loading.

    :rtype: ``Mix_Music``
     args N/A file arg_types N/A c_char_p return_type _Mix_Music require_return True N/A _Mix_QuickLoad_WAV N/A N/A _dll private_function Mix_QuickLoad_WAV arg_types N/A N/A POINTER c_ubyte return_type N/A POINTER Mix_Chunk dereference_return True require_return True Mix_QuickLoad_WAV N/A N/A mem N/A N/A N/A Load a wave file of the mixer format from a sequence or SDL_array.

    :Parameters:
     - `mem`: sequence or `SDL_array`

    :rtype: `Mix_Chunk`
     N/A N/A ref mem N/A N/A array to_ctypes mem N/A len mem c_ubyte N/A N/A _Mix_QuickLoad_WAV mem N/A N/A _Mix_QuickLoad_RAW N/A N/A _dll private_function Mix_QuickLoad_RAW arg_types N/A N/A POINTER c_ubyte c_uint return_type N/A POINTER Mix_Chunk dereference_return True require_return True Mix_QuickLoad_RAW N/A N/A mem N/A N/A N/A Load raw audio data of the mixer format from a sequence or SDL_array.

    :Parameters:
     - `mem`: sequence or `SDL_array`

    :rtype: `Mix_Chunk`
     N/A l N/A len mem N/A N/A ref mem N/A N/A N/A SDL array to_ctypes mem N/A len mem c_ubyte N/A N/A _Mix_QuickLoad_RAW mem l N/A N/A Mix_FreeChunk N/A N/A _dll function Mix_FreeChunk Free an audio chunk previously loaded.

    :Parameters:
     - `chunk`: `Mix_Chunk`

     args N/A chunk arg_types N/A N/A POINTER Mix_Chunk return_type None N/A Mix_FreeMusic N/A N/A _dll function Mix_FreeMusic Free a music chunk previously loaded.

    :Parameters:
     - `music`: ``Mix_Music``

     args N/A music arg_types N/A _Mix_Music return_type None N/A Mix_GetMusicType N/A N/A _dll function Mix_GetMusicType Get the music format of a mixer music.

    Returns the format of the currently playing music if `music` is None.

    :Parameters:
     - `music`: ``Mix_Music``

    :rtype: int
    :return: one of `MUS_NONE`, `MUS_CMD`, `MUS_WAV`, `MUS_MOD`, `MUS_MID`,
        `MUS_OGG` or `MUS_MP3`
     args N/A music arg_types N/A _Mix_Music return_type c_int N/A _Mix_FilterFunc N/A CFUNCTYPE None c_void_p N/A POINTER c_ubyte c_int _make_filter N/A N/A func udata N/A N/A N/A func N/A f N/A N/A ignored stream len N/A N/A N/A N/A len 0 N/A N/A N/A stream N/A N/A array SDL_array stream len c_ubyte N/A N/A func udata stream N/A N/A N/A _Mix_FilterFunc f N/A N/A N/A _Mix_FilterFunc N/A N/A _Mix_SetPostMix N/A N/A _dll private_function Mix_SetPostMix arg_types N/A _Mix_FilterFunc c_void_p return_type None N/A _mix_postmix_ref None Mix_SetPostMix N/A N/A mix_func udata N/A N/A N/A Set a function that is called after all mixing is performed.

    This can be used to provide real-time visual display of the audio
    stream or add a custom mixer filter for the stream data.

    :Parameters
        `mix_func` : function
            The function must have the signature
            (stream: `SDL_array`, udata: any) -> None.  The first argument
            is the array of audio data that may be modified in place.
            `udata` is the value passed in this function.
        `udata` : any
            A variable that is passed to the `mix_func` function each
            call.

     N/A _mix_postmix_ref N/A _mix_postmix_ref N/A _make_filter mix_func udata N/A N/A _Mix_SetPostMix _mix_postmix_ref None N/A N/A _Mix_HookMusic N/A N/A _dll private_function Mix_HookMusic arg_types N/A _Mix_FilterFunc c_void_p return_type None N/A _hookmusic_ref None Mix_HookMusic N/A N/A mix_func udata N/A N/A N/A Add your own music player or additional mixer function.

    If `mix_func` is None, the default music player is re-enabled.

    :Parameters
        `mix_func` : function
            The function must have the signature
            (stream: `SDL_array`, udata: any) -> None.  The first argument
            is the array of audio data that may be modified in place.
            `udata` is the value passed in this function.
        `udata` : any
            A variable that is passed to the `mix_func` function each
            call.

     N/A _hookmusic_ref N/A _hookmusic_ref N/A _make_filter mix_func udata N/A N/A _Mix_HookMusic _hookmusic_ref None N/A N/A _Mix_HookMusicFinishedFunc N/A CFUNCTYPE None N/A _Mix_HookMusicFinished N/A N/A _dll private_function Mix_HookMusicFinished arg_types N/A _Mix_HookMusicFinishedFunc return_type None Mix_HookMusicFinished N/A N/A music_finished N/A N/A N/A Add your own callback when the music has finished playing.

    This callback is only called if the music finishes naturally.

    :Parameters:
        `music_finished` : function
            The callback takes no arguments and returns no value.

     N/A music_finished N/A N/A N/A _Mix_HookMusicFinished N/A _Mix_HookMusicFinishedFunc music_finished N/A N/A N/A _Mix_HookMusicFinished N/A _Mix_HookMusicFinishedFunc N/A N/A _Mix_ChannelFinishedFunc N/A CFUNCTYPE None c_int N/A _Mix_ChannelFinished N/A N/A _dll private_function Mix_ChannelFinished arg_types N/A _Mix_ChannelFinishedFunc return_type None N/A _channelfinished_ref None Mix_ChannelFinished N/A N/A channel_finished N/A N/A N/A Add your own callback when a channel has finished playing.

    The callback may be called from the mixer's audio callback or it
    could be called as a result of `Mix_HaltChannel`, etc.

    Do not call `SDL_LockAudio` from this callback; you will either be
    inside the audio callback, or SDL_mixer will explicitly lock the
    audio before calling your callback.

    :Parameters:
        `channel_finished` : function
            The function takes the channel number as its only argument,
            and returns None.  Pass None here to disable the callback.

     N/A _channelfinished_ref N/A channel_finished N/A N/A _channelfinished_ref N/A _Mix_ChannelFinishedFunc channel_finished N/A N/A _channelfinished_ref N/A _Mix_ChannelFinishedFunc N/A N/A _Mix_ChannelFinished _channelfinished_ref N/A N/A _Mix_EffectFunc N/A CFUNCTYPE None c_int N/A POINTER c_ubyte c_int c_void_p _make_Mix_EffectFunc N/A N/A func udata N/A N/A N/A func N/A f N/A N/A chan stream len ignored N/A N/A N/A stream N/A N/A array SDL_array stream len c_ubyte N/A N/A func chan stream udata N/A N/A N/A _Mix_EffectFunc f N/A N/A N/A _Mix_EffectFunc N/A N/A _Mix_EffectDoneFunc N/A CFUNCTYPE None c_int c_void_p _make_Mix_EffectDoneFunc N/A N/A func udata N/A N/A N/A func N/A f N/A N/A chan ignored N/A N/A N/A N/A func chan udata N/A N/A N/A _MixEffectDoneFunc f N/A N/A N/A _MixEffectDoneFunc N/A N/A _Mix_RegisterEffect N/A N/A _dll private_function Mix_RegisterEffect arg_types N/A c_int _Mix_EffectFunc _Mix_EffectDoneFunc c_void_p return_type c_int error_return 0 N/A _effect_func_refs N/A Mix_RegisterEffect N/A N/A chan f d arg N/A N/A N/A Register a special effect function.

    At mixing time, the channel data is copied into a buffer and passed
    through each registered effect function.  After it passes through all
    the functions, it is mixed into the final output stream. The copy to
    buffer is performed once, then each effect function performs on the
    output of the previous effect. Understand that this extra copy to a
    buffer is not performed if there are no effects registered for a given
    chunk, which saves CPU cycles, and any given effect will be extra
    cycles, too, so it is crucial that your code run fast. Also note that
    the data that your function is given is in the format of the sound
    device, and not the format you gave to `Mix_OpenAudio`, although they
    may in reality be the same. This is an unfortunate but necessary speed
    concern. Use `Mix_QuerySpec` to determine if you can handle the data
    before you register your effect, and take appropriate actions.

    You may also specify a callback (`d`) that is called when the channel
    finishes playing. This gives you a more fine-grained control than
    `Mix_ChannelFinished`, in case you need to free effect-specific
    resources, etc. If you don't need this, you can specify None.

    You may set the callbacks before or after calling `Mix_PlayChannel`.

    Things like `Mix_SetPanning` are just internal special effect
    functions, so if you are using that, you've already incurred the
    overhead of a copy to a separate buffer, and that these effects will be
    in the queue with any functions you've registered. The list of
    registered effects for a channel is reset when a chunk finishes
    playing, so you need to explicitly set them with each call to
    ``Mix_PlayChannel*``.

    You may also register a special effect function that is to be run after
    final mixing occurs. The rules for these callbacks are identical to
    those in `Mix_RegisterEffect`, but they are run after all the channels
    and the music have been mixed into a single stream, whereas
    channel-specific effects run on a given channel before any other mixing
    occurs. These global effect callbacks are call "posteffects".
    Posteffects only have their `d` function called when they are
    unregistered (since the main output stream is never "done" in the same
    sense as a channel).  You must unregister them manually when you've had
    enough. Your callback will be told that the channel being mixed is
    (`MIX_CHANNEL_POST`) if the processing is considered a posteffect.

    After all these effects have finished processing, the callback
    registered through `Mix_SetPostMix` runs, and then the stream goes to
    the audio device.

    Do not call `SDL_LockAudio` from your callback function.

    :Parameters:
        `chan` : int
            Channel to set effect on, or `MIX_CHANNEL_POST` for postmix.
        `f` : function
            Callback function for effect.  Must have the signature
            (channel: int, stream: `SDL_array`, udata: any) -> None;
            where channel is the channel being affected, stream contains
            the audio data and udata is the user variable passed in to
            this function.
        `d` : function
            Callback function for when the effect is done.  The function
            must have the signature (channel: int, udata: any) -> None.
        `arg` : any
            User data passed to both callbacks.

     N/A f N/A _make_MixEffectFunc f arg N/A d N/A _make_MixEffectDoneFunc d arg N/A N/A N/A _effect_func_refs append f N/A N/A N/A _effect_func_refs append d N/A N/A _Mix_RegisterEffect chan f d arg N/A N/A Mix_UnregisterAllEffects N/A N/A _dll function Mix_UnregisterAllEffects Unregister all effects for a channel.

    You may not need to call this explicitly, unless you need to stop all
    effects from processing in the middle of a chunk's playback. Note that
    this will also shut off some internal effect processing, since
    `Mix_SetPanning` and others may use this API under the hood. This is
    called internally when a channel completes playback.

    Posteffects are never implicitly unregistered as they are for channels,
    but they may be explicitly unregistered through this function by
    specifying `MIX_CHANNEL_POST` for a channel.

    :Parameters:
     - `channel`: int

     args N/A channel arg_types N/A c_int return_type c_int error_return 0 N/A Mix_SetPanning N/A N/A _dll function Mix_SetPanning Set the panning of a channel.

    The left and right channels are specified as integers between 0 and
    255, quietest to loudest, respectively.

    Technically, this is just individual volume control for a sample with
    two (stereo) channels, so it can be used for more than just panning.
    If you want real panning, call it like this::

        Mix_SetPanning(channel, left, 255 - left)

    Setting (channel) to `MIX_CHANNEL_POST` registers this as a posteffect, and
    the panning will be done to the final mixed stream before passing it on
    to the audio device.

    This uses the `Mix_RegisterEffect` API internally, and returns without
    registering the effect function if the audio device is not configured
    for stereo output. Setting both (left) and (right) to 255 causes this
    effect to be unregistered, since that is the data's normal state.

    :Parameters:
     - `channel`: int
     - `left`: int
     - `right`: int

     args N/A channel left right arg_types N/A c_int c_ubyte c_ubyte return_type c_int error_return 0 N/A Mix_SetPosition N/A N/A _dll function Mix_SetPosition Set the position of a channel.

    `angle` is an integer from 0 to 360, that specifies the location of the
    sound in relation to the listener. `angle` will be reduced as neccesary
    (540 becomes 180 degrees, -100 becomes 260).  Angle 0 is due north, and
    rotates clockwise as the value increases.  For efficiency, the
    precision of this effect may be limited (angles 1 through 7 might all
    produce the same effect, 8 through 15 are equal, etc).  `distance` is
    an integer between 0 and 255 that specifies the space between the sound
    and the listener. The larger the number, the further away the sound is.
    Using 255 does not guarantee that the channel will be culled from the
    mixing process or be completely silent. For efficiency, the precision
    of this effect may be limited (distance 0 through 5 might all produce
    the same effect, 6 through 10 are equal, etc). Setting `angle` and
    `distance` to 0 unregisters this effect, since the data would be
    unchanged.

    If you need more precise positional audio, consider using OpenAL for
    spatialized effects instead of SDL_mixer. This is only meant to be a
    basic effect for simple "3D" games.

    If the audio device is configured for mono output, then you won't get
    any effectiveness from the angle; however, distance attenuation on the
    channel will still occur. While this effect will function with stereo
    voices, it makes more sense to use voices with only one channel of
    sound, so when they are mixed through this effect, the positioning will
    sound correct. You can convert them to mono through SDL before giving
    them to the mixer in the first place if you like.

    Setting `channel` to `MIX_CHANNEL_POST` registers this as a posteffect,
    and the positioning will be done to the final mixed stream before
    passing it on to the audio device.

    This is a convenience wrapper over `Mix_SetDistance` and
    `Mix_SetPanning`.

    :Parameters:
     - `channel`: int
     - `angle`: int
     - `distance`: int

     args N/A channel angle distance arg_types N/A c_int c_short c_ubyte return_type c_int error_return 0 N/A Mix_SetDistance N/A N/A _dll function Mix_SetDistance Set the "distance" of a channel.

    `distance` is an integer from 0 to 255 that specifies the location of
    the sound in relation to the listener.  Distance 0 is overlapping the
    listener, and 255 is as far away as possible A distance of 255 does not
    guarantee silence; in such a case, you might want to try changing the
    chunk's volume, or just cull the sample from the mixing process with
    `Mix_HaltChannel`.

    For efficiency, the precision of this effect may be limited (distances
    1 through 7 might all produce the same effect, 8 through 15 are equal,
    etc).  `distance` is an integer between 0 and 255 that specifies the
    space between the sound and the listener. The larger the number, the
    further away the sound is.

    Setting `distance` to 0 unregisters this effect, since the data would
    be unchanged.

    If you need more precise positional audio, consider using OpenAL for
    spatialized effects instead of SDL_mixer. This is only meant to be a
    basic effect for simple "3D" games.

    Setting `channel` to `MIX_CHANNEL_POST` registers this as a posteffect,
    and the distance attenuation will be done to the final mixed stream
    before passing it on to the audio device.

    This uses the `Mix_RegisterEffect` API internally.

    :Parameters:
     - `channel`: int
     - `distance`: distance

     args N/A channel distance arg_types N/A c_int c_ubyte return_type c_int error_return 0 N/A Mix_SetReverseStereo N/A N/A _dll function Mix_SetReverseStereo Causes a channel to reverse its stereo.

    This is handy if the user has his or her speakers hooked up backwards,
    or you would like to have a minor bit of psychedelia in your sound
    code.  Calling this function with `flip` set to non-zero reverses the
    chunks's usual channels. If `flip` is zero, the effect is unregistered.

    This uses the `Mix_RegisterEffect` API internally, and thus is probably
    more CPU intensive than having the user just plug in his speakers
    correctly.  `Mix_SetReverseStereo` returns without registering the
    effect function if the audio device is not configured for stereo
    output.

    If you specify `MIX_CHANNEL_POST` for `channel`, then this the effect
    is used on the final mixed stream before sending it on to the audio
    device (a posteffect).

    :Parameters:
     - `channel`: int
     - `flip`: int

     args N/A channel flip arg_types N/A c_int c_int return_type c_int error_return 0 N/A Mix_ReserveChannels N/A N/A _dll function Mix_ReserveChannels Reserve the first channels (0 to n-1) for the application.

    If reserved, a channel will not be allocated dynamically to a sample
    if requested with one of the ``Mix_Play*`` functions.

    :Parameters:
     - `num`: int

    :rtype: int
    :return: the number of reserved channels
     args N/A num arg_types N/A c_int return_type c_int N/A Mix_GroupChannel N/A N/A _dll function Mix_GroupChannel Assing a channel to a group.

    A tag can be assigned to several mixer channels, to form groups
    of channels.  If `tag` is -1, the tag is removed (actually -1 is the
    tag used to represent the group of all the channels).

    :Parameters:
     - `channel`: int
     - `tag`: int

     args N/A channel tag arg_types N/A c_int c_int return_type c_int error_return 0 N/A Mix_GroupChannels N/A N/A _dll function Mix_GroupChannels Assign several consecutive channels to a group.

    A tag can be assigned to several mixer channels, to form groups
    of channels.  If `tag` is -1, the tag is removed (actually -1 is the
    tag used to represent the group of all the channels).

    :Parameters:
     - `channel_from`: int
     - `channel_to`: int
     - `tag`: int

     args N/A channel_from channel_to tag arg_types N/A c_int c_int c_int return_type c_int error_return 0 N/A Mix_GroupAvailable N/A N/A _dll function Mix_GroupAvailable Find the first available channel in a group of channels.

    :Parameters:
     - `tag`: int

    :rtype: int
    :return: a channel, or -1 if none are available.
     args N/A tag arg_types N/A c_int return_type c_int N/A Mix_GroupCount N/A N/A _dll function Mix_GroupCount Get the number of channels in a group.

    If `tag` is -1, returns the total number of channels.

    :Parameters:
     - `tag`: int

    :rtype: int
     args N/A tag arg_types N/A c_int return_type c_int N/A Mix_GroupOldest N/A N/A _dll function Mix_GroupOldest Find the "oldest" sample playing in a group of channels.

    :Parameters:
     - `tag`: int

    :rtype: int
     args N/A tag arg_types N/A c_int return_type c_int N/A Mix_GroupNewer N/A N/A _dll function Mix_GroupNewer Find the "most recent" (i.e., last) sample playing in a group of
    channels.

    :Parameters:
     - `tag`: int

    :rtype: int
     args N/A tag arg_types N/A c_int return_type c_int Mix_PlayChannel N/A N/A channel chunk loops N/A N/A N/A Play an audio chunk on a specific channel.

    :Parameters:
        `channel` : int
            If -1, play on the first free channel.
        `chunk` : `Mix_Chunk`
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.

    :rtype: int
    :return: the channel that was used to play the sound.
     N/A N/A Mix_PlayChannelTimed channel chunk loops -1 N/A N/A Mix_PlayChannelTimed N/A N/A _dll function Mix_PlayChannelTimed Play an audio chunk on a specific channel for a specified amount of
    time.

    :Parameters:
        `channel` : int
            If -1, play on the first free channel.
        `chunk` : `Mix_Chunk`
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
        `ticks` : int
            Maximum number of milliseconds to play sound for.

    :rtype: int
    :return: the channel that was used to play the sound.
     args N/A channel chunk loops ticks arg_types N/A c_int N/A POINTER Mix_Chunk c_int c_int return_type c_int N/A Mix_PlayMusic N/A N/A _dll function Mix_PlayMusic Play a music chunk.

    :Parameters:
        `music` : ``Mix_Music``
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
     args N/A music loops arg_types N/A _Mix_Music c_int return_type c_int error_return -1 N/A Mix_FadeInMusic N/A N/A _dll function Mix_FadeInMusic Fade in music over a period of time.

    :Parameters:
        `music` : ``Mix_Music``
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
        `ms` : int
            Number of milliseconds to fade up over.
     args N/A music loops ms arg_types N/A _Mix_Music c_int c_int return_type c_int error_return -1 N/A Mix_FadeInMusicPos N/A N/A _dll function Mix_FadeInMusicPos Fade in music at an offset over a period of time.

    :Parameters:
        `music` : ``Mix_Music``
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
        `ms` : int
            Number of milliseconds to fade up over.
        `position` : float
            Position within music to start at.  Currently implemented
            only for MOD, OGG and MP3.

    :see: Mix_SetMusicPosition
     args N/A music loops ms position arg_types N/A _Mix_Music c_int c_int c_double return_type c_int error_return -1 Mix_FadeInChannel N/A N/A channel chunk loops ms N/A N/A N/A Fade in a channel.

    :Parameters:
        `channel` : int
            If -1, play on the first free channel.
        `chunk` : `Mix_Chunk`
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
        `ms` : int
            Number of milliseconds to fade up over.
     N/A N/A Mix_FadeInChannelTimed channel chunk loops -1 N/A N/A Mix_FadeInChannelTimed N/A N/A _dll function Mix_FadeInChannelTimed Fade in a channel and play for a specified amount of time.

    :Parameters:
        `channel` : int
            If -1, play on the first free channel.
        `chunk` : `Mix_Chunk`
            Chunk to play
        `loops` : int
            If greater than zero, the number of times to play the sound;
            if -1, loop infinitely.
        `ms` : int
            Number of milliseconds to fade up over.
        `ticks` : int
            Maximum number of milliseconds to play sound for.
     args N/A channel music loops ms ticks arg_types N/A c_int _Mix_Music c_int c_int c_int return_type c_int error_return -1 N/A Mix_Volume N/A N/A _dll function Mix_Volume Set the volume in the range of 0-128 of a specific channel.

    :Parameters:
        `channel` : int
            If -1, set the volume for all channels
        `volume` : int
            Volume to set, in the range 0-128, or -1 to just return the
            current volume.

    :rtype: int
    :return: the original volume.
     args N/A channel volume arg_types N/A c_int c_int return_type c_int N/A Mix_VolumeChunk N/A N/A _dll function Mix_VolumeChunk Set the volume in the range of 0-128 of a chunk.

    :Parameters:
        `chunk` : `Mix_Chunk`
            Chunk to set volume.
        `volume` : int
            Volume to set, in the range 0-128, or -1 to just return the
            current volume.

    :rtype: int
    :return: the original volume.
     args N/A chunk volume arg_types N/A N/A POINTER Mix_Chunk c_int return_type c_int N/A Mix_VolumeMusic N/A N/A _dll function Mix_VolumeMusic Set the volume in the range of 0-128 of the music.

    :Parameters:
        `volume` : int
            Volume to set, in the range 0-128, or -1 to just return the
            current volume.

    :rtype: int
    :return: the original volume.
     args N/A volume arg_types N/A c_int return_type c_int N/A Mix_HaltChannel N/A N/A _dll function Mix_HaltChannel Halt playing of a particular channel.

    :Parameters:
     - `channel`: int
     args N/A channel arg_types N/A c_int return_type None N/A Mix_HaltGroup N/A N/A _dll function Mix_HaltGroup Halt playing of a particular group.

    :Parameters:
     - `tag`: int
     args N/A tag arg_types N/A c_int return_type None N/A Mix_HaltMusic N/A N/A _dll function Mix_HaltMusic Halt playing music.
     args N/A arg_types N/A return_type None N/A Mix_ExpireChannel N/A N/A _dll function Mix_ExpireChannel Change the expiration delay for a particular channel.

    The sample will stop playing afte the `ticks` milliseconds have
    elapsed, or remove the expiration if `ticks` is -1.

    :Parameters:
     - `channel`: int
     - `ticks`: int

    :rtype: int
    :return: the number of channels affected.
     args N/A channel ticks arg_types N/A c_int c_int return_type c_int N/A Mix_FadeOutChannel N/A N/A _dll function Mix_FadeOutChannel Halt a channel, fading it out progressively until it's silent.

    The `ms` parameter indicates the number of milliseconds the fading
    will take.

    :Parameters:
     - `channel`: int
     - `ms`: int
     args N/A channel ms arg_types N/A c_int c_int return_type None N/A Mix_FadeOutGroup N/A N/A _dll function Mix_FadeOutGroup Halt a group, fading it out progressively until it's silent.

    The `ms` parameter indicates the number of milliseconds the fading
    will take.

    :Parameters:
     - `tag`: int
     - `ms`: int
     args N/A tag ms arg_types N/A c_int c_int return_type None N/A Mix_FadeOutMusic N/A N/A _dll function Mix_FadeOutMusic Halt playing music, fading it out progressively until it's silent.

    The `ms` parameter indicates the number of milliseconds the fading
    will take.

    :Parameters:
     - `ms`: int
     args N/A ms arg_types N/A c_int return_type None N/A Mix_FadingMusic N/A N/A _dll function Mix_FadingMusic Query the fading status of the music.

    :rtype: int
    :return: one of MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN.
     args N/A arg_types N/A return_type c_int N/A Mix_FadingChannel N/A N/A _dll function Mix_FadingChannel Query the fading status of a channel.

    :Parameters:
     - `channel`: int

    :rtype: int
    :return: one of MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN.
     args N/A channel arg_types N/A c_int return_type c_int N/A Mix_Pause N/A N/A _dll function Mix_Pause Pause a particular channel.

    :Parameters:
     - `channel`: int

     args N/A channel arg_types N/A c_int return_type None N/A Mix_Resume N/A N/A _dll function Mix_Resume Resume a particular channel.

    :Parameters:
     - `channel`: int

     args N/A channel arg_types N/A c_int return_type None N/A Mix_Paused N/A N/A _dll function Mix_Paused Query if a channel is paused.

    :Parameters:
     - `channel`: int

    :rtype: int
     args N/A channel arg_types N/A c_int return_type c_int N/A Mix_PauseMusic N/A N/A _dll function Mix_PauseMusic Pause the music stream.
     args N/A arg_types N/A return_type None N/A Mix_ResumeMusic N/A N/A _dll function Mix_ResumeMusic Resume the music stream.
     args N/A arg_types N/A return_type None N/A Mix_RewindMusic N/A N/A _dll function Mix_RewindMusic Rewind the music stream.
     args N/A arg_types N/A return_type None N/A Mix_PausedMusic N/A N/A _dll function Mix_PausedMusic Query if the music stream is paused.

    :rtype: int
     args N/A arg_types N/A return_type c_int N/A Mix_SetMusicPosition N/A N/A _dll function Mix_SetMusicPosition Set the current position in the music stream.

    For MOD files the position represents the pattern order number;
    for OGG and MP3 files the position is in seconds.  Currently no other
    music file formats support positioning.

    :Parameters:
     - `position`: float

     args N/A position arg_types N/A c_double return_type c_int error_return -1 N/A Mix_Playing N/A N/A _dll function Mix_Playing Query the status of a specific channel.

    :Parameters:
     - `channel`: int

    :rtype: int
    :return: the number of queried channels that are playing.
     args N/A channel arg_types N/A c_int return_type c_int N/A Mix_PlayingMusic N/A N/A _dll function Mix_PlayingMusic Query the status of the music stream.

    :rtype: int
    :return: 1 if music is playing, 0 otherwise.
     args N/A arg_types N/A return_type c_int N/A Mix_SetMusicCMD N/A N/A _dll function Mix_SetMusicCMD Set the external music playback command.

    Any currently playing music will stop.

    :Parameters:
     - `command`: string

     args N/A command arg_types N/A c_char_p return_type c_int error_return -1 N/A Mix_SetSynchroValue N/A N/A _dll function Mix_SetSynchroValue Set the synchro value for a MOD music stream.

    :Parameters:
     - `value`: int

     args N/A value arg_types N/A c_int return_type c_int error_return -1 N/A Mix_GetSynchroValue N/A N/A _dll function Mix_GetSynchroValue Get the synchro value for a MOD music stream.

    :rtype: int
     args N/A arg_types N/A return_type c_int N/A Mix_GetChunk N/A N/A _dll function Mix_GetChunk Get the chunk currently associated with a mixer channel.

    Returns None if the channel is invalid or if there's no chunk associated.

    :Parameters:
     - `channel`: int

    :rtype: `Mix_Chunk`
     args N/A channel arg_types N/A c_int return_type N/A POINTER Mix_Chunk dereference_return True N/A Mix_CloseAudio N/A N/A _dll function Mix_CloseAudio Close the mixer, halting all playing audio.

     args N/A arg_types N/A return_type None