I think you should look at the final switch. Some of the conditions seem
potentially problematic. You have a time predicate with a
track_sensitive=false parameter. This can potentially make the source
switch before the end of the sequence intro/new/outro.
Also, I have update the code with some metadata-related fixes. The new
function is:
# Creates a source that merges one track from each passed sources
# as a single merged track and loops. For instance,
rotate.sequence([intro,main,outro])
# creates a source that plays a sequence [intro,main,outro] as single track
and loops back.
# @param ~id Force the value of the source ID.
# @params sources Sequence of sources to be merged
def rotate.sequence(~id="",sources)
first_ready = ref true
second_ready = ref true
duration = get(default=0.04,"frame.duration")
def is_first_ready() =
!first_ready
end
def is_second_ready() =
!second_ready
end
def to_first(old,new) =
if !first_ready then
first_ready := false
second_ready := true
else
first_ready := true
second_ready := false
end
sequence(merge=true,[blank(duration=duration),new])
end
source = rotate(transitions=[to_first],sources)
source = merge_tracks(source)
switch(id=id,replay_metadata=false,track_sensitive=false,[(is_first_ready,
source), (is_second_ready, source)])
end
Please note the change of name to rotate.sequences. Not sure yet what's a
good name for this operator :-)
2016-05-01 15:16 GMT-05:00 Michael Pieper <[email protected]>:
>
>
> Am 01.05.2016 um 22:01 schrieb Romain Beauxis:
> > Hi,
> >
> > 2016-05-01 14:34 GMT-05:00 Michael Pieper <[email protected]>:
> >> Hello Romain
> >>
> >> I tried your code and integrated it like this:
> >>
> >> pl_musik = playlist("S:\IMAScore\Heide Park Resort Soundtrack")
> >> intro = playlist("../musik/history/intro")
> >> outro = playlist("../musik/history/outro")
> >> news = playlist("../musik/history/beitraege")
> >>
> >> new2 = rotate_sequence([intro,news,outro])
> >>
> >> radio = rotate ( [ new2, pl_musik ] )
> >>
> >> Maybe I missunderstood something, but I was expecting, that your
> >> function will create one track out of the three, but it is not the case.
> >> They are still 3 tracks.
> >
> > I just tried this here and it seems to be working just fine. What
> > version of liquidsoap are you using? Also, do you mean 3 tracks or 3
> > metadata? Tracks and metadata are different things in liquidsoap so
> > you may see 3 different metadata passing but they will be part of the
> > same track..
>
> I'm using Version 1.2.0 as the windows version:
>
> 2016/05/01 22:07:39 >>> LOG START
> 2016/05/01 22:07:39 [protocols.external:3] Found "wget.exe".
> 2016/05/01 22:07:39 [main:3] Liquidsoap 1.2.0
> ([email protected]:
> savonet/liquidsoap.git@7fb89788815f9103e2e8a857eba48eacc764d7f9
> :20160113:164924)
>
> And here is my liq-File:
>
> http://www.augusta.de/~michael/FPC-test-history.liq
>
> and when the switch-command triggers, then only the first source (intro)
> is played the first track. And then it stpos.
>
> I was expecting, that as this is really one track, the delay will stop
> the play of the source after the combination intro,news,outro which is
> not the case for me.
>
> I can try next week the script in a unix area.
>
> Thanks for all your time with my problem.
>
> Best regards
> Michael
>
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users