Exemple #1
0
def openAudio():
    global audioDeviceActive
    if audioDeviceActive:
        return
    movie.stop()  # if not call it, Mix_OpenAudio will failed after movie playing finish
    if Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 1024) < 0:
        core.raisesdlerr()
    audioDeviceActive = True
Exemple #2
0
def openAudio():
    global audioDeviceActive
    if audioDeviceActive:
        return
    movie.stop(
    )  #if not call it, Mix_OpenAudio will failed after movie playing finish
    if Mix_OpenAudio(
            MIX_DEFAULT_FREQUENCY,
            MIX_DEFAULT_FORMAT,
            MIX_DEFAULT_CHANNELS,
            1024,
    ) < 0:
        core.raisesdlerr()
    audioDeviceActive = True
Exemple #3
0
def exitapp(*args):
    if args:
        logerr(*args)
    global screen
    if screen:
        sdl.SDL_FreeSurface(screen)
        screen = None
    movie.stop()
    music.closeAudio()
    sdl.Mix_Quit()  #if not call will abort
    sdl.IMG_Quit()
    sdl.TTF_Quit()
    sdl.SDL_Quit()
    exitproc()
Exemple #4
0
def exitapp(*args):
	if args:
		logerr(*args)
	global screen
	if screen:
		sdl.SDL_FreeSurface(screen)
		screen = None
	movie.stop()
	music.closeAudio()
	sdl.Mix_Quit() #if not call will abort
	sdl.IMG_Quit()
	sdl.TTF_Quit()
	sdl.SDL_Quit()
	exitproc()