def stop(): """stop(): return None stop the music playback""" check_mixer() sdl.Mix_HaltMusic() global _queue_music if _queue_music: sdl.Mix_FreeMusic(_queue_music) _queue_music = None
def autoquit(): global _channeldata, _numchanneldata, _current_music, \ _queue_music if sdl.SDL_WasInit(sdl.SDL_INIT_AUDIO): sdl.Mix_HaltMusic() # cleanup if _channeldata: _channeldata = None _numchanneldata = 0 if _current_music: sdl.Mix_FreeMusic(_current_music) _current_music = None if _queue_music: sdl.Mix_FreeMusic(_queue_music) _queue_music = None sdl.Mix_CloseAudio() sdl.SDL_QuitSubSystem(sdl.SDL_INIT_AUDIO)