2010-12-23, 23:14
PHP Code:
def _fade_volume( self, out=True ):
# set initial start/end values
volumes = range( 0, self.settings[ "slideshow_music_volume" ] )
# if fading out reverse order
if ( out ):
volumes.reverse()
# loop thru and set volume
for volume in volumes:
xbmc.executebuiltin( "XBMC.SetVolume(%d)" % ( volume, ) )
# sleep FIXME: play with the time, maybe have a percentage of the diff between start and end
xbmc.sleep( 10 )
# set the volume back to original
xbmc.executebuiltin( "XBMC.SetVolume(%s)" % ( self.current_volume, ) )
here's the code. i notice in this version volume is set differently. the new version the setting is the actual volume you want in db. this is a percentage, so i suggest changing this versions settings to be the actual volume you want the music to play at for the slideshow.