pygame2.sdlmixer.music – SDL_mixer music playback

This module takes care of general music management and operations, which can apply to the currently set Music object.

Module Functions

pygame2.sdlmixer.music.fade_out(ms) → None

Fades out the current music playback.

This gradually reduces the volume for the current music to 0 over ms milliseconds. The music will be halted after the fadeout is complete.

pygame2.sdlmixer.music.fading() → int
Gets the fading status of the music.
pygame2.sdlmixer.music.get_volume() → int
Gets the volume of the music.
pygame2.sdlmixer.music.halt() → None
Halts the music playback and resets its state.
pygame2.sdlmixer.music.pause() → None
Pauses the music playback.
pygame2.sdlmixer.music.paused() → bool
Gets, whether the music playback is currently paused.
pygame2.sdlmixer.music.playing() → bool
Gets, whether the music is currently playing.
pygame2.sdlmixer.music.resume() → None
Resumes the previously paused music playback
pygame2.sdlmixer.music.rewind() → None
Rewinds the music to the start.
pygame2.sdlmixer.music.set_position(pos) → None
Sets the current playback position.
pygame2.sdlmixer.music.set_volume(volume) → int

Sets the volume for the music.

Sets the volume for the music and returns the previous set volume.