Hi, 2011/9/5 Fábio Costa <blackjackde...@gmail.com>: > I as wondering if i can give an external invocation to liquidsoap to pause > some music and play another one instead.
You can have several sources in one setup, and control in many ways how to switch between them. When you write a switch you can use arbitrary switching predicates, including one that will vary with external interaction. Something you can try quickly: switch([({test_process("test -f /path/to/file1")},s1),({test_process("test -f /path/to/file1")},s2)]) This will play s1 if file1 exists, otherwise s2 if file2 exists, otherwise be unavailable. A lighter variant using references instead of the filesystem: play_1 = ref(false) play_2 = ref(false) switch([({!play_1},s1),({!play_2},s2)]) Then you add server commands using server.register() to toggle the play_i flags, and you control who plays. Another way is using the mix() operator, which is a full mixing table but has builtin controls (accessible via the server) for switching. > If it's possible and i'm running multiple scripts how i would make to say > 'Stop this stream,from that script and play that other one' ? If it's different scripts, then they have to communicate, typically using an HTTP stream (icecast or harbor), and you gather the streams in another liquidsoap that does the switching as described above. But unless you have a good reason, it's probably simpler (and cleaner) to put all the sources together in one script and do the switching before output. Hope this helps, -- David ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Savonet-users mailing list Savonet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-users