Le mercredi 11 août 2010 13:22:21, Jan Schmidle a écrit :
> Hi List,
Hi !
> I have a problem in configuring Liquidsoap the right way. I tried
> several approaches but none of it was working well.
> What we want to do is a Stream where every hour starts another "show".
> So far so good, this could easily be done with a switch.
> But the problem that we have is we have to skip the tracks at the end
> of one timeslot because one track could be longer then one hour.
> But when i switch to another playlist it suspends the track at the
> current position and resumes it when i get back to it.
(...)
> I'm open for any suggestion on how to build a setup like that, right
> now i have no idea what else would be possible.
Yes, that is classic problem when writing streams using liquidsoap.
You may be interested by the fallback.skip operator. It is defined in
utils.liq and available by default on a regular install:
# Special track insensitive fallback that
# always skip current song before switching.
# @category Source / Track Processing
# @param ~input The input source
# @param f The fallback source
def fallback.skip(~input,f)
def transition(a,b) =
source.skip(a)
# This eats the last remaining frame from a
sequence([a,b])
end
fallback(track_sensitive=false,transitions=[transition,transition],[input,f])
end
As you can see, when leaving any of the two sources, the source is skiped
so that a fresh song is played when it is used again.
You may, however, need to write your own version of this idea, for instance
if you are using a switch.. In this case, you simply have to define transitions
using the same code and it should work:
def transition(a,b) =
source.skip(a)
# This eats the last remaining frame from a
sequence([a,b])
end
switch(transitions=[transitions,...], ...)
Romain
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users