Advertisement
Guest User

Untitled

a guest
Jun 14th, 2014
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1.     def audio_crossFade(fadeTime, music):
  2.         oldChannel = None
  3.         newChannel = None
  4.         if renpy.music.get_playing(channel="music") is not None and renpy.music.get_playing(channel="music1") is None:
  5.             oldChannel = "music"
  6.             newChannel = "music1"
  7.         elif renpy.music.get_playing(channel="music") is None and renpy.music.get_playing(channel="music1") is not None:
  8.             oldChannel = "music1"
  9.             newChannel = "music"
  10.         elif renpy.music.get_playing(channel="music") is None and renpy.music.get_playing(channel="music1") is None:
  11.             oldChannel = None
  12.             newChannel = "music"
  13.            
  14.         if oldChannel is not None:
  15.             renpy.music.stop(channel= oldChannel, fadeout=fadeTime)
  16.            
  17.         if newChannel is not None:
  18.             renpy.music.play(music, channel=newChannel, loop=None,fadein=fadeTime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement