pygame2.sdlmixer.constants – Constants for SDL_mixer

This module contains the constants used throughout the pygame2.sdlmixer modules.

Initialisation Constants

Those constants are used by the pygame2.sdlmixer.init() function.

pygame2.sdlmixer.constants.INIT_FLAC
Initialises the FLAC library bindings.
pygame2.sdlmixer.constants.INIT_MOD
Initialises the timidity library bindings.
pygame2.sdlmixer.constants.INIT_MP3
Initialises the smpeg/mad library bindings.
pygame2.sdlmixer.constants.INIT_OGG
Initialises the ogg/vorbis library bindings.

Format Constants

Those constants are used by the pygame2.sdlmixer.open_audio() and pygame2.sdlmixer.query_spec() functions.

pygame2.sdlmixer.constants.AUDIO_U8
Unsigned 8-bit data in system byte order.
pygame2.sdlmixer.constants.AUDIO_S8
Signed 8-bit data in system byte order.
pygame2.sdlmixer.constants.AUDIO_U16LSB
Unsigned 16-bit data in little-endian byte order.
pygame2.sdlmixer.constants.AUDIO_S16LSB
Signed 16-bit data in little-endian byte order.
pygame2.sdlmixer.constants.AUDIO_U16MSB
Unsigned 16-bit data in big-endian byte order.
pygame2.sdlmixer.constants.AUDIO_S16MSB
Signed 16-bit data in big-endian byte order.
pygame2.sdlmixer.constants.AUDIO_U16
Unsigned 16-bit data in system byte order.
pygame2.sdlmixer.constants.AUDIO_S16
Signed 16-bit data in system byte order.
pygame2.sdlmixer.constants.AUDIO_U16SYS
Unsigned 16-bit data in system byte order.
pygame2.sdlmixer.constants.AUDIO_S16SYS
Signed 16-bit data in system byte order.

Fading Status Constants

Those constants indicate the fading status for pygame2.sdlmixer.Channel and pygame2.sdlmixer.Music objects.

pygame2.sdlmixer.constants.NO_FADING
Indicates that the Channel or Music is currently not faded.
pygame2.sdlmixer.constants.FADING_IN
Indicates that the Channel or Music is currently fading in.
pygame2.sdlmixer.constants.FADING_OUT
Indicates that the Channel or Music is currently fading out.

Music Type Constants

Those constants are used by the pygame2.sdlmixer.Music.type attribute.

pygame2.sdlmixer.constants.MUS_NONE
Indicates no music being played at all.
pygame2.sdlmixer.constants.MUS_CMD
Indicates an external command to be used for music playback.
pygame2.sdlmixer.constants.MUS_WAV
The music format is WAV data.
pygame2.sdlmixer.constants.MUS_MOD
The music format is MOD data.
pygame2.sdlmixer.constants.MUS_MID
The music format is MIDI data.
pygame2.sdlmixer.constants.MUS_OGG
The music format is Ogg/Vorbis encoded data.
pygame2.sdlmixer.constants.MUS_MP3
The music format is MP3 encoded data (using smpeg as decoder).
pygame2.sdlmixer.constants.MUS_MP3_MAD
The music format is MP3 encoded data (using libmad as decoder).

Miscellaneous Constants

pygame2.sdlmixer.constants.CHANNELS
The default amount of ready-to-use allocated pygame2.sdlmixer.Channel objects after the initial call to pygame2.sdlmixer.open_audio().
pygame2.sdlmixer.constants.DEFAULT_FREQUENCY
A good default sample rate in Hz for most sound cards (22050).
pygame2.sdlmixer.constants.DEFAULT_FORMAT
The suggested default audio format (AUDIO_S16SYS).
pygame2.sdlmixer.constants.DEFAULT_CHANNELS
The suggested default channel setting for pygame2.sdlmixer.open_audio(). This is 2 for stereo sound.
pygame2.sdlmixer.constants.MAX_VOLUME
The maximum value for any volume setting.