#257: metadata, switch, fallback and smart_crossfade.
------------------------+---------------------------------------------------
 Reporter:  toots       |       Owner:  admin    
     Type:  Bugs        |      Status:  new      
 Priority:  1           |   Milestone:  0.9.0    
Component:  Liquidsoap  |     Version:  0.9.0+svn
 Keywords:              |         Mac:  1        
    Linux:  1           |      Netbsd:  1        
    Other:  1           |     Freebsd:  1        
------------------------+---------------------------------------------------
 Apparently there is some issue when using the following script:
 {{{
 # Debug functions.
 def print_meta(s)
   on_metadata(
     fun (m) -> log("META: Got #{m['title']} by #{m['artist']}."),
     s
   )
 end

 # and requests otherwise).
 default = playlist("~/documents/zic")

 # Comment out this line to remove the bug
 default2 = fallback([default])
 #default2 = default

 s = switch(
      [ ({ false}, default2),
        ({ true }, default) ])
 s = print_meta(smart_crossfade(s))

 output.dummy(mksafe(s))
 }}}

 Typical log:
 {{{
 2009/02/18 00:42:37 [lang:3] META: Got Any Heart Can Be Broken by Brent
 Dowe.
 2009/02/18 00:42:38 [src_4529:4] Got metadata at position 0: calling
 handler...
 2009/02/18 00:42:38 [lang:3] META: Got Any Heart Can Be Broken by Brent
 Dowe.
 2009/02/18 00:42:38 [src_4529:4] Got metadata at position 0: calling
 handler...
 2009/02/18 00:42:38 [lang:3] META: Got Any Heart Can Be Broken by Brent
 Dowe.
 2009/02/18 00:42:38 [src_4529:4] Got metadata at position 0: calling
 handler...
 2009/02/18 00:42:38 [lang:3] META: Got Any Heart Can Be Broken by Brent
 Dowe.
 2009/02/18 00:42:38 [src_4529:4] Got metadata at position 0: calling
 handler...
 2009/02/18 00:42:38 [lang:3] META: Got Any Heart Can Be Broken by Brent
 Dowe.
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/257>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to