Hi, 2012/12/9 <[email protected]> > > Finally, after several headache, i decided to play whith > the queue only, because i noticed that liquidsoap process well > the crossfade between track of the same queue... > (just my opinion, i just can't stand what liquidsoap do internally) > > So i transform the script to push a new track to the queue > each time a track is played. And i use a server variable > to do the rotation. > > Full script : > > > set("log.file",true) > set("log.level",3) > set("log.file.path","/home/radio/log/test.log") > set("server.telnet",true) > > nbtrack = interactive.float("nbtrack",0.) > > def Titre() = > result = get_process_output("php /var/www/titre.php") > request.create(result) > end > > def Jingle() = > result = get_process_output("php /var/www/jingle.php") > request.create(result) > end > > def crossfade(~conservative=true,s) > s = fade.in(duration=5.,s) > s = fade.out(duration=5.,s) > fader = fun (a,b) -> add(normalize=false,[b,a]) > cross(conservative=conservative,duration=3.,fader,s) > end > > flux = request.queue(id="titrequeue",interactive=true,queue=[Titre()]) > > def AddTitre(m) > cnt = nbtrack() + 1. > if cnt > 5. then > ignore(server.execute("var.set nbtrack = 0.")) > result = get_process_output("php /var/www/jingle.php") > ignore(server.execute("#{source.id(flux)}.push #{result}")) > else > ignore(server.execute("var.set nbtrack = #{cnt}")) > result = get_process_output("php /var/www/titre.php") > ignore(server.execute("#{source.id(flux)}.push #{result}")) > end > log(label="ON TRACK",level=3,"Track count #{cnt}") > end > > flux = on_track(AddTitre(), flux) > > flux = crossfade(flux) > > flux = fallback(track_sensitive=false,[flux,blank()]) > > output.icecast(%mp3, host="127.0.0.1", port=8000, mount="/", > protocol="icy", encoding="ISO-8859-1", user="source", password="test", flux) > > > But i still don't understant why the following snippet don't do the trick > : > > flux = > rotate(weights=[1,1],[request.dynamic(request1),request.dynamic(request2)]) > flux = crossfade(flux) > > > Hope this help
Well.. :-) I am quite suspicious of the php script being used. Have you tried with request.dynamic sources but using a dummy script like "echo /path/to/file.mp3" ? Romain ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
