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()
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
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