#127: Switch transition
-------------------------+--------------------------------------------------
  Reporter:  mrpingouin  |       Owner:  dbaelde
      Type:  Bugs        |      Status:  closed 
  Priority:  1           |   Milestone:  0.3.7  
 Component:  Liquidsoap  |     Version:         
Resolution:  fixed       |    Keywords:         
       Mac:  1           |       Linux:  1      
    Netbsd:  0           |       Other:  1      
   Freebsd:  1           |  
-------------------------+--------------------------------------------------
Changes (by mrpingouin):

  * status:  new => closed
  * netbsd:  => 0
  * resolution:  => fixed

Comment:

 This isn't a bug at all. Here is a replay of my mail to savonet-users...
 {{{
 I feel bad that I'm only looking seriously at this transition problem
 now. I opened a ticket (http://savonet.rastageeks.org/ticket/127) in
 order to address it before the release but I just realized that it
 isn't a bug at all. The sad thing is that Romain already pointed out
 the problem correctly in his comment, but I wasn't sharp enough to
 understand it when I read.... I'll stop apologizing, and explain --
 the good point is that liq wasn't bugged.

 My proposition was the following:
 >   def start(a,b)
 >     sequence([jingle,b])
 >   end
 >   playlists = switch(track_sensitive=false, transitions=[start,start],
 >                       [({0s-29s}, electro,
 >                       ({30s-59s}, reggae])

 Here, the two intervals 0s-29s and 30s-59s do not overlap. When you
 write 0s-29s it actually exclude the 29th second. So there is a one
 second gap before 30s-59s is valid. What happens during this gap ?
 Neither of the children sources can be streamed. So the switch becomes
 unavailable. And the transition is unused: transitions are from one
 source to another, not from one source to unavailability. This
 unavailaility is handle by the operators above it, depending on what
 they are. Then the switch becomes available again, and the above
 operator starts relaying it again. But still no transition.

 In my case there was an mksafe() above the switch, adding some blank
 during the one second gap, which I wasn't noticing... Instead you can
 wrap the switch in the following variation that plays a beep when its
 source is not available, that's now very noticeable:
  beep_on_empty = fun (s) -> fallback(track_sensitive=false,[s,sine(880.)])

 Anyway, with the correct intervals as in Romain's example (0s-30s and
 30s-60s) the transition does occur and the effect is the one I
 expected, and the one you asked for.
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/127#comment:2>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to