예제 #1
0
파일: core.py 프로젝트: pyzzz/zzpysdl
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()
예제 #2
0
파일: core.py 프로젝트: pyzzz/zzpysdl
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()
예제 #3
0
파일: movie.py 프로젝트: pyzzz/zzpysdl
def play(path, volume=100):
    #why not split load and play: smpeg need keep audio device open by itself ...
    global info, mpeg, mpeg_rw
    if playing():
        core.logdebug("movie play canceled: movie playing")
        return
    music.closeAudio()
    #stop()
    info = SMPEG_Info()
    try:
        mpeg_rw = rw.RW(path)
    except core.SDLException, e:
        core.logdebug("movie load error:", e)
        stop()
        return
예제 #4
0
파일: movie.py 프로젝트: pyzzz/zzpysdl
def play(path, volume=100):
    # why not split load and play: smpeg need keep audio device open by itself ...
    global info, mpeg, mpeg_rw
    if playing():
        core.logdebug("movie play canceled: movie playing")
        return
    music.closeAudio()
    # stop()
    info = SMPEG_Info()
    try:
        mpeg_rw = rw.RW(path)
    except core.SDLException, e:
        core.logdebug("movie load error:", e)
        stop()
        return